Closed Bug 323348 Opened 19 years ago Closed 19 years ago

build error libwidget_mac.dylib(widget/src/mac) - dynamic build only

Categories

(Firefox Build System :: General, defect)

PowerPC
macOS
defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: sugar.waffle, Assigned: mark)

Details

Build was unquestionably completed until January 10. (The latest checkout date of source in which build succeeds is 2006 January 10 10:05 JST.) The same error occurs as follows by Thunderbird and SeaMonkey. Mac OS X 10.3.9 build error message: c++ -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -Os -mcpu=7400 -fpascal-strings -no-cpp-precomp -fno-common -fshort-wchar -I/Developer/Headers/FlatCarbon -pipe -DNDEBUG -DTRIMMED -Os -mcpu=7400 -fPIC -arch ppc -o libwidget_mac.dylib nsAppShell.o nsBidiKeyboard.o nsChildWindow.o nsClipboard.o nsDeleteObserver.o nsDragService.o nsDragHelperService.o nsFilePicker.o nsLookAndFeel.o nsMacEventHandler.o nsMacMessagePump.o nsMacResources.o nsMacTSMMessagePump.o nsMacWindow.o nsMenuX.o nsMenuBarX.o nsMenuItemX.o nsMimeMapper.o nsSound.o nsTSMStrategy.o nsToolkitBase.o nsToolkit.o nsWidgetFactory.o nsWindow.o nsMacNativeUnicodeConverter.o nsStylClipboardUtils.o nsMacControl.o nsNativeScrollbar.o nsRepeater.o nsWatchTask.o nsBaseWidget.o nsTransferable.o nsHTMLFormatConverter.o nsBaseDragService.o nsPrimitiveHelpers.o nsXPLookAndFeel.o nsClipboardHelper.o nsWidgetAtoms.o nsBaseClipboard.o nsBaseFilePicker.o -Wl,-dead_strip -framework QuickTime -framework IOKit ../../../dist/lib/libunicharutil_s.a -framework Carbon -L../../../dist/bin -lxpcom -lxpcom_core -L../../../dist/bin -L../../../dist/lib -lplds4 -lplc4 -lnspr4 -lgkgfx -Wl,-exported_symbols_list -Wl,../../../build/unix/gnu-ld-scripts/components-export-list -bundle -lm ld: warning -prebind has no effect with -bundle ld: /usr/lib/gcc/darwin/3.3/libstdc++.a(eh_personality.o) illegal reference to symbol: ___cxa_begin_catch defined in indirectly referenced dynamic library /usr/lib/libstdc++.6.dylib ld: warning multiple definitions of symbol _PL_ArenaAllocate ../../../dist/bin/libplds4.dylib(plarena.o) definition of _PL_ArenaAllocate /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(plarena.o) definition of _PL_ArenaAllocate ld: warning multiple definitions of symbol _PL_InitArenaPool ../../../dist/bin/libplds4.dylib(plarena.o) definition of _PL_InitArenaPool /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(plarena.o) definition of _PL_InitArenaPool ld: warning multiple definitions of symbol _PL_FreeArenaPool ../../../dist/bin/libplds4.dylib(plarena.o) definition of _PL_FreeArenaPool /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(plarena.o) definition of _PL_FreeArenaPool ld: warning multiple definitions of symbol _PL_FinishArenaPool ../../../dist/bin/libplds4.dylib(plarena.o) definition of _PL_FinishArenaPool /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(plarena.o) definition of _PL_FinishArenaPool ld: warning multiple definitions of symbol _PL_ArenaRelease ../../../dist/bin/libplds4.dylib(plarena.o) definition of _PL_ArenaRelease /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(plarena.o) definition of _PL_ArenaRelease ld: warning multiple definitions of symbol _PL_ArenaGrow ../../../dist/bin/libplds4.dylib(plarena.o) definition of _PL_ArenaGrow /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(plarena.o) definition of _PL_ArenaGrow ld: warning multiple definitions of symbol _PL_ArenaFinish ../../../dist/bin/libplds4.dylib(plarena.o) definition of _PL_ArenaFinish /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(plarena.o) definition of _PL_ArenaFinish ld: warning multiple definitions of symbol _PL_CompactArenaPool ../../../dist/bin/libplds4.dylib(plarena.o) definition of _PL_CompactArenaPool /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(plarena.o) definition of _PL_CompactArenaPool ld: warning multiple definitions of symbol _PR_GetError ../../../dist/bin/libnspr4.dylib(prerror.o) definition of _PR_GetError /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_GetError ld: warning multiple definitions of symbol _PR_Free ../../../dist/bin/libnspr4.dylib(prmem.o) definition of _PR_Free /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_Free ld: warning multiple definitions of symbol _PR_DestroyLock ../../../dist/bin/libnspr4.dylib(ptsynch.o) definition of _PR_DestroyLock /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_DestroyLock ld: warning multiple definitions of symbol _PR_Calloc ../../../dist/bin/libnspr4.dylib(prmem.o) definition of _PR_Calloc /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_Calloc ld: warning multiple definitions of symbol _PR_Realloc ../../../dist/bin/libnspr4.dylib(prmem.o) definition of _PR_Realloc /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_Realloc ld: warning multiple definitions of symbol _PR_NewLock ../../../dist/bin/libnspr4.dylib(ptsynch.o) definition of _PR_NewLock /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_NewLock ld: warning multiple definitions of symbol _PR_Malloc ../../../dist/bin/libnspr4.dylib(prmem.o) definition of _PR_Malloc /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_Malloc ld: warning multiple definitions of symbol _PR_Lock ../../../dist/bin/libnspr4.dylib(ptsynch.o) definition of _PR_Lock /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_Lock ld: warning multiple definitions of symbol _PR_CeilingLog2 ../../../dist/bin/libnspr4.dylib(prlog2.o) definition of _PR_CeilingLog2 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_CeilingLog2 ld: warning multiple definitions of symbol _PR_GetOSError ../../../dist/bin/libnspr4.dylib(prerror.o) definition of _PR_GetOSError /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_GetOSError ld: warning multiple definitions of symbol _PR_Unlock ../../../dist/bin/libnspr4.dylib(ptsynch.o) definition of _PR_Unlock /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_Unlock ld: warning multiple definitions of symbol _PR_SetError ../../../dist/bin/libnspr4.dylib(prerror.o) definition of _PR_SetError /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(nsprPortX.o) definition of _PR_SetError make[5]: *** [libwidget_mac.dylib] Error 1 make[5]: Leaving directory `/Users/sek/Documents/mozilla-current/18m/mozilla/widget/src/mac'
Hmm, what are your configure options (ie .mozconfig settings)? I don't see the error building 1.8 seamonkey with sources from 1600 CET jan 13 (0700 PST).
Build of trunk Firefox reproduced. .moziconfig is as follows. .mozconfig of trunk Firefox ----------------------------- ac_add_options --enable-application=browser ac_add_options --enable-strip ac_add_options --enable-crypto ac_add_options --enable-optimize="-Os -mcpu=7400" ac_add_options --enable-prebinding ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --disable-dtd-debug ac_add_options --disable-jsd ac_add_options --disable-ldap ac_add_options --disable-logging ac_add_options --disable-mailnews ac_add_options --disable-composer ac_add_options --enable-plaintext-editor-only ac_add_options --disable-negotiateauth ac_add_options --disable-webservices ac_add_options --disable-gnomevfs ac_add_options --enable-extensions=cookie,inspector,permissions ac_add_options --disable-logrefcnt ac_add_options --disable-profilesharing ac_add_options --disable-mathml ac_add_options --disable-accessibility ac_add_options --disable-installer #ac_add_options --disable-shared #ac_add_options --enable-static ac_add_options --enable-single-profile ac_add_options --disable-v1-string-abi ----------------------------- .moziconfig of 1.8branch Thunderbird ----------------------------- ac_add_options --enable-strip ac_add_options --enable-optimize="-Os -mcpu=7400" ac_add_options --enable-prebinding ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --disable-dtd-debug ac_add_options --disable-jsd ac_add_options --disable-logging ac_add_options --disable-logrefcnt ac_add_options --disable-profilesharing #ac_add_options --disable-shared #ac_add_options --enable-static ac_add_options --disable-v1-string-abi -----------------------------
Summary: [MOZILLA_1_8_BRANCH]: build error libwidget_mac.dylib(widget/src/mac) → build error libwidget_mac.dylib(widget/src/mac)
Lines you can removed without problem : For fx : ac_add_options --enable-crypto ac_add_options --disable-dtd-debug ac_add_options --disable-mailnews ac_add_options --disable-composer ac_add_options --disable-gnomevfs ac_add_options --enable-extensions=cookie,inspector,permissions ac_add_options --disable-logrefcnt ac_add_options --disable-profilesharing ac_add_options --disable-mathml ac_add_options --disable-accessibility ac_add_options --disable-installer #ac_add_options --disable-shared #ac_add_options --enable-static ac_add_options --enable-single-profile ac_add_options --disable-v1-string-abi For Thunderbird : ac_add_options --disable-dtd-debug ac_add_options --disable-jsd ac_add_options --disable-logging ac_add_options --disable-logrefcnt ac_add_options --disable-profilesharing #ac_add_options --disable-shared #ac_add_options --enable-static ac_add_options --disable-v1-string Here are my .mozconfig for fx, you can try them and tell us what is happening : ". $topsrcdir/browser/config/mozconfig # Options for 'configure' (same as command-line options). ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.3.9.sdk ac_add_options --enable-optimize="-Os -pipe -arch ppc" ac_add_options --enable-prebinding ac_add_options --enable-canvas ac_add_options --disable-shared ac_add_options --enable-static ac_add_options --enable-svg ac_add_options --disable-pedantic ac_add_options --enable-strip ac_add_options --disable-debug ac_add_options --disable-tests" and for thunderbird : ". $topsrcdir/mail/config/mozconfig # Options for 'configure' (same as command-line options). ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.3.9.sdk ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --enable-optimize="-Os -pipe -arch ppc" ac_add_options --enable-prebinding ac_add_options --disable-shared ac_add_options --enable-static ac_add_options --disable-pedantic ac_add_options --enable-strip"
The same error occurred though it tried with following .mozconfig. ----------------- . $topsrcdir/browser/config/mozconfig ac_add_options --enable-crypto ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --enable-optimize="-Os -pipe" ac_add_options --enable-strip ac_add_options --enable-prebinding ----------------- And in following .mozconfig, there was no problem. ----------------- . $topsrcdir/browser/config/mozconfig ac_add_options --enable-crypto ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --enable-optimize="-Os -pipe" ac_add_options --enable-strip ac_add_options --enable-prebinding ac_add_options --disable-shared ac_add_options --enable-static -----------------
There's no need to add --enable-crypto, it is built by default with the code. So, it looks like it is a dynamic building problem, because when you're using static build options, there is no problem at all. Tweaking summary in order to help bug triaging.
Summary: build error libwidget_mac.dylib(widget/src/mac) → build error libwidget_mac.dylib(widget/src/mac) - dynamic build only
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 1.8 Branch → Trunk
I've finally managed to fix this by adding ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.2.8.sdk to the mozconfig file.
This is odd. I updated my trunk tree by date as far back as Dec 25, 2005 & I still hit this problem. I grabbed the source tarballs for ff-1.5 & ff-1.0.7 and I'm hitting this problem there as well. I'm using OSX 10.3.9 too. Is it possible that we received a system update that is screwing up our builds? Note that my trunk OSX-X11 build went fine (crashes on startup though).
ld: /usr/lib/gcc/darwin/3.3/libstdc++.a(eh_personality.o) illegal reference to symbol: ___cxa_begin_catch defined in indirectly referenced dynamic library /usr/lib/libstdc++.6.dylib You're mixing compilers. gcc 3.3 uses a static libstdc++, gcc 4.0 uses the shared libstdc++.6. Please clean your tree and build again, using a single compiler.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Those builds were using clean trees (objdir builds). [soundwave:~] cls% gcc_select Current default compiler: gcc version 3.3 20030304 (Apple Computer, Inc. build 1666) [soundwave:~/src/moz/fix] cls% c++ -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs Thread model: posix gcc version 3.3 20030304 (Apple Computer, Inc. build 1666) [soundwave:~/src/moz/fix] cls% ld -v Apple Computer, Inc. version cctools-525.obj~1 [soundwave:~] cls% cat ~/.mozconfig-ff . $topsrcdir/browser/config/mozconfig #MOZ_INTERNAL_LIBART_LGPL=1 mk_add_options MOZ_INTERNAL_LIBART_LGPL=1 mk_add_options MOZ_PHOENIX=1 mk_add_options MOZ_THUNDERBIRD=1 mk_add_options MOZ_CO_MODULE="SeaMonkeyAll mozilla/tools/codesighs" mk_add_options MOZ_OBJDIR=@TOPSRCDIR_MOZ@/../obj-test ac_add_options --disable-debug ac_add_options --enable-optimize=-O2 ac_add_options --enable-crypto ac_add_options --with-system-zlib
Reopening for investigation
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Assignee: nobody → mark
Status: REOPENED → NEW
I notice that everyone is using the 10.3.9 SDK or is building on Panther without specifying a separate SDK, and are getting the default system SDK (10.3.9). This SDK contains a number of bugs and while I try to keep the build working with it, it's not really recommended. This is one reason the official tinderbuilders, which are almost all running Panther, still use the 10.2.8 SDK. I don't have easy access to a Panther machine now, the best I can do today is a test build on Tiger with 3.3 and the 10.3.9 SDK. I'm trying this now. I can look at it on a native Panther tomorrow.
Not seeing this in a 3.3/10.3.9 SDK build from Tiger. Can someone on Panther check to see if any of the dylibs libwidget_mac is including is linking against libstdc++.6.dylib? You can use "otool -L" on these dylibs to find out. If you get any hits, let's have a look at how those dylibs themselves are being linked.
Ok, I'll accept that. However, this problem hasn't been occuring since last April(?) when 10.3.9 came out so the flaky SDK can't be completely to blame. It just started recently. After digging around, it looks like one of the QuickTime updates may be ultimately to blame. [soundwave:moz/other/obj-opt-ff] cls% otool -L /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime | grep stdc /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) See also: http://www.macfixitforums.com/php/showflat.php?Cat=&Board=xutilities&Number=740124 I'll try downgrading QuickTime when I get home to see if that fixes the problem.
Hmm. I bet the QuickTime library in /Developer/SDKs/MacOSX10.3.9.sdk isn't linked against the dynamic libstdc++. Does the problem go away (or change) if you use that SDK instead of relying on the upgraded QuickTime library in /System?
FYI. In build of Camino, this problem doesn't occur. Camino is normally made with build of a dynamic link.
I don't seem to have a 10.3.9 sdk directory but building against the 10.3.0 sdk works. The build completes and launches fine. Camino works because the camino mozconfig is telling it to use the 10.2.8 sdk. Should we start defaulting to building against a specific sdk (10.2 or 10.3, I don't care) to avoid these /System library changes (which shouldn't happen anyway)?
Confirming QuickTime 7.0.3 on Panther isn't linked against libstdc++.6.dylib.
Documented: http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prerequisites#Troubleshooting I'm leaving this bug open for the time being as a reminder to myself to follow up with Apple. Other than that, it's probably invalid for our purposes, since it's not our bug and we've got a workaround. Thanks for your help, Chris. crot0 and Frederic, can you confirm?
Well, I am under Tiger 10.4.4 + QT 7.0.4, using XCode 2.2.1 (every single SDK installed) and SDK 10.4u I will try using SDK 10.3.9 and making a dynamic build if you want ;)
Build of Thunderbird was completed by 10.2.8SDK + dynamic link.
After adding a --with-macos-sdk to my .mozconfig and try to build using make -f client.mk build_all_depend, it gets as far as: checking for ANSI C header files... and then does not progress any further (left it over 8 hours) My .mozconfig is: # optimized mozconfig file for SeaMonkey on OSX CC=gcc CXX=g++ CPP=cpp AS=as LD=ld # the following options don't yet work under gcc-on-win32 ac_add_options --disable-accessibility ac_add_options --disable-activex mk_add_options MOZ_CO_PROJECT=suite ac_add_options --enable-application=suite mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/suite-opt ac_add_options --enable-optimize=-O2 ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.2.8.sdk ac_add_options --enable-crypto ac_add_options --enable-svg ac_add_options --enable-canvas
(In reply to comment #21) > CPP=cpp Don't set CPP unless you have a good reason to, and even then, don't set it to cpp, base your setting on "gcc -E". In fact, you don't need to set any of the tool variables at all for the build you're trying to do.
This is an Apple bug. rdar://4452199 . Resolving as INVALID because there's nothing we can do about it. Our workaround is to use an SDK (10.2.8 recommended, 10.3.0 will work) when building on 10.3.
Status: NEW → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → INVALID
Known issue.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.