Closed Bug 159976 Opened 22 years ago Closed 22 years ago

nssckbi module does not build on Mac OS X 10.2

Categories

(NSS :: Build, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhines, Assigned: wtc)

Details

I am building from the moz 1.1a tarball, not sure of the NSS version.

The nssckbi module does not build on Mac OS X 10.2:

cc -arch ppc -bundle -compatibility_version 1 -current_version 1 -install_name /sw/lib/mozilla/ -o Darwin6.0_OPT.OBJ/libnssckbi.dylib Darwin6.0_OPT.OBJ/anchor.o Darwin6.0_OPT.OBJ/constants.o Darwin6.0_OPT.OBJ/bfind.o Darwin6.0_OPT.OBJ/binst.o Darwin6.0_OPT.OBJ/bobject.o Darwin6.0_OPT.OBJ/bsession.o Darwin6.0_OPT.OBJ/bslot.o Darwin6.0_OPT.OBJ/btoken.o Darwin6.0_OPT.OBJ/certdata.o   /sw/src/mozilla-1.1b-2/mozilla/dist/lib/libnssckfw.a /sw/src/mozilla-1.1b-2/mozilla/dist/lib/libnssb.a  /sw/src/mozilla-1.1b-2/mozilla/dist/lib/libplc4.a /sw/src/mozilla-1.1b-2/mozilla/dist/lib/libplds4.a 
c++: -compatibility_version only allowed with -dynamiclib

This is because some options do not apply to a bundle and are no longer accepted by the compiler.

The fix is:
--- mozilla/security/nss/lib/ckfw/builtins/config.mk	Fri Feb 15 14:53:42 2002
+++ mozilla-patched/security/nss/lib/ckfw/builtins/config.mk	Mon Jul 29 11:07:51 2002
@@ -54,5 +54,5 @@
 # To create a loadable module on Darwin, we must use -bundle.
 #
 ifeq ($(OS_TARGET),Darwin)
-DSO_LDOPTS := $(subst -dynamiclib,-bundle,$(DSO_LDOPTS))
+DSO_LDOPTS = -bundle
 endif
Thanks for the bug report and the patch.

Brian, Chris, could you confirm that -compatibility_version 1
and -current_version 1 should not be used when building a bundle?
What about -install_name @executable_path/$(notdir $@) ?  Does
it make sense for a bundle?
If you take a look at:
http://lxr.mozilla.org/seamonkey/source/config/rules.mk
lines 450/452, you will see the way the other bundles vs dylibs are built. 

(not only do install_name and compatibitlity_version not make sense for bundles, the OSX gcc3 compiler rejects them and fails)
Ben,

Thanks for the pointer.  Your patch is correct.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
I checked in Ben's patch on the tip, NSS_3_5_BRANCH, and
NSS_CLIENT_TAG of NSS.

This patch is not in NSS 3.5.  It will be in NSS 3.5.1 if
we ever make a patch release on the NSS_3_5_BRANCH.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.6
Version: unspecified → 3.5
I just found that the Mozilla tree is frozen for Mozilla 1.1final.
So I backed out this fix from NSS_CLIENT_TAG (the NSS tag used by
the Mozilla trunk build).

I will request the approval to check this in.
a=asa (on behalf of drivers) for checkin to 1.1
With the approval, I checked the fix into the NSS_CLIENT_TAG.
Target Milestone: 3.6 → 3.5.1
You need to log in before you can comment on or make changes to this bug.