Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 188636 - xulrunner-1.8.1.6, mozilla-{firefox,thunderbird}-2.0.0.6 fail on non-PIC code
Summary: xulrunner-1.8.1.6, mozilla-{firefox,thunderbird}-2.0.0.6 fail on non-PIC code
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:
: 190536 190774 192038 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-12 20:27 UTC by BedOS_Gui
Modified: 2007-11-15 15:11 UTC (History)
5 users (show)

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


Attachments
emerge --info (emerge--info,9.11 KB, text/plain)
2007-08-12 20:29 UTC, BedOS_Gui
Details
setting to visibility=hidden (remove-pragma-with-debug.patch,586 bytes, patch)
2007-10-12 19:45 UTC, Walter Meinl
Details | Diff
patch for the firefox ebuild (ffdbgebuild.patch,930 bytes, patch)
2007-10-21 13:22 UTC, Walter Meinl
Details | Diff
patching error (ffdbgebuild.patch-2312.out,3.02 KB, text/plain)
2007-10-21 15:20 UTC, BedOS_Gui
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BedOS_Gui 2007-08-12 20:27:45 UTC
When emerging xulrunner-1.8.1.6 on my amd64, it fails with this message :
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=native -mtune=native -pipe -fPIC -Wno-return-type -w -fshort-wchar -pthread -pipe  -DDEBUG -D_DEBUG -DDEBUG_root -DTRACING -g -fno-inline -O2  -D_REENTRANT -DPNG_NO_MMX_CODE -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' -Wl,-h,libgtkembedmoz.so.1 -o libgtkembedmoz.so.1  gtkmozembedmarshal.o gtkmozembed2.o EmbedPrivate.o EmbedWindow.o EmbedProgress.o EmbedContentListener.o EmbedEventListener.o EmbedWindowCreator.o EmbedPrompter.o GtkPromptService.o    -Wl,--hash-style=gnu         -Wl,-rpath,'$ORIGIN'  -Wl,--whole-archive ../../../../dist/lib/libembed_base_s.a ../../../../dist/lib/libprofdirserviceprovider_s.a  -Wl,--no-whole-archive -Wl,--no-as-needed -L../../../../dist/bin -Wl,-rpath-link,../../../../dist/bin -lxpcom -lxul  -L../../../../dist/bin -Wl,-R/usr/lib64/nspr -L/usr/lib64/nspr -lplds4 -lplc4 -lnspr4 -lpthread -ldl -Wl,--as-needed   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -ldl -lm    
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/../../../../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.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
gmake[3]: *** [libgtkembedmoz.so.1] Error 1
gmake[3]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.8.1.6/work/mozilla/embedding/browser/gtk/src'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.8.1.6/work/mozilla/embedding/browser/gtk'
gmake[1]: *** [tier_99] Error 2
gmake[1]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.8.1.6/work/mozilla'
make: *** [default] Error 2
 * 
 * ERROR: net-libs/xulrunner-1.8.1.6 failed.
 * Call stack:
 *   ebuild.sh, line 1654:   Called dyn_compile
 *   ebuild.sh, line 990:   Called qa_call 'src_compile'
 *   ebuild.sh, line 44:   Called src_compile
 *   xulrunner-1.8.1.6.ebuild, line 116:   Called die
 * 
 * emake failed
 * 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/net-libs:xulrunner-1.8.1.6:20070812-200043.log'.
 * 
!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.6  CLASSPATH="." JAVA_HOME="/opt/sun-jdk-1.6.0.02"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""
and of course, the output of emerge --info


Reproducible: Always




This emerge-error don't append with -debug USE flag
Comment 1 BedOS_Gui 2007-08-12 20:29:57 UTC
Created attachment 127901 [details]
emerge --info
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-08-12 20:32:15 UTC
Does it compile w/ gcc-4.1.x for you?
Comment 3 BedOS_Gui 2007-08-12 20:37:02 UTC
Yes it was compiling with gcc-4.1.2, and I have the same error message with mozilla-firefox-2.0.0.6 and with mozilla-thunderbird-2.0.0.6.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-08-12 20:56:00 UTC
And can you compile it w/ binutils 2.17.50.0.17/18?
Comment 5 BedOS_Gui 2007-08-12 21:06:34 UTC
How to add binutils-2.17.50.0.18 to package.keywords ?
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-08-12 21:10:26 UTC
echo "sys-devel/binutils **" >> /etc/portage/package.keywords 

(quickpkg the previous version just in case, unless you are using multislot).
Comment 7 BedOS_Gui 2007-08-12 21:26:11 UTC
Same emerge error with binutils-2.17.50.0.18 :-(
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-08-12 21:32:25 UTC
Hmmm, thanks for testing. 

toolchain, please have a look whether this is Bug 186089 or a new borkage, noone reported this with mozilla stuff yet.
Comment 9 BedOS_Gui 2007-08-12 21:44:13 UTC
I have had such an error with enigmail but the latest ebuild corrects it.
Comment 10 SpanKY gentoo-dev 2007-08-13 01:54:55 UTC
i think you need to rebuild a few things with the new binutils
Comment 11 BedOS_Gui 2007-08-13 06:11:20 UTC
Yes SpanKY, I remerge the toolchain (gcc, gcc-config, binutils, binutils-config, glibc, libtool, binutils, portage), good ?
Comment 12 BedOS_Gui 2007-08-18 11:23:08 UTC
The problem with gcc-4.2 is pending on mozilla bugzilla : https://bugzilla.mozilla.org/show_bug.cgi?id=391937
A patch seems to be in approval procedure. 
Comment 13 Walter Meinl 2007-08-19 20:07:26 UTC
(In reply to comment #12)
> The problem with gcc-4.2 is pending on mozilla bugzilla :
> https://bugzilla.mozilla.org/show_bug.cgi?id=391937
> A patch seems to be in approval procedure. 
> 

Unfortunately the patch of the mozilla bug won't help you. It fixes another build failure on amd64 for the trunk (firefox 3.0), there's the possibility to enable startup-notification (which is not yet in the firefox-2.0 series possible).
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2007-08-28 15:27:59 UTC
*** Bug 190536 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-08-30 12:53:48 UTC
*** Bug 190774 has been marked as a duplicate of this bug. ***
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2007-09-10 20:19:48 UTC
*** Bug 192038 has been marked as a duplicate of this bug. ***
Comment 17 Walter Meinl 2007-09-12 09:24:41 UTC
FYI I filed an upstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=395871
Comment 18 Walter Meinl 2007-10-12 19:45:47 UTC
Created attachment 133267 [details, diff]
setting to visibility=hidden

The patch is stolen from Debian/Ubuntu. They force visibility=hidden as default.* debian/patches/force-no-pragma-visibility-for-gcc-4.2_4.3, debian/patches/series:
add patch to siable pragma visibility strategy to hide symbols. stick to -fvisibility=hidden.
(from their ChangeLog)
As we see problems obviously only in case of debug builds, we could use it conditionally only when the USE flag debug is set.
I'd suggest this as a workaround till the upstream bug is resolved.
Comment 19 Walter Meinl 2007-10-12 19:46:59 UTC
cc mozilla devs. What's your oppinion about the patch?
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2007-10-19 19:26:53 UTC
*** Bug 196444 has been marked as a duplicate of this bug. ***
Comment 21 Raúl Porcel (RETIRED) gentoo-dev 2007-10-20 14:32:29 UTC
This problem only occurs using the debug USE-flag?
Comment 22 Ewan Marshall 2007-10-20 14:35:06 UTC
Yes, it's a bug in the debugging code.
Comment 23 Jose daLuz 2007-10-21 02:17:28 UTC
(In reply to comment #21)
> This problem only occurs using the debug USE-flag?
> 
I don't have the debug USE flag set, but my 1.8.1.8 build fails on non-PIC code:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: ../../dist/lib/components/libgfx_gtk.a(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[2]: *** [libxul.so.1] Error 1
gmake[2]: Leaving directory `/var/tmp/paludis/net-libs/xulrunner-1.8.1.8/work/mozilla/toolkit/library'
gmake[1]: *** [tier_50] Error 2
gmake[1]: Leaving directory `/var/tmp/paludis/net-libs/xulrunner-1.8.1.8/work/mozilla'
make: *** [default] Error 2

!!! ERROR in net-libs/xulrunner-1.8.1.8:
!!! In src_compile at line 5663
!!! emake failed

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 Athlon(tm) 64 X2 Dual Core Processor 6000+
Timestamp of tree: Sun, 21 Oct 2007 01:20: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.5.1-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0_rc5
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.50.0.2
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=k8 -O2 -pipe -ggdb -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/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe -ggdb -msse3"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask --verbose --nospinner"
FEATURES="ccache distlocks fixpackages parallel-fetch sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=120"
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/sunrise /usr/portage/local/layman/gnome-experimental /usr/portage/local/layman/xeffects /usr/portage/local/layman/vmware /usr/local/overlays/myoverlay"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr bash-completion berkdb bitmap-fonts bluetooth bzip2 cairo cdda cdr cli cracklib crypt css cups dbus dri dts dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg flac fortran gdbm gif glitz gnome gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg kde kdehiddenvisibility kerberos ldap libnotify mad midi mikmod mmx mono mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl pic png pppd python qt3support qt4 quicktime readline reflection ruby samba sdl session spell spl sqlite sse sse2 ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales vcd vorbis x264 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="cmipci" 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" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 24 Walter Meinl 2007-10-21 12:46:34 UTC
(In reply to comment #23)
> (In reply to comment #21)
> > This problem only occurs using the debug USE-flag?
> > 
> I don't have the debug USE flag set, but my 1.8.1.8 build fails on non-PIC
> code:
> 
that's bug196444
Comment 25 Walter Meinl 2007-10-21 13:22:37 UTC
Created attachment 134024 [details, diff]
patch for the firefox ebuild 

The patch for debug builds gets only applied when USE=debug AND gcc >= 4.2 AND the arch is amd64
Additionally I've included the ebuild patch from bug186750 (we sed the wrong file in the mozilla-firefox ebuilds)
I can provide also a patch for xulrunner.
Comment 26 Raúl Porcel (RETIRED) gentoo-dev 2007-10-21 13:41:57 UTC
Shrug...i guess the patch doesn't affect anything with gcc-4.1 or gcc-4.2 in other systems?
Comment 27 BedOS_Gui 2007-10-21 15:18:49 UTC
(In reply to comment #25)
> Created an attachment (id=134024) [edit]
> patch for the firefox ebuild 
> 
> The patch for debug builds gets only applied when USE=debug AND gcc >= 4.2 AND
> the arch is amd64
> Additionally I've included the ebuild patch from bug186750 (we sed the wrong
> file in the mozilla-firefox ebuilds)
> I can provide also a patch for xulrunner.
> 
I have this compilation error when applying your patch Walter
Comment 28 BedOS_Gui 2007-10-21 15:20:23 UTC
Created attachment 134041 [details]
patching error
Comment 29 Raúl Porcel (RETIRED) gentoo-dev 2007-10-21 20:15:58 UTC
not a toolchain bug
Comment 30 Raúl Porcel (RETIRED) gentoo-dev 2007-10-21 20:54:41 UTC
(In reply to comment #28)
> Created an attachment (id=134041) [edit]
> patching error
> 

Lol, the patch you're using is for the ebuild, to patch the ebuild, not the app :D


------
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 31 Walter Meinl 2007-10-22 19:04:11 UTC
(In reply to comment #26)
> Shrug...i guess the patch doesn't affect anything with gcc-4.1 or gcc-4.2 in
> other systems?
> 

Nope, this patch is safe. In effect as you apply it unconditional, problems with missing system-headers like in bug196444 should not occur anymore.
As you have add the patch also to the seamonkey patchset you may consider to drop 002_seamonkey-disable-visibility.patch from the seamonkey patchset as effectively both patches do the same (therefore nobody posted build problems with seamonkey-1.1.5 as opposed to firefox and xulrunner and enigmail builds together with seamonkey without error).
When you will add this patch to thunderbird-2.0.0.8 (whenever it's released) you also can drop the hack in the enigmail ebuild
# Fix for gcc-4.2 and amd64, bug 186089
rm -f ${S}/config/gcc_hidden.h
touch ${S}/config/gcc_hidden.h
as its also effectively fixing the same issue
Comment 32 Walter Meinl 2007-11-03 17:46:06 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
> 

Probably you'll need to add the patch also to mozilla-sunbird patchset, see bug192038 mozilla-sunbird fails also when building with the debug USE flag.
Comment 33 Raúl Porcel (RETIRED) gentoo-dev 2007-11-06 16:26:03 UTC
(In reply to comment #32)
> Probably you'll need to add the patch also to mozilla-sunbird patchset, see
> bug192038 mozilla-sunbird fails also when building with the debug USE flag.
> 

Correct, fixed on 0.7 patchset 0.2
Comment 34 Raúl Porcel (RETIRED) gentoo-dev 2007-11-15 15:11:24 UTC
Fixed in mozilla-thunderbird-2.0.0.9 patchset 0.1, and on enigmail-0.95.3-r1 and 0.95.5-r1