Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186089 - [4.2/bad code] non-PIC code generation
Summary: [4.2/bad code] non-PIC code generation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceware.org/bugzilla/show_b...
Whiteboard:
Keywords:
: 179744 186538 186583 186681 186702 186743 186763 186774 186944 187035 187102 187245 187326 187486 187692 187700 187718 187757 187761 187808 187843 187849 187934 187975 188101 188156 188209 188592 193410 203836 (view as bug list)
Depends on:
Blocks: gcc-4.2 187353
  Show dependency tree
 
Reported: 2007-07-21 11:51 UTC by Grzegorz {NineX} Krzystek
Modified: 2009-04-07 04:23 UTC (History)
61 users (show)

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


Attachments
build.log (build.log,855.74 KB, text/plain)
2007-07-21 11:53 UTC, Grzegorz {NineX} Krzystek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz {NineX} Krzystek 2007-07-21 11:51:18 UTC
x11-plugins/enigmail-0.95.2 compilation fails
build.log attached

emerge --info
Portage 2.1.3_rc8 (default-linux/amd64/2007.0, gcc-4.2.0, glibc-2.6-r0, 2.6.22-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r1 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System release 1.12.10
Timestamp of tree: Sat, 21 Jul 2007 11:00:01 +0000
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -pipe -O2 -fomit-frame-pointer"
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/init.d /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -pipe -O2 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans"
GENTOO_MIRRORS="http://gentoo.prz.rzeszow.pl           http://gentoo.po.opole.pl               http://distfiles.gentoo.org             http://www.ibiblio.org/pub/Linux/distributions/gentoo              http://dev.gentoo.org"
LINGUAS="pl en"
MAKEOPTS="-j2"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X a52 aac acpi alsa amd64 arj arts audacious bash-completion bzip2 cdparanoia chardet cups dbus deprecated devil dga discouraged divx dri dts dv dvd dvdr dvdread encode exif fbcon ffmpeg gif gnutls gpm hal iconv idea ieee1394 ipv6 java jpeg jpeg2k kde kdeenablefinal lha lm_sensors logitech-mouse logrotate lzo mad midi mmx mmxext mng mp3 mpeg ncurses network-cron nls no-old-linux nptl nptlonly nsplugin ogg opengl pam pcre pdf perl plugins png ppds python qt3 rar slang spell sse sse2 ssl svg symlink test theora threads tiff truetype unicode voice vorbis wifi wma wmf wmp x264 xanim xorg xscreensaver xv xvid zip zlib" ALSA_CARDS="hda-intel" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Reproducible: Always
Comment 1 Grzegorz {NineX} Krzystek 2007-07-21 11:53:08 UTC
Created attachment 125544 [details]
build.log
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-07-21 11:57:03 UTC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: nsEnigModule.o: relocation R_X86_64_PC32 against `NS_NewGenericModule2(nsModuleInfo const*, nsIModule**)' 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[2]: *** [libenigmime.so] Error 1
Comment 3 Raúl Porcel (RETIRED) gentoo-dev 2007-07-21 14:00:57 UTC
Hrm...try with 0.95.1?

Unless it fails because gcc-4.2...
Comment 4 Kenneth Prugh (RETIRED) gentoo-dev 2007-07-21 14:21:45 UTC
It's GCC 4.2's fault. x11-plugins/enigmail-0.95.2 compiles fine with gcc 4.1.2 here, but always fails when I use GCC 4.2.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-07-25 05:08:42 UTC
*** Bug 186538 has been marked as a duplicate of this bug. ***
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-07-25 05:12:08 UTC
Sending this to toolchain folks, looks like some weird regression.
Comment 7 SpanKY gentoo-dev 2007-07-25 12:52:17 UTC
*** Bug 186583 has been marked as a duplicate of this bug. ***
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-07-25 13:58:18 UTC
BTW, anyone tried w/ binutils-2.17.50.0.17?
Comment 9 SpanKY gentoo-dev 2007-07-25 21:04:21 UTC
i'd stay away from binutils-2.17.50.0.17 for now ... test binutils-2.17.50.0.16 first
Comment 10 Ryan Hill (RETIRED) gentoo-dev 2007-07-25 23:02:10 UTC
what thunderbird version are you building against?
Comment 11 Kenneth Prugh (RETIRED) gentoo-dev 2007-07-25 23:21:50 UTC
Building against thunderbird-2.0.0.5 here.
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-07-26 11:43:26 UTC
(In reply to comment #10)
> what thunderbird version are you building against?

Well, it doesn't build against the installed TB, it uses TB sources in SRC_URI, you don't even need TB installed to compile enigmail. 

Comment 13 Jakub Moc (RETIRED) gentoo-dev 2007-07-26 14:48:21 UTC
*** Bug 186681 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2007-07-26 15:46:55 UTC
*** Bug 186702 has been marked as a duplicate of this bug. ***
Comment 15 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-07-26 16:34:15 UTC
(In reply to comment #8)
> anyone tried w/ binutils-2.17.50.0.17?

Binutils 2.17.50.0.17 fix these problems.
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2007-07-26 19:19:59 UTC
*** Bug 179744 has been marked as a duplicate of this bug. ***
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2007-07-27 10:45:39 UTC
*** Bug 186774 has been marked as a duplicate of this bug. ***
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2007-07-27 11:11:26 UTC
*** Bug 186743 has been marked as a duplicate of this bug. ***
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2007-07-27 11:12:43 UTC
*** Bug 186763 has been marked as a duplicate of this bug. ***
Comment 20 Ryan Hill (RETIRED) gentoo-dev 2007-07-28 01:09:34 UTC
(In reply to comment #12)
> (In reply to comment #10)
> > what thunderbird version are you building against?
> 
> Well, it doesn't build against the installed TB, it uses TB sources in SRC_URI,
> you don't even need TB installed to compile enigmail. 

Ah, okay.  I saw a couple reports of this on other distros building enigmail against TB, but with SeaMonkey it works.  But I was barking up the wrong tree (different bug).

This is also http://bugs.debian.org/379260

Comment 21 Neil Bothwick 2007-07-28 06:05:36 UTC
(In reply to comment #8)
> BTW, anyone tried w/ binutils-2.17.50.0.17?

I can confirm that it fixed the problem with kdelibs, qt-4.3.0 and digikam on amd64. kdelibs compiled fine with the older binutils on ppc, is this a 64 bit problem?


Comment 22 David Philippi 2007-07-28 12:40:20 UTC
I've got the same problem with kdelibs using GCC 4.2 on ~AMD64. Can someone tell me wheter trying to unmask the most recent binutils is likely to trash my system or wheter I can expect it to run with at most some minor problems? In the latter case I'd gladly do it...
Comment 23 SpanKY gentoo-dev 2007-07-28 20:10:35 UTC
i researched the troubles people were having with binutils-2.17.50.0.17 and it should be sorted out now, so it should be relatively safe

just build up a binpkg of your old binutils-2.17 so you can restore if things go south -- be warned you should not downgrade binutils once you've rebuilt gcc against a newer one
Comment 24 David Philippi 2007-07-28 23:48:59 UTC
Is there some documentation on how to build a binpkg of binutils and probably at least gcc to go back in case of need? Never done this before but the current state isn't nice at all. But well, I'm using unstable so some trouble is ok. 
Comment 25 SpanKY gentoo-dev 2007-07-28 23:52:23 UTC
`man emerge`

for the lazy:
quickpkg binutils
emerge -K binutils
Comment 26 Jakub Moc (RETIRED) gentoo-dev 2007-07-29 06:05:37 UTC
*** Bug 186944 has been marked as a duplicate of this bug. ***
Comment 27 Jakub Moc (RETIRED) gentoo-dev 2007-07-29 18:56:49 UTC
*** Bug 187035 has been marked as a duplicate of this bug. ***
Comment 28 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-07-29 20:42:24 UTC
(In reply to comment #23)
> i researched the troubles people were having with binutils-2.17.50.0.17 and
> it should be sorted out now, so it should be relatively safe

Of course media-gfx/splashutils[truetype] still fails with binutils-2.17.50.0.17.
Comment 29 Paul Taylor 2007-07-30 00:58:34 UTC
qt-4.3.0 now builds with sys-devel/binutils-2.17.50.0.17
Comment 30 Christian Schmidt 2007-07-30 06:17:58 UTC
(In reply to comment #28)
> Of course media-gfx/splashutils[truetype] still fails with
> binutils-2.17.50.0.17.

This is a different issue, at least for me:
A klcc-compiled conftest fragment is killed. The debugger shows me it is killed before it reaches the first assembler instruction in main(), so it's somewhere else; also, strace gives the same idea:
strace ./conftest
execve("./conftest", ["./conftest"], [/* 41 vars */]) = -1 EINVAL (Invalid argument)
+++ killed by SIGKILL +++
Process 18912 detached.
I don't really have a clue what that means - broken ELF-header, I guess, as this is a static executable.
You can see that in the config log:
/var/tmp/portage/media-gfx/splashutils-1.4.3/work/splashutils-1.4.3/libs/freetyp
e-2.1.9/builds/unix/configure: line 4308: 17598 Killed                  ./confte
st$ac_exeext
[...]
configure:4320: error: cannot compute sizeof (int), 77
Comment 31 Jakub Moc (RETIRED) gentoo-dev 2007-07-30 09:41:42 UTC
*** Bug 187102 has been marked as a duplicate of this bug. ***
Comment 32 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-07-30 13:39:57 UTC
(In reply to comment #30)
> A klcc-compiled conftest fragment is killed. The debugger shows me it is
> killed before it reaches the first assembler instruction in main(), so it's
> somewhere else
> ...
> I don't really have a clue what that means

Please check a test program in bug 185111 and continue this discussion about klcc+binutils in that bug.
Comment 33 Christian Schmidt 2007-07-30 14:08:24 UTC
(In reply to comment #32)
> (In reply to comment #30)
> > A klcc-compiled conftest fragment is killed.

Yeah, comment #28 most likely has the problem mentioned in bug 185111, while the binutils fix this bug (related to gcc-4.2.0 and -fPIC code generation).
Comment 34 Richard Connon 2007-07-30 14:36:18 UTC
So when will we have a binutils which fixes this with at least some ~arch keywords?
Comment 35 Jakub Moc (RETIRED) gentoo-dev 2007-07-31 12:42:11 UTC
*** Bug 187245 has been marked as a duplicate of this bug. ***
Comment 36 Richard Connon 2007-07-31 14:22:25 UTC
I'm still having the problem with enigmail and binutils-2.17.50.0.17
Comment 37 Jakub Moc (RETIRED) gentoo-dev 2007-08-01 06:43:55 UTC
*** Bug 187326 has been marked as a duplicate of this bug. ***
Comment 38 Bernd Steinhauser 2007-08-01 13:27:18 UTC
I'm still experiencing this problem after recompiling gcc-4.2.0 with 
binutils-2.17.50.0.17, too.
Does anything else have to be recompiled using the new version of binutils?
Comment 39 Jakub Moc (RETIRED) gentoo-dev 2007-08-02 11:27:12 UTC
*** Bug 187486 has been marked as a duplicate of this bug. ***
Comment 40 Bernd Steinhauser 2007-08-02 12:48:22 UTC
Just to let you know.
I emerged =gcc-4.2.1 and it shows the same error.

For me, this error only remains in the enigmail package.
qt (and maybe others), that showed the error compile fine.
So why is it only enigmail, that still fails?
Comment 41 Doug Goldstein (RETIRED) gentoo-dev 2007-08-03 16:26:21 UTC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: .obj/release-shared/qiodevice.o: relocation R_X86_64_PC32 against `QList<QByteArray>::clear()' 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

x11-libs/qt-4.3.0-r1 fails

Portage 2.1.3.2 (default-linux/amd64/2006.1/desktop, gcc-4.2.0, glibc-2.6-r0, 2.6.22-ck1 x86_64)
=================================================================
System uname: 2.6.22-ck1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Gentoo Base System release 2.0.0_alpha4
Timestamp of tree: Fri, 03 Aug 2007 13:30:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
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.17-r1
sys-devel/gcc-config: 1.4.0
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64 -msse3 -ggdb"


Biggest thing to note is my binutils version, since everyone on this bug seems to discuss 2.17.50 versions..
Comment 42 Richard Connon 2007-08-03 17:45:59 UTC
Yes.. the 2.17.50.* versions are the ones which work.
2.17-r1 is the one which had the original problem.

Try unmasking binutils-2.17.50.0.17 or masking qt-4.3.0
Comment 43 Bernd Steinhauser 2007-08-03 21:02:25 UTC
Just recompiled both qt-4.3.0 and enigmal-0.9.52 to verify my statement above
and I've got the situation, that qt-4.3.0 compiles fine, but enigmail still
failes, showing the error above. Is there maybe a bug in enigmail triggering this?
I also tried enigmail-0.9.50, same thing.
Comment 44 Austin McKinley 2007-08-03 22:06:04 UTC
I can also confirm that unmasking sys-devel/binutils-2.17.50.0.17 fixes the qt build.
Comment 45 Richard Connon 2007-08-03 22:13:08 UTC
So it is a matter of pinpointing the difference between the qt and enigmail code which causes this issue.
Comment 46 Christian Schmidt 2007-08-04 07:20:49 UTC
Bug persists with gcc-4.2.1 and binutils-2.17.50.0.18, too.
Comment 47 Jakub Moc (RETIRED) gentoo-dev 2007-08-04 08:08:33 UTC
*** Bug 187692 has been marked as a duplicate of this bug. ***
Comment 48 Jakub Moc (RETIRED) gentoo-dev 2007-08-04 10:02:57 UTC
*** Bug 187700 has been marked as a duplicate of this bug. ***
Comment 49 Jakub Moc (RETIRED) gentoo-dev 2007-08-04 12:13:14 UTC
*** Bug 187718 has been marked as a duplicate of this bug. ***
Comment 50 Bernd Steinhauser 2007-08-04 15:26:42 UTC
Found these:
http://sourceware.org/bugzilla/show_bug.cgi?id=4398
http://sourceware.org/bugzilla/show_bug.cgi?id=3666
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30900
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664

Actually I'm not quite sure of it, since this problem, according to the bugreports
shouldn't be limited to gcc-4.2.
Comment 51 M. Edward Borasky 2007-08-04 19:28:39 UTC
OK ... it took me a while to get here, but I've got it too with qt-4.3.0-r2. So the workaround is what?(In reply to comment #44)
> I can also confirm that unmasking sys-devel/binutils-2.17.50.0.17 fixes the qt
> build.
> 

OK ... it took me a while to get here, but I've got it too with qt-4.3.0-r2. So the workaround is what? 
Comment 52 Jakub Moc (RETIRED) gentoo-dev 2007-08-05 05:52:27 UTC
*** Bug 187757 has been marked as a duplicate of this bug. ***
Comment 53 Jakub Moc (RETIRED) gentoo-dev 2007-08-05 05:53:48 UTC
*** Bug 187761 has been marked as a duplicate of this bug. ***
Comment 54 Jakub Moc (RETIRED) gentoo-dev 2007-08-05 13:49:39 UTC
*** Bug 187808 has been marked as a duplicate of this bug. ***
Comment 55 Jakub Moc (RETIRED) gentoo-dev 2007-08-05 20:39:43 UTC
*** Bug 187843 has been marked as a duplicate of this bug. ***
Comment 56 Jakub Moc (RETIRED) gentoo-dev 2007-08-05 20:56:26 UTC
*** Bug 187849 has been marked as a duplicate of this bug. ***
Comment 57 Christoph Mende (RETIRED) gentoo-dev 2007-08-05 21:01:05 UTC
are there any objections from toolchain to keywording binutils-2.17.50.17 or .18 ~amd64 to at least fix some failures?
Comment 58 M. Edward Borasky 2007-08-05 22:11:33 UTC
(In reply to comment #57)
> are there any objections from toolchain to keywording binutils-2.17.50.17 or
> .18 ~amd64 to at least fix some failures?
> 
As a user, I'd object to putting *workarounds* in Portage since apparently fixes are known and just need to be put through the process. I personally worked around the qt-4 build problem by dropping back to gcc 4.1.2 for the compile of qt-4. I run "testing" systems -- I *expect* to have to make workarounds. :)

By the way, this bug has got to have set some records for number and rate of duplicates coming into bugzilla. :)
Comment 59 Austin McKinley 2007-08-05 22:32:21 UTC
(In reply to comment #58)
> (In reply to comment #57)
> > are there any objections from toolchain to keywording binutils-2.17.50.17 or
> > .18 ~amd64 to at least fix some failures?
> > 
> As a user, I'd object to putting *workarounds* in Portage since apparently
> fixes are known and just need to be put through the process. I personally
> worked around the qt-4 build problem by dropping back to gcc 4.1.2 for the
> compile of qt-4.

This will break the next time you do an update to qt, since the next time you compile, gcc-4.2 will be invoked. Also, quoth the Gentoo GCC Upgrade Guide:

"To be completely safe that your system is in a sane state, you must rebuild the toolchain and then world to make use of the new compiler."

In other words, its probably a bad idea to mix code compiled with different versions of GCC...
Comment 60 Thomas Sachau gentoo-dev 2007-08-05 23:16:14 UTC
I also have an error with enigmail-0.95.2-r1 and gcc-4.2 on ~amd64.

enigmail-0.95.2-r1 and gcc-4.1.2 are working for me on ~amd64
enigmail-0.95.2-r1 and gcc-4.2   are working for me on ~x86

a ~amd64 only problem?
Comment 61 M. Edward Borasky 2007-08-05 23:25:19 UTC
> This will break the next time you do an update to qt, since the next time you
> compile, gcc-4.2 will be invoked. Also, quoth the Gentoo GCC Upgrade Guide:
> 
> "To be completely safe that your system is in a sane state, you must rebuild
> the toolchain and then world to make use of the new compiler."
> 
> In other words, its probably a bad idea to mix code compiled with different
> versions of GCC...
> 

Ah ... well in that case, I should package-mask gcc-4.2.0 and rebuild the whole system with 4.1.2, unless there's a fixed gcc coming into Portage with ~amd64 before I get the rebuild done. :)

And yes, I did that when I installed gcc 4.2.0. The rebuilds actually don't take very long on an Athlon64 X2 with 4 GB of RAM. With that much RAM I can let the load average get huge and still actually access the system interactively. :)
Comment 62 Chris Smith 2007-08-06 00:25:09 UTC
enigmail still fails on amd64 with gcc-4.2.0 & binutils-2.17.50.0.18
qt-4.3.0-r2, however, did compile
Comment 63 Samuli Suominen (RETIRED) gentoo-dev 2007-08-06 16:35:42 UTC
*** Bug 187934 has been marked as a duplicate of this bug. ***
Comment 64 Christoph Mende (RETIRED) gentoo-dev 2007-08-07 03:51:04 UTC
*** Bug 187975 has been marked as a duplicate of this bug. ***
Comment 65 Jakub Moc (RETIRED) gentoo-dev 2007-08-08 12:53:43 UTC
*** Bug 188101 has been marked as a duplicate of this bug. ***
Comment 66 Jakub Moc (RETIRED) gentoo-dev 2007-08-08 19:39:03 UTC
*** Bug 188156 has been marked as a duplicate of this bug. ***
Comment 67 Fabian Groffen gentoo-dev 2007-08-09 08:51:14 UTC
info:

For enigmail, the patch provided in bug #187353 appears to work fine as a workaround for us.  (gcc (GCC) 4.2.0 (Gentoo 4.2.0 p1.4)/GNU ld (Linux/GNU Binutils) 2.17.50.0.18.20070731)
Comment 68 Bernd Steinhauser 2007-08-09 10:53:31 UTC
(In reply to comment #67)
> info:
> 
> For enigmail, the patch provided in bug #187353 appears to work fine as a
> workaround for us.  (gcc (GCC) 4.2.0 (Gentoo 4.2.0 p1.4)/GNU ld (Linux/GNU
> Binutils) 2.17.50.0.18.20070731)
> 
Seems to work.
So finally, I've got whole world build with gcc-4.2*.
Comment 69 Caleb Tennis (RETIRED) gentoo-dev 2007-08-09 11:48:43 UTC
*** Bug 188209 has been marked as a duplicate of this bug. ***
Comment 70 Raúl Porcel (RETIRED) gentoo-dev 2007-08-09 13:48:44 UTC
Fix added for enigmail
Comment 71 Andrew Gaydenko 2007-08-09 13:55:12 UTC
qt 4.3.1 has the issue also.
Comment 72 Vytautas Jakutis 2007-08-09 14:20:46 UTC
qt-4.3* compiles ok using gcc-4.2.0, binutils-2.17.50.0.17
Comment 73 Andrew Gaydenko 2007-08-09 14:38:56 UTC
(In reply to comment #72)
> qt-4.3* compiles ok using gcc-4.2.0, binutils-2.17.50.0.17
> 

binutils-2.17.50.0.17 package is masked in official portage. Not being binutils guru :-) I  don't know is unmasking safe here or not.
Comment 74 Jakub Moc (RETIRED) gentoo-dev 2007-08-12 14:42:04 UTC
*** Bug 188592 has been marked as a duplicate of this bug. ***
Comment 75 Paul Taylor 2007-08-17 10:34:29 UTC
> binutils-2.17.50.0.17 package is masked in official portage. Not being binutils
> guru :-) I  don't know is unmasking safe here or not.
 
I didn't have any problems with binutils-2.17.50.0.17, but downgrading to 2.17-r1 broken my system...  Probably not safe, all things considered.
Comment 76 Andrew Gaydenko 2007-08-17 10:40:51 UTC
(In reply to comment #75)
> I didn't have any problems with binutils-2.17.50.0.17, but downgrading to
> 2.17-r1 broken my system...  Probably not safe, all things considered.

Paul, thanks! As I can see, it is better to find an additional patience and wait for the issue official fixing.

Comment 77 Christoph Mende (RETIRED) gentoo-dev 2007-08-17 13:16:28 UTC
(In reply to comment #75)
> but downgrading to
> 2.17-r1 broken my system...  Probably not safe, all things considered.
That's because you shouldn't downgrade binutils after gcc was compiled against the new binutils. Same thing would happen if you downgraded from 2.17 to 2.16.

Comment 78 Davide Pesavento gentoo-dev 2007-08-21 19:59:51 UTC
Something a bit different here...
app-shells/zsh-4.3.4 compilation fails but I'm NOT using gcc 4.2.

x86_64-pc-linux-gnu-gcc   -shared -o pcre.so   pcre..o    -L/usr/lib64 /usr/lib64/libpcre.a -ldl -lnsl -lncurses -lm  -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libpcre.a(pcre_compile.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/libpcre.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

Portage 2.1.3.6 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.22-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r3 x86_64 Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz
Gentoo Base System release 2.0.0_rc3
Timestamp of tree: Tue, 21 Aug 2007 17:20:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=nocona -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.ing.unibo.it/gentoo/ ftp://ftp.unina.it/pub/linux/distributions/gentoo/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LINGUAS="it"
MAKEOPTS="-j3"
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/portage/local/pesa /usr/portage/local/layman/kde"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 audiofile avahi bash-completion berkdb bitmap-fonts blas bluetooth bzip2 cairo caps cddb cdr cli cracklib crypt curl curlwrappers dbus dri dts dv dvd dvdr dvdread emboss encode evo exif expat fam fbcon ffmpeg fftw firefox flac ftp gd gdbm gif glut gmp gnutls gpm graphviz hal iconv idn ieee1394 imlib ipod ipv6 isdnlog jabber javascript jbig jpeg jpeg2k kde kdeenablefinal kdexdeltas lapack lcms ldap libsamplerate lirc lm_sensors lua mad mailwrapper matroska midi mmap mmx mng mozilla mp3 mpeg mplayer msn mudflap musepack musicbrainz ncurses nls nptl nptlonly nsplugin offensive ogg opengl openmp oss pam pcmcia pcre pdf plotutils png pppd pulseaudio python qt3 qt3support qt4 quicktime readline reflection ruby samba sasl sdl session slang sndfile snmp socks5 speex spell spl sqlite sqlite3 sse sse2 ssl svg tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts unicode usb v4l vcd vorbis wifi wmf x264 xcomposite xine xinerama xml xorg xpm xv xvid zlib" ALSA_CARDS="hda-intel" 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 synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" LIRC_DEVICES="inputlirc sir" USERLAND="GNU" VIDEO_CARDS="fglrx radeon vesa fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 79 Richard Connon 2007-08-23 10:04:11 UTC
app-shells/zsh-4.3.4 works here with gcc-4.2 and binutils-2.17.50.0.18
Comment 80 Daniel Santos 2007-09-02 05:37:50 UTC
To make this bug easier to find (thus, hopefully  prevent dupes), I'm pasting the actual failure from the build.  Also, this may also be the underlying cause

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26905


/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: nsEnigModule.o: relocation R_X86_64_PC32 against `NS_NewGenericModule2(nsModuleInfo const*, nsIModule**)' 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

Mine failed on this however:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: .obj/release-shared/qscriptecmaboolean.o: relocation R_X86_64_PC32 against `QList<QScriptClassInfo*>::append(QScriptClassInfo* const&)' 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
make[1]: *** [../../lib/libQtScript.so.4.3.1] Error 1
Comment 81 Davide Pesavento gentoo-dev 2007-09-02 10:26:41 UTC
So, judging from gcc bugzilla, this should be solved in gcc-4.2.1 which isn't in portage yet. Using newer binutils is just a workaround...
Comment 82 Christoph Mende (RETIRED) gentoo-dev 2007-09-02 10:45:40 UTC
Did you actually notice that you're demanding something that you just said is a workaround?
You say upgrading something (binutils in this case) is a workaround, but at the same time you demand an upgrade for gcc...
I agree that _downgrading_ something (gcc in this case) would be a workaround, but if you look at the actual error, you'll see that ld fails, we all know that ld is part of binutils, so upgrading binutils to a *fixed* version is perfectly fine imho.
Btw, the upstream bug that was posted here is completely unrelated, it says gcc-4.0 and 4.1 are affected, which is not the case for this bug.
Comment 83 Bernd Steinhauser 2007-09-02 13:26:02 UTC
(In reply to comment #81)
> So, judging from gcc bugzilla, this should be solved in gcc-4.2.1 which isn't
> in portage yet. Using newer binutils is just a workaround...
> 

I'm running gcc-4.2.1 and this bug is not fixed with gcc-4.2.1, it has been fixed
with binutils-2.17.50.0.17. 
I don't have this problem anymore (occured for me in qt-4.3 and enigmail and
maybe some others). Did a complete rebuild with a toolchain consisting of
gcc-4.2.1
binutils-2.17.50.0.18
glibc-2.6.1
and I had not one single failure.
Comment 84 Davide Pesavento gentoo-dev 2007-09-02 14:02:51 UTC
Ok, so the correct (binutils) upstream bug is
http://sourceware.org/bugzilla/show_bug.cgi?id=3666
and not that one posted in comment #80.

AFAICS this should be solved by binutils-2.18 and its pre-releases, and many people confirmed this in above comments.
binutils-2.18 is now in ~amd64, so I guess this bug should be marked as RESOLVED?
Comment 85 David Philippi 2007-09-02 14:09:52 UTC
I can confirm that binutils-2.18 fixed the problem with kdelibs for me. I did a full emerge -e world and the only package still failing was openoffice due to unrelated problems.
Comment 86 Patrizio Bassi 2007-09-02 16:17:53 UTC
for me it's fixed too.
Comment 87 Dan Armak 2007-09-02 16:57:26 UTC
Fixed here, too
Comment 88 SpanKY gentoo-dev 2007-09-02 17:08:43 UTC
fixed with binutils-2.18 release
Comment 89 Jakub Moc (RETIRED) gentoo-dev 2007-09-22 16:30:35 UTC
*** Bug 193410 has been marked as a duplicate of this bug. ***
Comment 90 nuitari 2007-10-03 10:20:54 UTC
I had to compile qt-4.3.1-r1 with FEATURES='-distcc' for it to work and not have the -fPIC issue. The 2nd machine I have for distcc was update to gcc-4.2.0 binutils-2.18 a while back, so I'll try recompiling them and see if I can reproduce the problem again. 

Portage 2.1.3.11 (default-linux/amd64/2006.1/desktop, gcc-4.2.0, glibc-2.6.1-r0, 2.6.21-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.21-gentoo-r3 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Timestamp of tree: Mon, 01 Oct 2007 10:30:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.5.1-r2
dev-python/pycrypto: 2.0.1-r5
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1
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
sys-devel/gcc-config: 1.4.0-r2
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=athlon64 -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/lib/fax /usr/share/X11/xkb /usr/share/config /var/bind /var/qmail/alias /var/qmail/control /var/spool/fax/etc"
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=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distcc distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en fr"
MAKEOPTS="-j5"
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/portage/local/layman/voip /usr/portage/local/layman/xeffects /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa amd64 apache2 berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus dlloader dv dvd dvdr eds emboss encode fam firefox fortran gdbm gif gpm gtk gtk2 hal iconv isdnlog jpeg kde kdeenablefinal lcd mad matroska midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly ogg oggvorbis opengl openmp pam pcre perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl svg tcpd truetype truetype-fonts type1-fonts unicode vorbis 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="g15" LINGUAS="en fr" USERLAND="GNU" VIDEO_CARDS="nvidia v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 91 Jakub Moc (RETIRED) gentoo-dev 2007-12-30 23:03:24 UTC
*** Bug 203836 has been marked as a duplicate of this bug. ***