Closed Bug 529878 Opened 15 years ago Closed 7 years ago

libnssutil3.dylib not linking correctly

Categories

(Firefox Build System :: General, defect)

1.9.2 Branch
x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jeremyhu, Unassigned)

References

Details

It does not pull in LDFLAGS passed at ./configure time.  This results in it building from the wrong target architecture if "-arch ____" is passed in CFLAGS and LDFLAGS.

/usr/bin/gcc-4.2 -dynamiclib -compatibility_version 1 -current_version 1 -install_name /opt/local/lib/firefox-x11-devel-standalone/libnssutil3.dylib -headerpad_max_install_names  -o Darwin10.2.0_OPT.OBJ/libnssutil3.dylib Darwin10.2.0_OPT.OBJ/quickder.o Darwin10.2.0_OPT.OBJ/secdig.o Darwin10.2.0_OPT.OBJ/derdec.o Darwin10.2.0_OPT.OBJ/derenc.o Darwin10.2.0_OPT.OBJ/dersubr.o Darwin10.2.0_OPT.OBJ/dertime.o Darwin10.2.0_OPT.OBJ/nssb64d.o Darwin10.2.0_OPT.OBJ/nssb64e.o Darwin10.2.0_OPT.OBJ/nssrwlk.o Darwin10.2.0_OPT.OBJ/nssilock.o Darwin10.2.0_OPT.OBJ/oidstring.o Darwin10.2.0_OPT.OBJ/portreg.o Darwin10.2.0_OPT.OBJ/secalgid.o Darwin10.2.0_OPT.OBJ/secasn1d.o Darwin10.2.0_OPT.OBJ/secasn1e.o Darwin10.2.0_OPT.OBJ/secasn1u.o Darwin10.2.0_OPT.OBJ/secitem.o Darwin10.2.0_OPT.OBJ/secoid.o Darwin10.2.0_OPT.OBJ/sectime.o Darwin10.2.0_OPT.OBJ/secport.o Darwin10.2.0_OPT.OBJ/secinit.o Darwin10.2.0_OPT.OBJ/templates.o Darwin10.2.0_OPT.OBJ/utf8.o    -L/opt/local/var/macports/build/_Users_jeremy_src_macports-trunk_dports_www_firefox-x11-devel/work/mozilla-1.9.2/dist/lib -L/opt/local/var/macports/build/_Users_jeremy_src_macports-trunk_dports_www_firefox-x11-devel/work/mozilla-1.9.2/dist/lib -lplc4 -lplds4 -lnspr4  
ld: warning: in /opt/local/var/macports/build/_Users_jeremy_src_macports-trunk_dports_www_firefox-x11-devel/work/mozilla-1.9.2/dist/lib/libplc4.dylib, file is not of required architecture
ld: warning: in /opt/local/var/macports/build/_Users_jeremy_src_macports-trunk_dports_www_firefox-x11-devel/work/mozilla-1.9.2/dist/lib/libplds4.dylib, file is not of required architecture
ld: warning: in /opt/local/var/macports/build/_Users_jeremy_src_macports-trunk_dports_www_firefox-x11-devel/work/mozilla-1.9.2/dist/lib/libnspr4.dylib, file is not of required architecture
Undefined symbols:
...
libplc4, libplds4, and libnspr4 are all of the correct architecture.  The problem is that libnssutil3 is not building with '-arch i386' even though it was given as part of CFLAGS and LDFLAGS at ./configure time
NSS doesn't respect CFLAGS/LDFLAGS passed in from the Mozilla build system. It's apparently always been this way.
I forgot I already reported this issue... the build system is so convoluted... I'm having trouble figuring out exactly where this is coming from... It looks like mainly security/coreconf/*
This is increasingly important on OSX since we need to pass in '-arch i386' to tell the build system to build for 32bit even when we're on a 64bit machine.
NSS has its own separate Makefile (non-autoconf) build system. The Mozilla build system calls into the NSS build system here:
http://mxr.mozilla.org/mozilla-central/source/security/manager/Makefile.in

You may be able to suss out some of the details from that makefile.
Bug against ancient toolchain we no longer support.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.