Closed Bug 216022 Opened 21 years ago Closed 20 years ago

Unresolved reference when trying to compile static Firebird cvs

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vaidrius, Assigned: bryner)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.5b) Gecko/20030802 Mozilla Firebird/0.6.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.5b) Gecko/20030802 Mozilla Firebird/0.6.1

I've been trying to compile static MozFirebird cvs on redhat 9 this way:
# create ~/.mozconfig
export CVSROOT=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot"
cvs co mozilla/client.mk
cd mozilla
make -f client.mk checkout
make -f client.mk build

My .mozconfig:
export MOZ_PHOENIX=1
mk_add_options MOZ_PHOENIX=1
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --prefix=/opt/MozillaFirebird
ac_add_options --enable-crypto
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="-Os -march=k6-3 -pipe -fomit-frame-pointer"
ac_add_options --enable-default-toolkit=gtk2
ac_add_options
--enable-extensions=default,-inspector,-irc,-venkman,-content-packs,-help
ac_add_options --enable-plaintext-editor-only
ac_add_options --enable-strip
ac_add_options --enable-strip-libs
ac_add_options --enable-xft
ac_add_options --with-system-zlib
ac_add_options --with-system-jpeg
ac_add_options --with-system-png

I've got this error:
c++ -o MozillaFirebird-bin -Os -march=k6-3 -pipe -fomit-frame-pointer 
-I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion
-Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
-pedantic -Wno-long-long -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -Os
-march=k6-3 -pipe -fomit-frame-pointer  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 -lnsappshell -lchrome
-laccessibility -lfileview -lmozfind -lxremoteservice -lappcomps -ltoolkitcomps
-lcookie -lwallet -lwalletviewers -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/home/acrozy/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 -lpng  -ljpeg  -lz  
-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(.text+0x31d): In function `nsSystemPrefModule_NSGetmodule':
: undefined reference to `nsSystemPrefModule_gModuleInfo'

with --enable-static and --disable-shared removed, I successfully finish compiling.


Reproducible: Always

Steps to Reproduce:
Forgot to add,

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

$ rpm -q glibc
glibc-2.3.2-27.9
-> not a blocker

Have you tried pulling a completely clean tree?  Last time I ran into this, my
tree broke due to network issues.

Also, I'm not sure how well-supported all of those optimize options are
supported, especially -march.  If you build it using the default options in
http://lxr.mozilla.org/mozilla/source/browser/README.html along with the
static/shared options, does this work?
Severity: blocker → critical
Yeah, I've been trying several times with completely fresh tree. As for optimize
settings, they work perfectly for Mozilla, Firebird and Thunderbird for quite
long time. I have only 400mhz/192mb ram, so (re)compiling something from Mozilla
family is quite painful (meaning time). This error looks to me as flag-specific
(missing some liker flag to resolve this static-build-only reference, as name
might suggest). If you really think I should try with default configure options,
say so and I'll try.
I experience the same on another machine, running latest Gentoo Linux, same
mozconfig except for -march=pentium3.
*** Bug 216565 has been marked as a duplicate of this bug. ***
I just knocked my identical bug (216565) as identical to this one. I can also
confirm this case on RH linux 8 & 9, optimized for athlon xp sse or not
optimized at all. Now sure I have the 'confirm' attribute for bugs, but will
try. Ok, I guess I'm not allowed to confirm this, but I wish someone would. I
constantly forget to search for UNCONFIRMED when looking in bugzilla. 
what version of gcc is being used here?  I'm not sure what latest Gentoo uses,
and I'm pretty sure the native gcc in RH9 is 2.9x instead of GCC 3.3

Redhat 9:

gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)


I've tried the "latest"(I think) gentoo briefly as well. It used 3.2.x gcc or at
least had it aboard the install disk as one of the many options. 

gentoo recently switched to gcc 3.3.1+cvs, but I've been trying earlier with
3.2.3. Today I tried with latest Gentoo on Celeron 1.2GHz, but with same results
(no success):

$ gcc -v

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/specs

Configured with: /home/portage/gcc-3.3.1-r1/work/gcc-3.3.1/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3
--includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared
--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib
--enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix
--enable-long-long --disable-checking --enable-cstdio=stdio
--enable-clocale=generic --enable-__cxa_atexit
--enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/include/g++-v3
--with-local-prefix=/usr/local --enable-shared --enable-nls
--without-included-gettext --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib --enable-interpreter --enable-java-awt=xlib
--with-x --disable-multilib

Thread model: posix

gcc version 3.3.1 20030904 (Gentoo Linux 3.3.1-r1, propolice)

QA Contact: asa
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attached patch suggested fixSplinter Review
We need to compile the NS_GETMODULE implementation in the same directory where
IS_COMPONENT is set, or we'll fail to translate the entry point.  This patch
moves compilation of nsSystemPrefFactory.cpp to gconf/Makefile.in.
Attachment #134127 - Flags: review?(cls)
Attachment #134127 - Flags: review?(cls) → review+
Brian,

I've been trying to make this a few times after applying your patch. Here's my
typical result:

