Closed Bug 316486 Opened 20 years ago Closed 20 years ago

tools with static libraries don't link on libpkix branch

Categories

(NSS :: Build, defect, P1)

3.12
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julien.pierre, Assigned: julien.pierre)

Details

Attachments

(1 file)

I got the following build error linking certcgi. [jp96085@monstre]/export/home/nss/pkix/mozilla/security/nss/cmd/certcgi 127 % gmake clobber all rm -rf SunOS5.10_i86pc_64_DBG.OBJ/certcgi SunOS5.10_i86pc_64_DBG.OBJ/certcgi.o SunOS5.10_i86pc_64_DBG.OBJ LOGS TAGS SunOS5.10_i86pc_64_DBG.OBJ/.md core /solaris-rm-f-sucks so_locations _gen _jmc _jri _jni _stubs cc -o SunOS5.10_i86pc_64_DBG.OBJ/certcgi.o -c -g -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT -DSOLARIS2_10 -D_SVID_GETTOD -xarch=amd64 -xs -DXP_UNIX -DNSPR20 -DDEBUG -UNDEBUG -DDEBUG_jp96085 -I/usr/dt/include -I/usr/openwin/include -I../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/include -I../../../../dist/public/nss -I../../../../dist/private/nss -I../../../../dist/public/seccmd -I../../../../dist/public/dbm certcgi.c cc -o SunOS5.10_i86pc_64_DBG.OBJ/certcgi -g -KPIC -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT -DSOLARIS2_10 -D_SVID_GETTOD -xarch=amd64 -xs -DXP_UNIX -DNSPR20 -DDEBUG -UNDEBUG -DDEBUG_jp96085 -I/usr/dt/include -I/usr/openwin/include -I../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/include -I../../../../dist/public/nss -I../../../../dist/private/nss -I../../../../dist/public/seccmd -I../../../../dist/public/dbm SunOS5.10_i86pc_64_DBG.OBJ/certcgi.o ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libsmime.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libssl.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libnss.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libssl.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libsectool.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libpkcs12.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libpkcs7.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libcerthi.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libpk11wrap.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libcryptohi.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libcerthi.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libnsspki.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libpk11wrap.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libsoftokn.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libcertdb.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libnsspki.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libnssdev.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libnssb.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libswfci.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libfreebl.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libsecutil.a ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libdbm.a -L../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib -lplc4 -lplds4 -lnspr4 -lthread -lnsl -lsocket -lposix4 -ldl -lc Undefined first referenced symbol in file PKIX_Initialize ../../../../dist/SunOS5.10_i86pc_64_DBG.OBJ/lib/libnss.a(nssinit.o) ld: fatal: Symbol referencing errors. No output written to SunOS5.10_i86pc_64_DBG.OBJ/certcgi gmake: *** [SunOS5.10_i86pc_64_DBG.OBJ/certcgi] Error 1 This tool is one of the few that use NSS static libraries, rather than shared libraries. Up until now, the NSS functions did not invoke any PKIX code. But now, NSS_Initialize does. So, the tools that use the NSS static libs need to be linked with all the libpkix object files. The fix that was checked in to revision 1.39.6.3 of mozilla/security/nss/cmd/platlibs.mk that added nss3 as a shared library in the ifdef USE_STATIC_LIBS section is incorrect. In that section, no NSS shared libraries should be used.
This patch adds lists the static libpkix libraries in platlibs.mk in the order they are needed. Two libraries (top and certhigh) need to appear twice due to the silly linker behavior which drops objects/static libs if they don't satisfy some previous dependencies.
Assignee: wtchang → julien.pierre.bugs
Status: NEW → ASSIGNED
I checked in the patch to the PKIX branch yesterday.
Component: Tools → Build
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: