Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196444 - [fPIC] mozilla-firefox-2.0.0.8, net-libs/xulrunner-1.8.1.8 fails to build with gcc-4.2.2
Summary: [fPIC] mozilla-firefox-2.0.0.8, net-libs/xulrunner-1.8.1.8 fails to build wit...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 196502 196573 196590 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-19 19:24 UTC by Matthias M Weber
Modified: 2009-04-03 18:29 UTC (History)
16 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
add gdkpango.h to config/system-headers (gdkpango.patch,263 bytes, patch)
2007-10-19 19:44 UTC, Walter Meinl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias M Weber 2007-10-19 19:24:38 UTC
mozilla-firefox-2.0.0.8 fails to build with gcc-4.2.2. This error doesn't occur with gcc-4.1.2

/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: mozilla-decoder.o: relocation R_X86_64_PC32 against `gdk_pango_context_get' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
gmake[4]: *** [libgfx_gtk.so] Error 1
gmake[4]: Leaving directory `/data/portage/www-client/mozilla-firefox-2.0.0.8/work/mozilla/gfx/src/gtk'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/data/portage/www-client/mozilla-firefox-2.0.0.8/work/mozilla/gfx/src'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/data/portage/www-client/mozilla-firefox-2.0.0.8/work/mozilla/gfx'
gmake[1]: *** [tier_9] Error 2
gmake[1]: Leaving directory `/data/portage/www-client/mozilla-firefox-2.0.0.8/work/mozilla'
make: *** [default] Error 2
 * 
 * ERROR: www-client/mozilla-firefox-2.0.0.8 failed.
 * Call stack:
 *                        ebuild.sh, line 1695:  Called dyn_compile
 *                        ebuild.sh, line 1033:  Called qa_call 'src_compile'
 *                        ebuild.sh, line   44:  Called src_compile
 *   mozilla-firefox-2.0.0.8.ebuild, line  196:  Called die
 * The specific snippet of code:
 *      emake ${jobs} || die
 *  The die message:
 *   (no error message)
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.


Reproducible: Always




Portage 2.1.3.15 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.6.1-r0, 2.6.23-gentoo-galenos x86_64)
=================================================================
System uname: 2.6.23-gentoo-galenos x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Timestamp of tree: Fri, 19 Oct 2007 15:50:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.2-r1
dev-lang/python:     2.4.4-r5, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64 -msse3"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="-O2 -pipe -march=athlon64 -msse3"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfpermsstrict unmerge-orphans userfetch"
LINGUAS="en de"
MAKEOPTS="-j3"
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-19 19:26:53 UTC

*** This bug has been marked as a duplicate of bug 188636 ***
Comment 2 Walter Meinl 2007-10-19 19:44:33 UTC
Created attachment 133911 [details, diff]
add gdkpango.h to config/system-headers

this is not a dupe of bug18636. This one here fails due to a missing external include in the system-headers and is easy to fix.
Comment 3 Walter Meinl 2007-10-19 19:46:27 UTC
(In reply to comment #1)
> 
> *** This bug has been marked as a duplicate of bug 188636 ***
> 

Jakub, any chance that you reopen this bug and cc mozilla-herd, I've attached a working patch. Thanks
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-10-19 20:23:19 UTC
Why don't you reopen it yourself? :)
Comment 5 Walter Meinl 2007-10-19 21:38:29 UTC
(In reply to comment #4)
> Why don't you reopen it yourself? :)
> 

As soon as I'm logged in, I can't change the status of this bug. Probably cause I'm not the reporter and not a developer
Comment 6 Andreas Arens 2007-10-20 08:57:09 UTC
I found the same patch Walter has posted on the Mandriva bugzilla: http://qa.mandriva.com/show_bug.cgi?id=32024#c12
After applying that, Firefox indeed compiles fine. (~amd64, gcc-4.2.2, emerge -e world, gtk+-2.12.0-r2)

But: When started it bombs out with a segfault in gdk_window_get_toplevel.
That might be unrelated, but it's somewhere in gdk so at least suspicious.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-10-20 09:17:18 UTC
*** Bug 196502 has been marked as a duplicate of this bug. ***
Comment 8 Raúl Porcel (RETIRED) gentoo-dev 2007-10-20 10:14:05 UTC
I understand this doesn't happen with 2.0.0.7?
Comment 9 Richard Connon 2007-10-20 10:25:38 UTC
2.0.0.7 worked for me.
Comment 10 Walter Meinl 2007-10-20 11:54:22 UTC
(In reply to comment #8)
> I understand this doesn't happen with 2.0.0.7?
> 

2.0.0.6 and 2.0.0.7 were firedrill releases, means only some vulnerabilities were fixed. 2.0.0.8 contains also stability fixes, with respect to this bug here it's the upstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=349906
That removes the pangoxft dependency and pulls in gdk/gdkpango.h that wasn't needed before. As it's not in the system-headers file the build on amd64 fails with the visibility pragma.
I filed an upstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=400463 that has already r+ but needs approval, so it will likely be fixed in 2.0.0.9. XULRunner needs also this patch.
Comment 11 Walter Meinl 2007-10-20 12:10:11 UTC
(In reply to comment #6)
> I found the same patch Walter has posted on the Mandriva bugzilla:
> http://qa.mandriva.com/show_bug.cgi?id=32024#c12
> After applying that, Firefox indeed compiles fine. (~amd64, gcc-4.2.2, emerge
> -e world, gtk+-2.12.0-r2)
> 
> But: When started it bombs out with a segfault in gdk_window_get_toplevel.
> That might be unrelated, but it's somewhere in gdk so at least suspicious.
> 

Hm, my patch includes another system-header than that of mandriva, I don't crash with gdk_window_get_toplevel. Which patch did you finally apply, the one posted here or mandriva's? If you used mandriva's maybe you want to give the patch here a try and report if the crash still happens (a testcase if you e.g. crash on a certain site would also be helpful to find out if its related to this bug here). IIRC some gnome-themes seem also to crash firefox. 
Comment 12 Andreas Arens 2007-10-20 12:32:17 UTC
(In reply to comment #11)
> Hm, my patch includes another system-header than that of mandriva, I don't
> crash with gdk_window_get_toplevel. Which patch did you finally apply, the one
> posted here or mandriva's? If you used mandriva's maybe you want to give the
> patch here a try and report if the crash still happens (a testcase if you e.g.
> crash on a certain site would also be helpful to find out if its related to
> this bug here). IIRC some gnome-themes seem also to crash firefox. 
> 
My self-generated patch refers to comment #12 on the mandriva bug, which is identical to yours:
--- mozilla/config/system-headers.unpatched     2007-10-19 21:26:21.000000000 +0200
+++ mozilla/config/system-headers       2007-10-19 21:27:09.000000000 +0200
@@ -208,6 +208,7 @@
 gdk/gdkevents.h
 gdk/gdk.h
 gdk/gdkkeysyms.h
+gdk/gdkpango.h
 gdk/gdkprivate.h
 gdk/gdkregion.h
 gdk/gdkwindow.h

I've just masked >=mozilla-firefox-2.0.0.8 to verify it's a 2.0.0.8 regression, since my previous 2.0.0.7 version was compiled by gcc-4.2.0 and worked back then.
Compiling 2.0.0.7 with gcc-4.2.2 works without the patch, and the resulting binary does not experience the segfault I see in 2.0.0.8.

Comment 13 Andreas Arens 2007-10-20 12:38:50 UTC
> If you used mandriva's maybe you want to give the
> patch here a try and report if the crash still happens (a testcase if you e.g.
> crash on a certain site would also be helpful to find out if its related to
> this bug here). IIRC some gnome-themes seem also to crash firefox. 
> 

It crashes right on startup, no specific site (my home page is the official firefox-google DE page).
I indeed use a non-standard theme - Mostly Crystal 2.0.0.17.
Will switch back to 2.0.0.8 right now to check w/o that.

Comment 14 Andreas Arens 2007-10-20 12:43:27 UTC
Heck I was too fast.
2.0.0.7 also crashes. I just doesn't crash on first start, when downgrading the  user env from 2.0.0.7, but on any subsequent run, identical to 2.0.0.8
Comment 15 Raúl Porcel (RETIRED) gentoo-dev 2007-10-20 13:33:41 UTC
(In reply to comment #14)
> Heck I was too fast.
> 2.0.0.7 also crashes. I just doesn't crash on first start, when downgrading the
>  user env from 2.0.0.7, but on any subsequent run, identical to 2.0.0.8
> 

Maybe your problem is bug 194674
Comment 16 Martin Wegner 2007-10-20 14:44:16 UTC
I just faced the initial error reported here when compiling mozilla-firefox-2.0.0.8:

x86_64-pc-linux-gnu-g++ -DGENTOO_NSPLUGINS_DIR=\"/usr/lib64/nsplugins\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\"/usr/lib64/nsbrowser/plugins\"  -fno-rtti -fno-handle-exceptions  -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -march=nocona -pipe -fPIC -Wno-return-type -w -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -ffunction-sections -O2  -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12   -fPIC -shared -Wl,-z,defs -Wl,-rpath,'$ORIGIN:$ORIGIN/..' -Wl,-h,libgfx_gtk.so -o libgfx_gtk.so  nsPrintdGTK.o gtk2drawing.o nsDeviceContextGTK.o nsDeviceContextSpecFactoryG.o nsDeviceContextSpecG.o nsDrawingSurfaceGTK.o nsGfxFactoryGTK.o nsGraphicsStateGTK.o nsImageGTK.o nsGCCache.o nsRenderingContextGTK.o nsScreenGtk.o nsScreenManagerGtk.o nsPrintOptionsGTK.o nsFontMetricsUtils.o nsFontMetricsXft.o nsFontMetricsPango.o mozilla-decoder.o nsRegionGTK2.o nsNativeThemeGTK.o      -Wl,-rpath,'$ORIGIN:$ORIGIN/..'  ../../../dist/lib/libgfxshared_s.a -Wl,--version-script -Wl,../../../build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -lfreetype -lz -L../../../dist/bin -L../../../dist/lib -lgkgfx -lXinerama -L../../../dist/bin -lmozjs ../../../dist/lib/libunicharutil_s.a -L../../../dist/bin -lxpcom -lxpcom_core  -L../../../dist/bin -Wl,-R/usr/lib64/nspr -L/usr/lib64/nspr -lplds4 -lplc4 -lnspr4 -lpthread -ldl  -lpangoxft-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -L/usr/lib64 -lX11   -lXft -lXrender -lfontconfig -lfreetype -lz -lX11   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -lgfxpsshar -lxprintutil -L/usr/lib64 -lXp -lXext -lX11 -ldl -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: mozilla-decoder.o: relocation R_X86_64_PC32 against `gdk_pango_context_get' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
gmake[4]: *** [libgfx_gtk.so] Error 1
gmake[4]: Leaving directory `/var/tmp/portage/www-client/mozilla-firefox-2.0.0.8/work/mozilla/gfx/src/gtk'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/var/tmp/portage/www-client/mozilla-firefox-2.0.0.8/work/mozilla/gfx/src'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/var/tmp/portage/www-client/mozilla-firefox-2.0.0.8/work/mozilla/gfx'
gmake[1]: *** [tier_9] Error 2
gmake[1]: Leaving directory `/var/tmp/portage/www-client/mozilla-firefox-2.0.0.8/work/mozilla'
make: *** [default] Error 2
 *
 * ERROR: www-client/mozilla-firefox-2.0.0.8 failed.
 * Call stack:
 *                        ebuild.sh, line 1695:  Called dyn_compile
 *                        ebuild.sh, line 1033:  Called qa_call 'src_compile'
 *                        ebuild.sh, line   44:  Called src_compile
 *   mozilla-firefox-2.0.0.8.ebuild, line  196:  Called die
 * The specific snippet of code:
 *      emake ${jobs} || die
 *  The die message:
 *   (no error message)
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/www-client:mozilla-firefox-2.0.0.8:20071020-142315.log'.
 *

I can provide the complete build.log when necessary.

$ emerge --info
Portage 2.1.3.15 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.6.1-r0, 2.6.23-gentoo-mw x86_64)
=================================================================
System uname: 2.6.23-gentoo-mw x86_64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz
Timestamp of tree: Sat, 20 Oct 2007 04:50:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.2-r1
dev-lang/python:     2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo        http://mirror.isp.net.au/ftp/pub/gentoo/        ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.gentoo.org/gentoo-distfiles/   ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
LANG="C"
MAKEOPTS="-j2 -l4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://ares/gentoo-portage"
USE="X Xaw3d a52 aac aalib accessibility acpi alsa amd64 bash-completion berkdb bitmap-fonts branding bzip2 cairo cdparanoia cdr cli cracklib crypt css cups curl d dbus dedicated dga dia directfb divx dri dvb dvd dvdnav dvdr dvi editor emerald encode escreen expat fam fbcon ffmpeg firefox flac ftp gd gdbm gif gimpprint glut gnome gnome-print gnutls gtk gtkhtml hal hddtemp iconv icq idn imagemagick imap jabber jpeg jpeg2k lame libcaca libnotify lm_sensors logrotate mad mbox midi mmx mng mozdevelop mozilla mp3 mplayer mudflap nautilus ncurses nfs nls nptl nptlonly nsplugin nvidia offensive ogg openal opengl openmp openssl oscar pam pcre pdf perl png pop postfix ppds python quicktime readline realmedia rtc ruby samba sdl server session skins spl sqlite srt sse sse2 ssl startup-notification svg tcpd tetex theora thunderbird tiff tools truetype truetype-fonts type1-fonts unicode usb userlocales vim vim-with-x visualization vorbis wmf wmp wxwindows x264 xanim xine xinerama xml xorg xpm xprint xsl xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="hauppauge" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 17 Andreas Arens 2007-10-20 15:01:23 UTC
(In reply to comment #15)
> 
> Maybe your problem is bug 194674
> 
Nope. 2.0.0.8 source already contains the proposed upstream fix for this
(replacing g_free() by the appropriate gtk_requisition_free() and
gtk_border_free() calls), but still crashes identically to 2.0.0.7 for me.

Comment 18 Andreas Arens 2007-10-20 15:08:13 UTC
(In reply to comment #16)

> I just faced the initial error reported here when compiling
> mozilla-firefox-2.0.0.8:

Hmm, your setup look almost identical to mine:
(except LANG="de_DE.UTF-8" LC_ALL="de_DE.UTF-8" LINGUAS="de en")

> Portage 2.1.3.15 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.6.1-r0,
> 2.6.23-gentoo-mw x86_64)

Can you please test Walters patch, which will fix the compile, and report if firefox works without crashes for you on repeated invocations?
Comment 19 Alexandre Rostovtsev (RETIRED) gentoo-dev 2007-10-20 18:43:50 UTC
I had the same linking error with gcc-4.2.2 as everyone. Walter's patch fixes it, and firefox-2.0.0.8 with the patch applied runs without crashing.

Also, the patch should also be applied to xulrunner-1.8.1.8 and seamonkey-1.1.5
Comment 20 Philipp 2007-10-20 19:33:11 UTC
I also experienced the compile error. With Walter's patch applied it compiled fine but also crashed on startup. Maybe the crash only happens on amd64?
Comment 21 Alexandre Rostovtsev (RETIRED) gentoo-dev 2007-10-20 19:53:08 UTC
(In reply to comment #20)
> I also experienced the compile error. With Walter's patch applied it compiled
> fine but also crashed on startup. Maybe the crash only happens on amd64?

I am using amd64, and I get no crashes with the patch. What is your system like?

Mine:
Portage 2.1.3.15 (default-linux/amd64/2007.0/desktop, gcc-4.2.2, glibc-2.6.1-r0, 2.6.22-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r8 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
Timestamp of tree: Sat, 20 Oct 2007 18:00:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.2-r1
dev-lang/python:     2.4.4-r5, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3, 2.17-r2, 2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,--as-needed -Wl,-O1"
LINGUAS="en ru"
MAKEOPTS="-j3"


www-client/mozilla-firefox-2.0.0.8 USE="gnome ipv6 java mozdevelop xinerama xprint -bindist -debug -filepicker -moznopango -restrict-javascript -xforms"
x11-libs/gtk+-2.12.1  USE="X cups doc jpeg tiff xinerama -debug"
Comment 22 Bernd Steinhauser 2007-10-20 19:58:53 UTC
(In reply to comment #20)
> I also experienced the compile error. With Walter's patch applied it compiled
> fine but also crashed on startup. Maybe the crash only happens on amd64?
> 

It doesn't crash on my system. Compiling error is also gone.
I'm on AMD64.

Portage 2.1.3.15 (default-linux/amd64/2007.0/desktop, gcc-4.2.2, glibc-2.6.1-r0, 2.6.23-gentoo x86_64)
=================================================================
System uname: 2.6.23-gentoo x86_64 AMD Turion(tm) 64 X2 Mobile Technology TL-50
Timestamp of tree: Sat, 20 Oct 2007 11:50:01 +0000
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -pipe -msse3"
DISTDIR="/var/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j4"
PKGDIR="/var/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/minefield /usr/portage/local/layman/kde /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acl acpi alsa amd64 arts berkdb bitmap-fonts bluetooth cairo cdr cli cracklib crypt curl dbus dri dvd dvdr dvdread emboss evo fbcon ffmpeg firefox flac fortran ftp gdbm gif gpm gstreamer hal iconv isdnlog java jpeg kde kdeenablefinal kerberos lm_sensors mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg openal opengl openmp pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection samba session spell spl sse sse2 ssl svg sysfs tcpd tiff truetype truetype-fonts type1 type1-fonts unicode usb vorbis wifi xine xinerama xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="fbdev vesa fglrx"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 23 Andreas Arens 2007-10-20 20:17:52 UTC
Well, it seems the crash is unrelated to the compile issue, so we should file a separate bug for it. Walter's patch fixes the compile problem the original poster describes, and should end in some -r1 release.

I'll do a debug compile a file a separate bug once my lengthy sync compile run (kde 3.5.8) is through and I have done some more debugging - unless someone else is faster.
Comment 24 Matthias M Weber 2007-10-21 07:32:31 UTC
As the original reporter, I should add that Walter's patch works fine for me. On my system firefox-2.0.0.8 starts without any problems. 

Comment 25 Robert Piasek (RETIRED) gentoo-dev 2007-10-21 09:29:51 UTC
Your patch makes 2.0.0.8 to compile correctly, but when I can only run it as a root. It doesn't start as non-privileged user.
Comment 26 Jakub Moc (RETIRED) gentoo-dev 2007-10-21 09:40:27 UTC
*** Bug 196573 has been marked as a duplicate of this bug. ***
Comment 27 Jakub Moc (RETIRED) gentoo-dev 2007-10-21 09:40:51 UTC
net-libs/xulrunner-1.8.1.8 - same junk...
Comment 28 Andreas Arens 2007-10-21 11:59:09 UTC
Unfortunately a 'debug' compile (USE=debug) fails with a similar problem after applying Walter's fix:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: ../../../../dist/lib/libembed_base_s.a(nsEmbedAPI.o): relocation R_X86_64_PC32 against `NSGlue_Warning' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

This definitely needs more work..
Comment 29 Walter Meinl 2007-10-21 12:44:22 UTC
(In reply to comment #28)
> Unfortunately a 'debug' compile (USE=debug) fails with a similar problem after
> applying Walter's fix:
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld:
> ../../../../dist/lib/libembed_base_s.a(nsEmbedAPI.o): relocation R_X86_64_PC32
> against `NSGlue_Warning' can not be used when making a shared object; recompile
> with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld:
> final link failed: Bad value
> collect2: ld returned 1 exit status
> 
> This definitely needs more work..
> 

Ah, yes debug build fails too, due to another problem, see http://bugs.gentoo.org/show_bug.cgi?id=188636
I have attached a workaround patch there as upstream unfortunately didn't answer  yet. The patch there works by disabling the pragma and compiling only with visibility=hidden. Yet the patch was not included into the mozilla-firefox/xulrunner ebuilds though I cc'ed the gentoo mozilla herd in bug188636.
Comment 30 Torsten Rehn 2007-10-21 13:11:48 UTC
*** Bug 196590 has been marked as a duplicate of this bug. ***
Comment 31 Martin Wegner 2007-10-21 15:23:53 UTC
(In reply to comment #18)
> (In reply to comment #16)
> > I just faced the initial error reported here when compiling
> > mozilla-firefox-2.0.0.8:
> [...]
> Can you please test Walters patch, which will fix the compile, and report if
> firefox works without crashes for you on repeated invocations?

The patch fixed compiling for me here. I have no crashs, I had none before (<=2.0.0.7).
Comment 32 Raúl Porcel (RETIRED) gentoo-dev 2007-10-21 20:52:37 UTC
This is fixed in:

-mozilla-firefox-2.0.0.8, patchset 0.2
-xulrunner-1.8.1.8 patchset 0.1
-seamonkey-1.1.5 patchset 0.2

I'll leave this bug open for thunderbird, so i don't forget.

Thanks
Comment 33 Chris Smith 2007-10-21 23:23:31 UTC
(In reply to comment #32)
> This is fixed in:
> 
> -mozilla-firefox-2.0.0.8, patchset 0.2

When is the patchset to be made available? Still not on mirrors.
Comment 34 Robert Piasek (RETIRED) gentoo-dev 2007-10-22 09:58:49 UTC
(In reply to comment #25)
> Your patch makes 2.0.0.8 to compile correctly, but when I can only run it as a
> root. It doesn't start as non-privileged user.
> 

Has anyone experienced similar problem? I emerged 2.0.0.8 with pachset-0.1 and it didn't change anything. When I try to run is as an user i've got:

No running windows found
firefox-bin exited with non-zero status (1)

When I start it as root, everything is fine. I've tried to delete .mozilla folder, but didn't change anything. 2.0.0.7 works perfectly fine.
Comment 35 Wulf Krueger (RETIRED) gentoo-dev 2007-10-22 15:31:47 UTC
(In reply to comment #34)
> Has anyone experienced similar problem? I emerged 2.0.0.8 with pachset-0.1 and
> it didn't change anything. When I try to run is as an user i've got:
> 
> No running windows found
> firefox-bin exited with non-zero status (1)
> 
> When I start it as root, everything is fine. I've tried to delete .mozilla
> folder, but didn't change anything. 2.0.0.7 works perfectly fine.

I have exactly the same problem with patchset 0.2 (!). Any idea, Raúl?
Comment 36 Marcin Deranek 2007-10-22 17:37:21 UTC
Seems like problem is related to permissions of mozilla-firefox files - some of them are only readable/writable by root. This also breaks compilation of some applications which try to build firefox plugins..

I haven't tried it yet, but I guess making them readible by anyone should solve the problem.



Comment 37 Andreas Arens 2007-10-22 17:47:58 UTC
(In reply to comment #35)
>
> I have exactly the same problem with patchset 0.2 (!). Any idea, Raúl?
> 
what's your root users default umask? Just type 'umask' to find out.
You might also want to try typing 'umask 022', re-emerge firefox, and then test as a non-root users again. Normally emerge should protect you against such permission problems, but who knows?

Comment 38 Marcin Deranek 2007-10-22 18:01:16 UTC
Temporary fix:

for file in `equery files --filter=obj mozilla-firefox`; do chmod a+r $file; done

It's not umask problem as some files in the very same directory have different permissions. Besides my umask is 0022 and I did not have that problem with previous version of Firefox (2.0.0.7). I guess something has changed on Firefox side as ebuild did not change much..

Just quickly looked into Firefox 2.0.0.7 and 2.0.0.8 tarball and seems like all Firefox 2.0.0.8 files were created with 0077 umask which is not the case for Firefox 2.0.0.7.. I think this is the cause of the problem.
Comment 39 Marcin Deranek 2007-10-22 18:13:10 UTC
By any chance do you run paludis as your package manager ?

Looks like paludis does not change permissions on extracted files (runs tar with -xvf --no-same-owner options) and that could lead to the following problem..
Comment 40 Raúl Porcel (RETIRED) gentoo-dev 2007-10-22 18:36:46 UTC
Correct, it's due to paludis.
Comment 41 Marcin Deranek 2007-10-22 20:58:17 UTC
There's already a bug about it..

http://paludis.pioto.org/trac/ticket/354
Comment 42 Robert Piasek (RETIRED) gentoo-dev 2007-10-22 22:19:14 UTC
(In reply to comment #40)
> Correct, it's due to paludis.
> 
yep, I'm using paludis as well.
Comment 43 Matt 2007-10-25 22:34:25 UTC
Walter's patch works for me too:

Portage 2.1.3.16 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.6.1-r0, 2.6.23-kamikaze4-amd64 x86_64)
=================================================================
System uname: 2.6.23-kamikaze4-amd64 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
Timestamp of tree: Thu, 25 Oct 2007 08:50:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.2-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0_rc5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3, 2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"

(using hardened gcc with specs),

thanks @ all :)
Comment 44 Walter Meinl 2007-11-23 20:57:40 UTC
(In reply to comment #32)
> This is fixed in:
> 
> -mozilla-firefox-2.0.0.8, patchset 0.2
> -xulrunner-1.8.1.8 patchset 0.1
> -seamonkey-1.1.5 patchset 0.2
> 
> I'll leave this bug open for thunderbird, so i don't forget.
> 
> Thanks
> 

This fix was included upstream, so (hopefully) mozilla-firefox-2.0.0.10 which is in preparation will contain it (you'll see if the patch still applies ;-))