If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Linking firebird using "--enable-static" option fails. (undefined reference to `nsSystemPrefModule_gModuleInfo in nsStaticComponents.o)

RESOLVED DUPLICATE of bug 216022

Status

()

Firefox
Build Config
RESOLVED DUPLICATE of bug 216022
14 years ago
14 years ago

People

(Reporter: Mickey Stein, Assigned: Brian Ryner (not reading))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030817 Mozilla Firebird/0.6.1+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030817 Mozilla Firebird/0.6.1+

When building Firebird with the --enable-static (see .mozconfig attached below
this comment) option, the build fails on the its 'final' step of linking
mozillafirebird-bin with the final lines:

c++ -o MozillaFirebird-bin -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall
-Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth
-Wno-ctor-dtor-privacy -Wno-long-long -pedantic -fshort-wchar -pthread -pipe 
-DNDEBUG -DTRIMMED -O3 -march=athlon-xp  nsBrowserApp.o nsStaticComponents.o   
 -L../../dist/bin -L../../dist/lib -L../../dist/lib/components -lxpcom_compat_c
-lxpconnect -luconv -lucvmath -li18n -loji -lipcdc -lnecko -lnecko2 -lpref
-lcaps -lrdf -lhtmlpars -lgfxps -lgfxxprint -lgfx_gtk -limglib2 -lgkplugin
-ljsdom -lwidget_gtk2 -lxremote_client -lgklayout -lmork -ldocshell -lprofile
-lnsprefm -lembedcomponents -lwebbrwsr -leditor -ltxmgr -lcomposer -lnsappshell
-lchrome -laccessibility -lfileview -lmozfind -lxremoteservice -lappcomps
-ltoolkitcomps -lcookie -lxmlextras -lp3p -lautoconfig -lsystem-pref
-ltransformiix -luniversalchardet -ltypeaheadfind -lwebsrvcs -lpipboot -lpipnss
-lpippki -lbrowsercomps -lunicharutil_s -lucvutil_s -ljsj -lgtkxtbin
-lgfxshared_s -lgfxft2_s -lxlibrgb -lxprintutil -lgkgfx -lxulapp_s
../../dist/lib/libxulapp_s.a -L../../dist/bin -lmozjs -L../../dist/bin -lxpcom 
-L/opt/src/firebird/mozilla/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl 
-Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm
-lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl
-lglib-2.0    -ldl -lm  -L../../dist/lib/components -L../../dist/lib -lmozpng
-L../../dist/lib -lmozjpeg -L../../dist/lib -lmozz  -L../../dist/bin
-L../../dist/lib ../../dist/lib/libcrmf.a -lsmime3 -lssl3 -lnss3 -lsoftokn3  
-L/usr/X11R6/lib -lXt -L/usr/X11R6/lib -lXp -lXext -lX11 -L../../dist/lib
-lxpcom_compat
nsStaticComponents.o: In function `nsSystemPrefModule_NSGetmodule':
nsStaticComponents.o(.text+0x569): undefined reference to
`nsSystemPrefModule_gModuleInfo'
collect2: ld returned 1 exit status
gmake[3]: *** [MozillaFirebird-bin] Error 1
gmake[3]: Leaving directory `/opt/src/firebird/mozilla/browser/app'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/opt/src/firebird/mozilla/browser'
gmake[1]: *** [tier_99] Error 2
gmake[1]: Leaving directory `/opt/src/firebird/mozilla'
make: *** [default] Error 2

This is the .mozconfig I'm using to build:
export MOZ_PHOENIX=1
export LD_LIBRARY_PATH=/usr/local
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
export GTK_CONFIG=/usr/bin/gtk-config
mk_add_options MOZ_PHOENIX=1
ac_add_options --enable-crypto
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-mailnews
ac_add_options --disable-composer
ac_add_options --disable-ldap
ac_add_options --enable-optimize="-O3 -march=athlon-xp"
ac_add_options
--enable-extensions=cookie,xml-rpc,xmlextras,p3p,pref,transformiix,universalchardet,typeaheadfind,webservices,inspector,venkman
ac_add_options --enable-jsd
ac_add_options --with-glib-prefix=/usr
ac_add_options --with-glib-exec-prefix=/usr
ac_add_options --with-libIDL-prefix=/usr/local
ac_add_options --with-libIDL-exec-prefix=/usr/local
ac_add_options --enable-xft
# try some stuff for static build
#export MOZ_FAT_EMBED=1
ac_add_options --enable-static
ac_add_options --disable-shared

-- 

Platform is Redhat 8, gcc v.3.2.2.
The builds work fine without the final two lines in my .mozconfig above (i.e. as
a non-static build).
This has been happening since I started building firebird (~ 2 months, from
01Jun2003 to the present (18AUG2003). The error is always as it appears above. 
I usually do a complete CVS co, followed by a cvs up -Pd mozilla/browser
mozilla/toolkit. In lieu of that, I pull down the latest tarball and do the cvs
up cmd on that. 

Is this important? Beats me since I've never seen a linux static build, but I'm
assuming that the static build will embed all or most of the .so libs into the
mozillafirebird-bin image making it quite large, and hopefully make the
application a bit more portable across linux platforms (although that's probably
wishful thinking). 

I looked at another bug concerning another missing symbol but only on the SUN
platform (187754) where there were a few theories along with the realization
that "export MOZ_FAT_EMBED=1" caused him to get past it. The other thought there
was that in the less full-to-the-brim version (no MOZ_FAT_EMBED) that in the
flurry of trimming down modules some vital sequence was broken (out of order). 



Reproducible: Always

Steps to Reproduce:
1. Use my .mozconfig file on RH8, gcc 3.2.
2. pull down latest source (well, up to 18Aug2003 is as far as I've tried)
3. ./configure, make. When it links mozillafirebird-bin the error occurs. 

Actual Results:  
errored out with:
c++ -o MozillaFirebird-bin -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall
-Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth
-Wno-ctor-dtor-privacy -Wno-long-long -pedantic -fshort-wchar -pthread -pipe 
-DNDEBUG -DTRIMMED -O3 -march=athlon-xp  nsBrowserApp.o nsStaticComponents.o   
 -L../../dist/bin -L../../dist/lib -L../../dist/lib/components -lxpcom_compat_c
-lxpconnect -luconv -lucvmath -li18n -loji -lipcdc -lnecko -lnecko2 -lpref
-lcaps -lrdf -lhtmlpars -lgfxps -lgfxxprint -lgfx_gtk -limglib2 -lgkplugin
-ljsdom -lwidget_gtk2 -lxremote_client -lgklayout -lmork -ldocshell -lprofile
-lnsprefm -lembedcomponents -lwebbrwsr -leditor -ltxmgr -lcomposer -lnsappshell
-lchrome -laccessibility -lfileview -lmozfind -lxremoteservice -lappcomps
-ltoolkitcomps -lcookie -lxmlextras -lp3p -lautoconfig -lsystem-pref
-ltransformiix -luniversalchardet -ltypeaheadfind -lwebsrvcs -lpipboot -lpipnss
-lpippki -lbrowsercomps -lunicharutil_s -lucvutil_s -ljsj -lgtkxtbin
-lgfxshared_s -lgfxft2_s -lxlibrgb -lxprintutil -lgkgfx -lxulapp_s
../../dist/lib/libxulapp_s.a -L../../dist/bin -lmozjs -L../../dist/bin -lxpcom 
-L/opt/src/firebird/mozilla/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl 
-Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm
-lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl
-lglib-2.0    -ldl -lm  -L../../dist/lib/components -L../../dist/lib -lmozpng
-L../../dist/lib -lmozjpeg -L../../dist/lib -lmozz  -L../../dist/bin
-L../../dist/lib ../../dist/lib/libcrmf.a -lsmime3 -lssl3 -lnss3 -lsoftokn3  
-L/usr/X11R6/lib -lXt -L/usr/X11R6/lib -lXp -lXext -lX11 -L../../dist/lib
-lxpcom_compat
nsStaticComponents.o: In function `nsSystemPrefModule_NSGetmodule':
nsStaticComponents.o(.text+0x569): undefined reference to
`nsSystemPrefModule_gModuleInfo'
collect2: ld returned 1 exit status
gmake[3]: *** [MozillaFirebird-bin] Error 1
gmake[3]: Leaving directory `/opt/src/firebird/mozilla/browser/app'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/opt/src/firebird/mozilla/browser'
gmake[1]: *** [tier_99] Error 2
gmake[1]: Leaving directory `/opt/src/firebird/mozilla'
make: *** [default] Error 2


Expected Results:  
linked successfully.

Since this is a bug or problem during a build phase, I doubt if any of the above
(like Talkback ID) are relevant. This just seems like something is out of whack
in the CVS tree. 

Of course: I tried to troubleshoot this myself, and followed the path of where
~./mozilla/config/static*.mk took me. I grepped for the unfound symbol, but its
only created via a Macro in nsStaticComponents.cpp.in thus is only found in
nsStaticComponents.o (which I suppose explains why the linker can't resolve it).
B eyond that I'm trying to figure out more about how static may be affecting
linux builds. 

I also wonder if anyone is having luck (recently) linking firebird static on the
linux platform?

Comment 1

14 years ago
Isn't this a duplicate of 216022?
(Reporter)

Comment 2

14 years ago
SilvereX,

Yes it is and thanks for pointing it out. Unfortunately when searching bugzilla,
I often forget to look for 'UNCONFIRMED' bugs. I'll try to mark this as dup of
216022 and then see if I can confirm his. 

Thanks.

*** This bug has been marked as a duplicate of 216022 ***
Severity: major → normal
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.