Closed
Bug 401768
Opened 17 years ago
Closed 17 years ago
[10.5] Can't build with gcc 3.3 and an SDK on Leopard
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mark, Assigned: mark)
Details
(Keywords: fixed1.8.1.10)
Attachments
(3 files, 4 obsolete files)
3.48 KB,
patch
|
wtc
:
review+
|
Details | Diff | Splinter Review |
2.67 KB,
patch
|
ted
:
review+
dveditz
:
approval1.8.1.10+
|
Details | Diff | Splinter Review |
941 bytes,
patch
|
wtc
:
review+
dveditz
:
approval1.8.1.12-
|
Details | Diff | Splinter Review |
We still use gcc 3.3 with an SDK for the ppc build on the 1.8 branch.
The 1.8 branch is still active for development for Camino 1.6 The 1.8 branch doesn't build on Leopard without the use of an SDK, so this bug effectively breaks development of Camino on PowerPC systems, and frustrates the development of universal builds of Camino on any system.
The build (first?) fails in NSPR:
gcc-3.3 -arch ppc -L/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/darwin -L/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/darwin/3.3 -L/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib -F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks -F/Developer/SDKs/MacOSX10.3.9.sdk/Library/Frameworks -dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/libnspr4.dylib -headerpad_max_install_names -o libnspr4.dylib ./prvrsion.o io/./prfdcach.o io/./prmwait.o io/./prmapopt.o io/./priometh.o io/./pripv6.o io/./prlayer.o io/./prlog.o io/./prmmap.o io/./prpolevt.o io/./prprf.o io/./prscanf.o io/./prstdio.o threads/./prcmon.o threads/./prrwlock.o threads/./prtpd.o linking/./prlink.o malloc/./prmem.o md/./prosdep.o memory/./prshm.o memory/./prshma.o memory/./prseg.o misc/./pralarm.o misc/./pratom.o misc/./prcountr.o misc/./prdtoa.o misc/./prenv.o misc/./prerr.o misc/./prerror.o misc/./prerrortable.o misc/./prinit.o misc/./prinrval.o misc/./pripc.o misc/./prlog2.o misc/./prlong.o misc/./prnetdb.o misc/./prolock.o misc/./prrng.o misc/./prsystem.o misc/./prthinfo.o misc/./prtpool.o misc/./prtrace.o misc/./prtime.o malloc/./prmalloc.o pthreads/./ptsynch.o pthreads/./ptio.o pthreads/./ptthread.o pthreads/./ptmisc.o md/unix/./unix.o md/unix/./unix_errors.o md/unix/./uxproces.o md/unix/./uxrng.o md/unix/./uxshm.o md/unix/./uxwrap.o md/unix/./darwin.o md/unix/./os_Darwin_ppc.o -framework CoreServices -framework CoreFoundation
ld: file not found: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore
/usr/bin/libtool: internal link edit command failed
make[6]: *** [libnspr4.dylib] Error 1
make[6]: Leaving directory `/lizard/1.8/build/camino-universal-static/ppc/nsprpub/pr/src'
make[5]: *** [export] Error 2
make[5]: Leaving directory `/lizard/1.8/build/camino-universal-static/ppc/nsprpub/pr'
make[4]: *** [export] Error 2
make[4]: Leaving directory `/lizard/1.8/build/camino-universal-static/ppc/nsprpub'
make[3]: *** [nspr] Error 2
make[3]: Leaving directory `/lizard/1.8/build/camino-universal-static/ppc'
make[2]: *** [alldep] Error 2
make[2]: Leaving directory `/lizard/1.8/build/camino-universal-static/ppc'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/lizard/1.8/mozilla'
make: *** [alldep] Error 2
make: Leaving directory `/lizard/1.8/mozilla'
In the above example, NEXT_ROOT is set to /Developer/SDKs/MacOSX10.3.9.sdk, which was supposed to inform ld to use that directory as its root system library directory instead of /. Unfortunately, when using NEXT_ROOT, this only appears to be effective for libraries specified on the command line. Dependencies are still sought as though they were /-relative. In this case, the CoreServices framework at /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices depends on WebServicesCore, but WebServicesCore doesn't exist per se on Mac OS X 10.5: its exports have been merged into CoreServices.framework/Frameworks/OSServices.framework. A copy of WebServicesCore does exist in the 10.3.9 SDK at /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore, but because ld is not using the SDK to look up dependencies, it doesn't find this framework.
When ld is invoked with -syslibroot, it is able to properly resolve library dependencies.
Note the following (NSPR and core):
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/nsprpub/configure.in&rev=1.199.2.14&mark=1048-1061#1048
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/configure.in&rev=1.1503.2.105&mark=678-684#678
We should fix this bug by using -Wl,-syslibroot,$MACOS_SDK_DIR in $LIBS in NSPR and $MACOS_SDK_LIBS in core. We should only do this if the build host is Leopard, to avoid invasive changes to the build infrastructure on other build hosts. (ld -syslibroot support was only introduced in Tiger's build tools, so we will need to check the build hosts's support in any event, as the 1.8 branch still supports Panther build hosts.)
I don't believe it's necessary to fix this bug on the trunk in the core, because we don't support gcc 3.3 for Mac there any longer. Any 3.3 build config support stuff on the trunk is a candidate for removal anyway.
I don't know what NSPR's needs and requirements are outside of Mozilla client use. Wan-Teh, on what branches do you think it's appropriate to patch NSPR for this bug? For Camino development, we need to fix this on the NSPR branch that MOZILLA_1_8_BRANCH uses (and wait for a new NSPR tag?)
Assignee | ||
Comment 1•17 years ago
|
||
In this case, we will need to leave NEXT_ROOT set in the environment because it's also used by the compiler, and there's too much work involved in going through to make sure that compiler invocations set NEXT_ROOT on the command line while linker invocations use -syslibroot instead.
Using both NEXT_ROOT and -syslibroot will result in these (harmless) warnings being printed at each linker invocation:
/usr/bin/libtool: NEXT_ROOT environment variable ignored because -syslibroot specified
Assignee | ||
Comment 2•17 years ago
|
||
This patch was generated against NSPR_4_6_7_RTM, as that's the tag that MOZILLA_1_8_BRANCH currently pulls.
Attachment #286742 -
Flags: review?(wtc)
Assignee | ||
Comment 3•17 years ago
|
||
The same patch is needed in the core.
These two patches were all that I needed to successfully complete a statically linked x86-to-ppc cross build of Camino using the 10.3.9 SDK.
Attachment #286746 -
Flags: review?(ted.mielczarek)
Assignee | ||
Comment 4•17 years ago
|
||
This one has a working regex pattern. Patch is against NSPR_4_6_7_RTM.
Attachment #286742 -
Attachment is obsolete: true
Attachment #286748 -
Flags: review?(wtc)
Attachment #286742 -
Flags: review?(wtc)
Assignee | ||
Comment 5•17 years ago
|
||
Patch is against MOZILLA_1_8_BRANCH.
Attachment #286746 -
Attachment is obsolete: true
Attachment #286749 -
Flags: review?(ted.mielczarek)
Attachment #286746 -
Flags: review?(ted.mielczarek)
Assignee | ||
Comment 6•17 years ago
|
||
Oh, man, today is NOT my day!
Attachment #286748 -
Attachment is obsolete: true
Attachment #286751 -
Flags: review?(wtc)
Attachment #286748 -
Flags: review?(wtc)
Assignee | ||
Comment 7•17 years ago
|
||
Attachment #286749 -
Attachment is obsolete: true
Attachment #286752 -
Flags: review?(ted.mielczarek)
Attachment #286749 -
Flags: review?(ted.mielczarek)
Comment 8•17 years ago
|
||
Comment on attachment 286751 [details] [diff] [review]
NSPR patch
r=wtc. Mark, we only need to fix this bug on NSPR_4_6_BRANCH and
the NSPR trunk. Thanks for the patch.
Attachment #286751 -
Flags: review?(wtc) → review+
Updated•17 years ago
|
Attachment #286752 -
Flags: review?(ted.mielczarek) → review+
Assignee | ||
Comment 9•17 years ago
|
||
Comment on attachment 286751 [details] [diff] [review]
NSPR patch
Great, this patch applies as-is (with an offset) on the NSPR trunk. Since the NSPR directories are under restricted despot control, Wan-Teh, can you check this patch into the NSPR trunk and 4.6 branch for me?
Assignee | ||
Comment 10•17 years ago
|
||
Comment on attachment 286752 [details] [diff] [review]
Core patch
Requesting approval1.8.1.10 for the core patch.
This patch is required for developers using Leopard and working on the 1.8 branch. Camino still has active development on this branch, so we need to take this patch. It's purposely crafted to avoid changing anything at all on pre-10.5 systems, limiting risk. There's no equivalent trunk patch because the trunk no longer supports gcc 3.3 on Mac.
Attachment #286752 -
Flags: approval1.8.1.10?
Comment 11•17 years ago
|
||
Comment on attachment 286751 [details] [diff] [review]
NSPR patch
I checked in the NSPR patch on the NSPR trunk (NSPR 4.7) and NSPR_4_6_BRANCH
(NSPR 4.6.8).
Assignee | ||
Comment 12•17 years ago
|
||
Thanks, Wan-Teh. Let us know when NSPR 4.6.8 is released and tagged, since we'll want it for the 1.8 branch.
Comment 13•17 years ago
|
||
(In reply to comment #12)
> Thanks, Wan-Teh. Let us know when NSPR 4.6.8 is released and tagged, since
> we'll want it for the 1.8 branch.
How quickly do you need it?
Should this requirement push us to do the next release soon?
Assignee | ||
Comment 14•17 years ago
|
||
I'd like to get it in for 1.8.1.10 along with the core patch on this bug, but since the 1.8.1 drivers currently aren't doing approvals for 1.8.1.10 due to the 1.8.1.9 firedrill, it's not terribly urgent.
Comment 15•17 years ago
|
||
Mark, could you review NSS's coreconf build system and see if it
needs to be updated? Thanks.
http://lxr.mozilla.org/mozilla1.8/source/security/coreconf/Darwin.mk
Assignee | ||
Comment 16•17 years ago
|
||
Wan-Teh, I purposely didn't make any changes to NSS because NSS doesn't attempt to link against any of the affected libraries. This problem only existed in NSPR and the Mozilla core because both contain components that link against CoreServices, and older versions of CoreServices had dependencies that no longer exist in 10.5. The problem is purely one of link-time dependency resolution and has no impact on linker output. That said, if you'd like, I can prepare a patch for NSS too, to make its behavior more technically correct, and to guard against possible future library dependency changes in 10.6 and beyond like the CoreServices change in 10.5.
Comment 17•17 years ago
|
||
Mark, that would be nice but has a lower priority. No hurry.
Since I thought of this potential issue after we built our NSS 3.11.8
release candidate last night, I just wanted to know if we missed anything.
Assignee | ||
Comment 18•17 years ago
|
||
Bug 402242 for NSS build changes.
Comment 19•17 years ago
|
||
Comment on attachment 286752 [details] [diff] [review]
Core patch
approved for 1.8.1.10, a=dveditz for release-drivers
Attachment #286752 -
Flags: approval1.8.1.10? → approval1.8.1.10+
Assignee | ||
Comment 20•17 years ago
|
||
I checked in the core patch for 1.8.1.10.
Wan-Teh, there's no tag for NSPR 4.6.8 yet, although I thought you had released it. Will this be ready soon? I want to update client.mk to pull from an NSPR tag with this fix.
Keywords: fixed1.8.1.10
Comment 21•17 years ago
|
||
Mark, NSPR 4.6.8 is undergoing release testing now. I will let you
know when we create the NSPR_4_6_8_RTM tag.
Comment 22•17 years ago
|
||
Mark, can you try build from the branch to verify that this is now fixed?
Al, we're waiting on the new NSPR tag here (see comment 20 and 21), and then the client.mk change to make Mozilla pick that up.
Comment 24•17 years ago
|
||
You can use the NSPR_4_6_8_RTM tag now.
Assignee | ||
Comment 25•17 years ago
|
||
We need to move the 1.8 branch from NSPR 4.6.7 to 4.6.8 in order to pick up the NSPR portion of this patch (and also bug 401813). The differences between NSPR 4.6.7 and 4.6.8 can be viewed with:
cvs diff -u8 -r NSPR_4_6_7_RTM -r NSPR_4_6_8_RTM mozilla/nsprpub
Attachment #290717 -
Flags: review?
Attachment #290717 -
Flags: approval1.8.1.12?
Assignee | ||
Updated•17 years ago
|
Attachment #290717 -
Flags: review? → review?(wtc)
Comment 26•17 years ago
|
||
Comment on attachment 290717 [details] [diff] [review]
Use NSPR 4.6.8 on MOZILLA_1_8_BRANCH
r=wtc.
Attachment #290717 -
Flags: review?(wtc) → review+
Assignee | ||
Comment 27•17 years ago
|
||
Note that this bug is not yet marked FIXED because it's targeted at the 1.8 branch only, and I'm waiting for the final 1.8 branch checkin (attachment 290717 [details] [diff] [review]).
Comment 28•17 years ago
|
||
Comment on attachment 290717 [details] [diff] [review]
Use NSPR 4.6.8 on MOZILLA_1_8_BRANCH
Don't want to approve an NSPR upgrade buried in another bug. Please file a new "upgrade NSPR on the branch" bug and make this one depend on it.
Several other changes appear to have gone into NSPR and we'll need to evaluate the overall risk v. reward (where "build on leopard" is not that great a reward when there's risk involved).
Attachment #290717 -
Flags: approval1.8.1.12? → approval1.8.1.12-
Assignee | ||
Comment 29•17 years ago
|
||
Bug 408755 for comment 28.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•