gcc -I/usr/X11R6/include -Wall -W -Wno-unused -Wpointer-arith -Wcast-align
-Wno-long-long -pedantic -pthread -pipe  -DNDEBUG -DTRIMMED -O3 -march=athlon-xp
-msse -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include      -o
../../../../../config/nsinstall ../../../../../config/nsinstall.c
/tmp/ccKmKQDp.o(.text+0x16): In function `copydir':
: undefined reference to `xbasename'
/tmp/ccKmKQDp.o(.text+0x36): In function `copydir':
: undefined reference to `xmalloc'
/tmp/ccKmKQDp.o(.text+0x129): In function `copydir':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0x14d): In function `copydir':
: undefined reference to `xmalloc'
/tmp/ccKmKQDp.o(.text+0x15f): In function `copydir':
: undefined reference to `xmalloc'
/tmp/ccKmKQDp.o(.text+0x3a0): In function `main':
: undefined reference to `program'
/tmp/ccKmKQDp.o(.text+0x485): In function `main':
: undefined reference to `program'
/tmp/ccKmKQDp.o(.text+0x4a8): In function `main':
: undefined reference to `program'
/tmp/ccKmKQDp.o(.text+0x63f): In function `main':
: undefined reference to `xchdir'
/tmp/ccKmKQDp.o(.text+0x667): In function `main':
: undefined reference to `xchdir'
/tmp/ccKmKQDp.o(.text+0x705): In function `main':
: undefined reference to `xbasename'
/tmp/ccKmKQDp.o(.text+0x721): In function `main':
: undefined reference to `xmalloc'
/tmp/ccKmKQDp.o(.text+0x855): In function `main':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0x87d): In function `main':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0x8eb): In function `main':
: undefined reference to `xmalloc'
/tmp/ccKmKQDp.o(.text+0x9d0): In function `main':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0xa81): In function `main':
: undefined reference to `xmalloc'
/tmp/ccKmKQDp.o(.text+0xabe): In function `main':
: undefined reference to `reversepath'
/tmp/ccKmKQDp.o(.text+0xacc): In function `main':
: undefined reference to `xchdir'
/tmp/ccKmKQDp.o(.text+0xafb): In function `main':
: undefined reference to `relatepaths'
/tmp/ccKmKQDp.o(.text+0xb46): In function `main':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0xc7d): In function `main':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0xce1): In function `main':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0xd27): In function `main':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0xd76): In function `main':
: undefined reference to `program'
/tmp/ccKmKQDp.o(.text+0xff2): In function `copyfile':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0x1090): In function `copyfile':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0x10a5): In function `copyfile':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0x10c3): In function `copyfile':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0x1110): In function `copyfile':
: undefined reference to `fail'
/tmp/ccKmKQDp.o(.text+0x1128): more undefined references to `fail' follow
collect2: ld returned 1 exit status
gmake[6]: *** [../../../../../config/nsinstall] Error 1
gmake[6]: Leaving directory
`/d2/src/firebird/mozilla/extensions/pref/system-pref/src/gconf'
gmake[5]: *** [export] Error 2
gmake[5]: Leaving directory
`/d2/src/firebird/mozilla/extensions/pref/system-pref/src'
gmake[4]: *** [export] Error 2
gmake[4]: Leaving directory `/d2/src/firebird/mozilla/extensions/pref/system-pref'
gmake[3]: *** [export] Error 2
gmake[3]: Leaving directory `/d2/src/firebird/mozilla/extensions/pref'
gmake[2]: *** [export] Error 2
gmake[2]: Leaving directory `/d2/src/firebird/mozilla/extensions'
gmake[1]: *** [tier_94] Error 2
gmake[1]: Leaving directory `/d2/src/firebird/mozilla'
make: *** [default] Error 2

-----

I can't recall a fb build ever looking for anything in /tmp before, so I'm
wondering if its something to do with the directory syntax of your last 4 line
addition to Makefile.in? I've attempted to modify it to represent what I thought
was the intent but just don't yet know enough about the Makefile syntax. 
I had a successful firebird compile with this patch yesterday.  Here's my
.mozconfig:

ac_add_options --disable-composer
ac_add_options --disable-debug
ac_add_options --disable-ldap
ac_add_options --disable-mailnews
ac_add_options --disable-tests
ac_add_options --disable-shared
ac_add_options --enable-static
ac_add_options --enable-crypto
ac_add_options
--enable-extensions=default,-inspector,-irc,-venkman,-content-packs,-help
ac_add_options --enable-optimize="-O2 -march=pentium3 -msse -mmmx -mfpmath=sse
-pipe -fomit-frame-pointer"
ac_add_options --enable-xft
ac_add_options --enable-xinerama
ac_add_options --enable-default-toolkit=gtk2
export MOZ_PHOENIX=1
mk_add_options MOZ_PHOENIX=1

Everything works ok except firebird's default font is missing, I get this error
when starting:

Fontconfig error: line 1: unknown encoding
Fontconfig error: Cannot load default config file

I'm still new to compiling Firebird so I don't know what could be causing this
although my guess would be something with xft.

One more thing, I compiled as root, so that may have masked any directory
permission problems.
I got past my patching problem (had to manually specify both patch files), and
was also able to build static firebird, and able to confirm #12's error. I had
the identical errors about fontconfig as ./MozillaFirebird crashed back to prompt. 

This was with my old .profile deleted (on linux) and installed into a new
directory. I'm running RH9, and the 'disable-static' version of this code runs
without much problem. 
No idea if this is of any use, and unfortunately I can't do a pmap of the static
build, but this is a pmap of the non-static build, same day, and anything I
could find that related to fontconfig. 

--


# pmap 16713|grep -i font
40703000 (132 KB)      r-xp (03:06 344274)   /usr/lib/libfontconfig.so.1.0
40724000 (12 KB)       rw-p (03:06 344274)   /usr/lib/libfontconfig.so.1.0
43889000 (72 KB)       r--p (03:06 606922)  
/usr/X11R6/lib/X11/fonts/Type1/l048013t.pfa
4389b000 (92 KB)       r--p (03:06 606930)  
/usr/X11R6/lib/X11/fonts/Type1/l049013t.pfa
438e7000 (92 KB)       r--p (03:06 606932)  
/usr/X11R6/lib/X11/fonts/Type1/l049016t.pfa
43b0f000 (76 KB)       r--p (03:06 606914)  
/usr/X11R6/lib/X11/fonts/Type1/l047013t.pfa
453c1000 (104 KB)      r--p (03:06 606934)  
/usr/X11R6/lib/X11/fonts/Type1/l049033t.pfa
4cc3c000 (72 KB)       r--p (03:06 606926)  
/usr/X11R6/lib/X11/fonts/Type1/l048033t.pfa
The source I was using was from the Firebird 0.7 download page
(http://texturizer.net/firebird/download.html).  I created a new directory and
pulled a new source from cvs.  Then I compile as a normal user using the
.mozconfig in comment #12.  Without the patch, it fails.  With the patch, it
compiles correctly.  I don't see any /tmp problem like in comment #11, but I
still get the font problem.
checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
I can confirm the fonts problem, seems like this patch makes a regression.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Its not clear to me that this bug isn't fixed, but its pretty clear that there's
another bug that wasn't known of until we could build firebird static in linux.
I'd tend to say that the bug described in the summary line above has been
solved, and that one of us should start another bug about how it doesn't run
unless gnome is installed (not just GConf2 & libgnome) and unless that weird
font it uses is present. 

Here's some things I tried this morning:

I'd found out that my installing the full gnome 2.4 distribution (or maybe any
gnome full distribution that static firebird would actually run, but would spit
out that error and then use some other font for it's 'system' font. (menu's etc)

I did an install of fedora .95 + all the updates (gcc 3.2.2, etc) on this
system. Now I can make and run the static builds, but I really think all that
was needed for me was to install gnome on my RH9 setup. From my
investigations(way too strong of a word) of static builds, they use these fonts
as system, or at least these are the fonts that're different when running a
linux static build of FB using the exact same prefs.js (that had fonts specified
that aren't as below) in the profile that existed during the same day's dynamic
build.

41ef4000 60K r--p /usr/share/fonts/bitstream-vera/VeraBd.ttf
42fce000 68K r--p /usr/share/fonts/bitstream-vera/Vera.ttf
42fdf000 76K r--p /usr/share/fonts/bitmap-fonts/lutRS12.pcf
447be000 56K r--p /usr/share/fonts/bitstream-vera/VeraMoBI.ttf

Another thing of interest is that it specifically uses some piece of the gnome
desktop that I don't have on my other system (which doesn't have gnome). The
only way I could get this static build to run at all and find the fonts was by
installing gnome 2.4 completely. I don't have to run it, but it has to be there.

So, my dynamic builds use as their system font(or whatever you call the font
that draws the actual menu entries, etc) this:
-43b54000 (268 KB) r--p /usr/share/fonts/bitmap-fonts/6x12.pcf

And the static build uses this one:
42fdf000 76K r--p /usr/share/fonts/bitmap-fonts/lutRS12.pcf

The other thing about static is that it defaults to using fonts that're all from
/usr/share/fonts/... whereas the dynamic build I'm using defaults to using fonts
from the typical X11 spot, or /usr/X11R6/lib/X11/fonts/..

I just got back and got this going, but I haven't yet been able to debug why
this happens. (and I may not be able to debug it regardless since the static
debug building process uses 95% of my gb swapfile). 

Possibly someone with a decent knowlege of the ways of the gnome desktop can
figure it out just by glancing at the info in this note. I've got a running copy
of this thing if full pmaps (or other info) are desired. 
(In reply to comment #18)
> I'd tend to say that the bug described in the summary line above has been
> solved, and that one of us should start another bug about how it doesn't run
> unless gnome is installed (not just GConf2 & libgnome) and unless that weird
> font it uses is present. 

Yes, open a bug on the new problem.  Don't morph the bug report, especially
after the original problem has been fixed.
Status: REOPENED → RESOLVED
Closed: 21 years ago20 years ago
Resolution: --- → FIXED
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: