Closed Bug 213839 Opened 23 years ago Closed 17 years ago

Missing symbols when compiling current trunk on Woody (Debian) gcc 2.95.x GetContent__C8nsIFrame

Categories

(Core Graveyard :: GFX: Gtk, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jr, Assigned: blizzard)

References

Details

(Keywords: crash)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030317 Debian/1.3-1 Build Identifier: The following error occurs when Mozilla 1.4 or the current CVS version compiled on Debian GNU/Linux 3.0r3 i386 (gcc 2.95.4 and libgtk 1.2.10) is launched: ... WARNING: dependent window created without a parent, file nsWindowCreator.cpp, line 128 GFX: dpi=79 t2p=0.0555556 p2t=18 depth=16 we don't handle eBorderStyle_close yet... please fix me WEBSHELL+ = 1 LoadPlugin() /home/jre/devel/mozilla-cvs/mozilla/modules/plugin/samples/default/unix/libnullplugin.so returned 823eea8 GetMIMEDescription() returned "*:.*:All types" Note: verifyreflow is disabled Note: styleverifytree is disabled ./mozilla-bin: relocation error: /home/jre/devel/mozilla-cvs/mozilla/dist/bin/components/libgfx_gtk.so: undefined symbol: GetContent__C8nsIFramePP10nsIContent Output of ldd: ./run-mozilla.sh /usr/bin/ldd components/libgfx_gtk.so libgkgfx.so => ./libgkgfx.so (0x400a3000) libgtksuperwin.so => ./libgtksuperwin.so (0x400f0000) libxpcom.so => ./libxpcom.so (0x400f6000) libplds4.so => ./libplds4.so (0x40287000) libplc4.so => ./libplc4.so (0x4028b000) libnspr4.so => ./libnspr4.so (0x40290000) libpthread.so.0 => /lib/libpthread.so.0 (0x402dd000) libdl.so.2 => /lib/libdl.so.2 (0x402f1000) libmozjs.so => ./libmozjs.so (0x402f5000) libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0x403b1000) libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0x404d6000) libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x4050a000) libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x4050d000) libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40530000) libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40538000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40546000) libXp.so.6 => /usr/X11R6/lib/libXp.so.6 (0x40601000) libm.so.6 => /lib/libm.so.6 (0x40609000) libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0x4062a000) libc.so.6 => /lib/libc.so.6 (0x40673000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) This also happens with --enable-default-toolkit=gtk2. Previous versions (tested 1.0.2, 1.1, 1.2, 1.3) does not have the problem. Reproducible: Didn't try Steps to Reproduce:
Sounds like you're pickup up the wrong libraries when starting up the browser. Not the ones that you just built. Or you're not running the mozilla wrapper script.
I've hunted it down. The problem occurs when everything building libgfx_gtk.so in gfx/src/gtk: nsNativeThemeGTK.o(.text+0x77c): In function `GetPrimaryPresShell(nsIFrame *, nsIPresShell **)': /home/jre/devel/mozilla-cvs/mozilla/gfx/src/gtk/nsNativeThemeGTK.cpp:105: undefined reference to `nsIFrame::GetContent(nsIContent **) const' nsNativeThemeGTK.o(.text+0xc04): In function `GetContentState(nsIFrame *)': /home/jre/devel/mozilla-cvs/mozilla/gfx/src/gtk/nsNativeThemeGTK.cpp:143: undefined reference to `nsIFrame::GetContent(nsIContent **) const' nsNativeThemeGTK.o(.text+0xd2c): In function `CheckBooleanAttr(nsIFrame *, nsIAtom *)': /home/jre/devel/mozilla-cvs/mozilla/gfx/src/gtk/nsNativeThemeGTK.cpp:153: undefined reference to `nsIFrame::GetContent(nsIContent **) const' ... (skipping the rest, This does not happen with 1.3) IHMO the build should stop in such a case but I don't know if such a behaviour is needed for XPCOM.
Strange, that shouldn't happen. It's all one tree.
This seems to be a compiler issue. Tried it with gcc 3.2.3 and it works. I think this bug can be reproduced with gcc 2.95.4 on any ix86 woody box. But I am wrong with the mozilla versions: gcc 2.95.4 builds Mozilla<=1.4 and does *not* work with 1.5a and the trunk. I am not a compiler/linker expert. Does anyone have any ideas how to figure out the reason for this? The only thing I know is that the missing symbols are in libgklayout.so
Confirming bug on another Woody box with gcc 2.95.4
*** Bug 215409 has been marked as a duplicate of this bug. ***
Comments from duplicate bug 215409: I'm on a Debian Potato platform using gcc 2.95.2. There are no problems with the 1.4 release source. This might be side effects from checkins related to bug #190735. Build was from a completely clean checkout - twice. ------- Additional Comment #1 From Mats Palmgren 2003-08-07 10:51 ------- I've had this problem too. I worked around it by adding: export LD_PRELOAD="$MOZ_DIST_BIN/components/libgklayout.so" just before the binary is executed in mozilla/dist/bin/run-mozilla.sh
Severity: normal → critical
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash
BTW, I'm suspecting bug 190735 too.
*** Bug 231090 has been marked as a duplicate of this bug. ***
Its missing something, but I'm not likely to have time to look this week.
*** Bug 232563 has been marked as a duplicate of this bug. ***
Can anyone show me WHERE in the run-mozilla.sh script to insert: export LD_PRELOAD="$MOZ_DIST_BIN/components/libgklayout.so" ? I've tried and still get the same error =(
Regarding reproducability with gcc 2.95.4 x86: Also seen with FreeBSD 4.9 (trunk, debug enabled, tests disabled due to compilation stopping bustage), gcc version 2.95.4 20020320 [FreeBSD] % ./run-mozilla.sh ... WARNING: dependent window created without a parent, file nsWindowCreator.cpp, line 128 GFX: dpi=130 t2p=0.0909091 p2t=11 depth=16 we don't handle eBorderStyle_close yet... please fix me ++WEBSHELL == 1 ++DOMWINDOW == 1 Note: verifyreflow is disabled WARNING: freetype not compiled in, file nsFT2FontNode.cpp, line 52 Note: styleverifytree is disabled /usr/libexec/ld-elf.so.1: /tmp/dump/mozilla-nightly/mozilla/dist/bin/components/libgfx_gtk.so: Undefined symbol "GetContent__C8nsIFrame" Setting LD_PRELOAD in itself isn't enough. LD_LIBRARY_PATH needs to point to dist/bin, e.g.: % LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/dump/mozilla-nightly/mozilla/dist/bin LD_PRELOAD=/tmp/dump/mozilla-nightly/mozilla/dist/bin/components/libgklayout.so:/tmp/dump/mozilla-nightly/mozilla/dist/bin/libgkgfx.so ./run-mozilla.sh
It's a compiler issue. nsIFrame::GetContent is inline. If the compiler isn't inling the call from gfx_gtk, then it should be emitting weak definitions of the function into gfx_gtk. We might be able to trick the compiler into the right behavior by tweaking the source code, like what dbaron did to nsIView recently.
Still getting this with the latest CVS: [07:27:57 jlay@workbox:~/temp/mozilla/dist/bin$] ./firefox (firefox-bin:13453): Gtk-WARNING **: module_path directive is now ignored ./firefox-bin: relocation error: /home/jlay/temp/mozilla/dist/bin/components/libgfx_gtk.so: undefined symbol: GetContent__C8nsIFrame Is this EVER going to get fixed or will I have to just blow out gcc and go to 3?
Summary: Missing symbols when compiling current trunk on Woody (Debian) → Missing symbols when compiling current trunk on Woody (Debian) gcc 2.95.x GetContent__C8nsIFrame
*** Bug 234596 has been marked as a duplicate of this bug. ***
*** Bug 218929 has been marked as a duplicate of this bug. ***
Per many requests for carification, Mats Palmgren's report, and my own experience, here is a detailed WORKAROUND for this bug (this is NOT fix but will get around the problem and get Mozilla running). The problem occures when Mozilla is runned and components/libdocshell.so is unable to resolve certain symbols to functions. This is apparently caused by the compiler not inlining certain functions at compile time and thus revealing weak symbols that caused confusion to the dynamic library loader being unable to properly resolve those symbols. Workaround: Edit the /usr/lib/mozilla-x.x.x/run-mozilla.sh script with a text editor and look for the section that appears as follows: ## Set LD_LIBRARY_PATH # LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"} if [ -n "$LD_LIBRARYN32_PATH" ] then LD_LIBRARYN32_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN32_PATH+":$LD_LIBRARYN32_PATH"} fi if [ -n "$LD_LIBRARYN64_PATH" ] then LD_LIBRARYN64_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN64_PATH+":$LD_LIBRARYN64_PATH"} fi if [ -n "$LD_LIBRARY_PATH_64" ]; then LD_LIBRARY_PATH_64=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH_64+":$LD_LIBRARY_PATH_64"} fi # Now insert just after that: ## BUGFIX: Preload the libraries that are needed for the ## compoents/libdocshell.so to properly resolve symbols that were not ## properly inlined during compile time # LD_PRELOAD=${MOZ_DIST_BIN}/components/libgklayout.so:${MOZ_DIST_BIN}/libgkgfx.so export LD_PRELOAD The above lines will explicitly preload the libraries that componentes/libdocshell.so apparently needs to properly resolve symbols. Save, exit, and then run Mozilla again. This works for me, however it is a workaround and not a true fix. Since this is appears to be the compiler's fault but I have spent three days of my time working on it I would like to politely ask that the functions that were not properly inlined be renamed or somesuch to avoid nameclashes on "problem compilers". Thank you. :) --Orange Vixen
Product: Core → Core Graveyard
I'm pretty sure we don't care about gcc 2.95 now.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.