Closed Bug 403250 Opened 17 years ago Closed 17 years ago

[10.5] 1.8 build configured with --enable-strip fails: strip: symbols referenced by relocation entries that can't be stripped in: .../xpinstall/src/libxpinstall.dylib

Categories

(Firefox Build System :: General, defect)

1.8 Branch
All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mark, Assigned: mark)

Details

(Keywords: fixed1.8.1.12)

Attachments

(2 files)

While building Camino configured with --enable-strip: rm -f libxpinstall.dylib c++ -I/usr/X11/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fpascal-strings -no-cpp-precomp -fno-common -fshort-wchar -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon -pipe -DNDEBUG -DTRIMMED -O2 -march=nocona -pipe -fPIC -o libxpinstall.dylib CertReader.o nsInstall.o nsInstallTrigger.o nsInstallVersion.o nsInstallFolder.o nsJSInstall.o nsJSFile.o nsJSInstallTriggerGlobal.o nsJSInstallVersion.o nsSoftwareUpdate.o nsSoftwareUpdateRun.o nsInstallFile.o nsInstallExecute.o nsInstallPatch.o nsInstallUninstall.o nsInstallResources.o nsRegisterItem.o nsTopProgressNotifier.o nsLoggingProgressNotifier.o ScheduledTasks.o nsXPIProxy.o nsXPITriggerInfo.o nsXPInstallManager.o nsInstallFileOpItem.o nsJSFileSpecObj.o nsInstallLogComment.o nsInstallBitwise.o nsAppleSingleDecoder.o -L../../dist/bin -L../../dist/lib -L../../dist/bin -lmozjs -L../../dist/bin -lxpcom -lxpcom_core -L../../dist/bin -L../../dist/lib -lplds4 -lplc4 -lnspr4 ../../dist/lib/libunicharutil_s.a -L../../dist/lib -lmozz -L../../dist/lib -lxpcom_compat -framework Carbon -bundle chmod +x libxpinstall.dylib nmedit -s /lizard/1.8/mozilla/build/unix/gnu-ld-scripts/components-export-list libxpinstall.dylib nmedit: can't make global coalesced symbols (like __ZTC26nsRandomAccessOutputStream0_25nsRandomAccessStoreClient) into static symbols (use ld(1)'s -exported_symbols_list option) in a final linked image: /lizard/1.8/build/km/xpinstall/src/libxpinstall.dylib strip -x -S libxpinstall.dylib strip: symbols referenced by relocation entries that can't be stripped in: /lizard/1.8/build/km/xpinstall/src/libxpinstall.dylib __ZN12nsFileClientD0Ev __ZN12nsFileClientD1Ev __ZN15nsInstallObjectD0Ev __ZN15nsInstallObjectD1Ev __ZN18nsShutdownObserverD0Ev __ZN18nsShutdownObserverD1Ev __ZN25nsRandomAccessStoreClient10set_at_eofEi __ZN25nsRandomAccessStoreClientD0Ev __ZN25nsRandomAccessStoreClientD1Ev __ZN26nsRandomAccessOutputStreamD0Ev __ZN26nsRandomAccessOutputStreamD1Ev __ZN9nsVoidKeyD0Ev __ZN9nsVoidKeyD1Ev __ZNK25nsRandomAccessStoreClient10get_at_eofEv __ZNK9nsVoidKey5CloneEv __ZNK9nsVoidKey6EqualsEPK9nsHashKey __ZNK9nsVoidKey8HashCodeEv __ZThn8_N26nsRandomAccessOutputStreamD0Ev __ZThn8_N26nsRandomAccessOutputStreamD1Ev make[4]: *** [libxpinstall.dylib] Error 1 make[4]: *** Deleting file `libxpinstall.dylib' make[4]: Leaving directory `/lizard/1.8/build/km/xpinstall/src' make[3]: *** [libs] Error 2 make[3]: Leaving directory `/lizard/1.8/build/km/xpinstall' make[2]: *** [tier_50] Error 2 make[2]: Leaving directory `/lizard/1.8/build/km' make[1]: *** [alldep] Error 2 make[1]: Leaving directory `/lizard/1.8/build/km' make: *** [alldep] Error 2 make: Leaving directory `/lizard/1.8/mozilla'
The nmedit warning here was helpful: nmedit: can't make global coalesced symbols (like __ZTC26nsRandomAccessOutputStream0_25nsRandomAccessStoreClient) into static symbols (use ld(1)'s -exported_symbols_list option) in a final linked image: /lizard/1.8/build/km/xpinstall/src/libxpinstall.dylib nmedit was failing to thin out the symbol table. We actually do support using ld -exported_symbols_list and are supposed to use it whenever it's available in ld. However, our configure check intended to determine whether the ld option is available didn't work under Leopard, because Leopard's ld messages changed. Currently, we test for the option by running "ld -exported_symbols_list" and looking for "argument missing". mark@tiger bash$ ld -exported_symbols_list ld: -exported_symbols_list: argument missing mark@leopard bash$ ld -exported_symbols_list ld: can't open -exported_symbols_list file: (null) Because the -exported_symbols_list was introduced to Apple ld in December 2002 (a Jaguar (10.2) Developer Tools release), and our minimum build requirement even on the 1.8 branch is 10.3 where all versions of ld support this option, there is no reason to even continue performing this check. We should assume that the option exists in ld and use it outright.
Assignee: nobody → mark
Status: NEW → ASSIGNED
Attachment #288054 - Flags: review?(ted.mielczarek)
On all currently-supported build systems (running Tiger and Panther), the configure check always passes, resulting in MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS being set and nmedit never being used. This patch is a no-op on those platforms. It's required to bring the build on Leopard in line with earlier releases. We'd like to take this patch on the 1.8 branch because that branch is still used for active Camino development, and our developers are moving to Leopard.
Attachment #288055 - Flags: review?(ted.mielczarek)
Attachment #288055 - Flags: approval1.8.1.10?
See also bug 403258.
Attachment #288055 - Flags: approval1.8.1.10? → approval1.8.1.11?
Comment on attachment 288054 [details] [diff] [review] Always use ld -exported_symbols_list, never use nmedit -s r=me Sorry for the delay!
Attachment #288054 - Flags: review?(ted.mielczarek) → review+
Attachment #288055 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 288054 [details] [diff] [review] Always use ld -exported_symbols_list, never use nmedit -s Needed for Leopard build compatibility.
Attachment #288054 - Flags: approval1.9?
Attachment #288054 - Flags: approval1.9? → approval1.9+
Checked in on the trunk.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment on attachment 288055 [details] [diff] [review] 1.8 branch version approved for 1.8.1.12, a=dveditz for release-drivers Please land ASAP so we can validate this doesn't break our builds
Attachment #288055 - Flags: approval1.8.1.12? → approval1.8.1.12+
Checked in on MOZILLA_1_8_BRANCH for 1.8.1.12.
Keywords: fixed1.8.1.12
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: