Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 106193
Alias:
Product:
Component:
Status: RESOLVED
Resolution: NEEDINFO
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Drew Kirkpatrick <drew.kirkpatrick@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
libxml2_build_logs.tar.bz2 3 build logs for libxml2, which different binutils versions text/plain Drew Kirkpatrick 2005-09-29 05:43 0000 16.48 KB Details
2.15.90_log libxml2 build log for binutils version 2.15.90 text/plain Drew Kirkpatrick 2005-09-29 05:46 0000 203.26 KB Details
2.15.92.0.2-r10_log build log for libxml2 with binutils 2.15.92.0.2-r10 text/plain Drew Kirkpatrick 2005-09-29 05:47 0000 203.26 KB Details
2.16.1_log build log for libxml2 with binutils 2.16.1 text/plain Drew Kirkpatrick 2005-09-29 05:47 0000 203.26 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 106193 depends on: Show dependency tree
Bug 106193 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-09-16 07:16 0000
Get this with 3.4.4:
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
.libs/SAX.o: relocation R_X86_64_PC32 against
`xmlSAX2InternalSubset__internal_alias' can not be used when making a shared
object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status 


All the threads discussing how to resolve the "recompile with -fPIC" errors
(which seems fairly commong) do not solve this problem. As a work around, I have
moved back to 3.3.3, and am recompiling my entire system. Alternate versions of
libxml2 also have this problem, although other people report NOT being able to
reproduce this. 

Reproducible: Always
Steps to Reproduce:
1.emerge libxml2
2.
3.

Actual Results:  
usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
.libs/SAX.o: relocation R_X86_64_PC32 against
`xmlSAX2InternalSubset__internal_alias' can not be used when making a shared
object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status 

Expected Results:  
A cleanly compiled and merged package. 

shadowcat(root)> emerge --info
Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.12-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r4 x86_64 AMD Athlon(tm) 64 FX-53 Processor
Gentoo Base System version 1.6.13
dev-lang/python: 2.3.5-r2
sys-apps/sandbox: 1.2.12
sys-devel/autoconf: 2.13, 2.59-r6
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils: 2.15.92.0.2-r10
sys-devel/libtool: 1.5.18-r1
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -frename-registers"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -frename-registers"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo"
LANG="C"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa amd64 arts avi berkdb bitmap-fonts cdparanoia cdr crypt cups
curl dga dvd dvdr eds emboss encode esd fam firefox flac foomaticdb fortran gd
gdbm gif gnome gpm gstreamer gtk gtk2 imagemagick imlib ipv6 jack java jpeg jpg
junit kde ldap lzw lzw-tiff mad mikmod motif mp3 mpeg ncurses nls nvidia ogg
oggvorbis opengl pam pdflib perl pic png postgres ppds python qt quicktime
readline sdl slang spell ssl tcpd theora tiff truetype truetype-fonts
type1-fonts usb userlocales vorbis xine xinerama xml xml2 xmms xpm xv xvid xvmn
zlib userland_GNU kernel_linux elibc_glibc"
Unset: ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

shadowcat(root)>

------- Comment #1 From Patrick Lauer 2005-09-16 07:19:48 0000 -------
which version of libxml2 are we talking about here? 

------- Comment #2 From Simon Stelling (RETIRED) 2005-09-16 07:24:50 0000 -------
don't use gcc 3.3 on amd64 - it produces faulty code. if you use it anyway, we
won't help you and just tell you to recompile your whole system with 3.4, so you
could save some hours.. filing bugs is the only solution to this kind of problem

btw, you can remove -fomit-frame-pointer from your CFLAGS, it won't do anything
on amd64

------- Comment #3 From Drew Kirkpatrick 2005-09-16 07:36:33 0000 -------
By the way, the versions of libxml2 that I have this problem with is stable
version dev-libs/libxml2-2.6.19 as well as ~amd64 version 2.6.22

------- Comment #4 From Simon Stelling (RETIRED) 2005-09-16 08:44:07 0000 -------
okay, this works fine here with both versions. Why are you setting USE=pic but
not using a hardened profile? You really shouldn't have that flag in your USE.
also, what gcc-profile are you using? (use gcc-config -l to show it)

------- Comment #5 From Daniel Gryniewicz 2005-09-16 08:54:18 0000 -------
Note that the pic USE flag has virtually no effect on amd64.  I saw two
packages
where it turns of asm, all the rest only used that flag for x86 or !amd64.

------- Comment #6 From Drew Kirkpatrick 2005-09-16 10:26:41 0000 -------
I've removed the pic USE keyword, and here's my compiler information:

shadowcat(drew)> gcc-config -l
 [1] x86_64-pc-linux-gnu-3.3.3
 [2] x86_64-pc-linux-gnu-3.4.4 *
 [3] x86_64-pc-linux-gnu-3.4.4-hardened
 [4] x86_64-pc-linux-gnu-3.4.4-hardenednopie
 [5] x86_64-pc-linux-gnu-3.4.4-hardenednopiessp
 [6] x86_64-pc-linux-gnu-3.4.4-hardenednossp
shadowcat(drew)>

------- Comment #7 From Drew Kirkpatrick 2005-09-19 07:42:17 0000 -------
Looks very similar to this supposedly kdebase bug (79711), which states that
this is really a binutils bug. Proposed solution is to ditch the latest "stable"
binutils, and go back to 2.15.90.0.1. Will be testing and reporting back on this
today. 

------- Comment #8 From Drew Kirkpatrick 2005-09-19 09:28:03 0000 -------
Got it! Ok, downgrading binutils on amd64 to
sys-devel/binutils-2.15.90.0.1.1-r5
gets libxml2 to compile cleanly. I've entered this into my package.mask to get
my system to compile correctly:
>=sys-devel/binutils-2.15.92.0.2-r10


So is something severely wrong with binutils-2.15.92.0.2-r10? This sounds like
a
fairly common problem, although most of the postings I've seen about it revolve
around compiling kde...

------- Comment #9 From Gary Dezern 2005-09-21 20:23:01 0000 -------
Same issue compiling "net-libs/courier-authlib-0.57-r1" this evening (also
amd64.)  

Just added  =sys-devel/binutils-2.15.92.0.2-r10 to package.mask, emerge update
on binutils (to downgrade), and courier-authlib still doesn't merge:

Linking libauthpam.la
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr/lib64/libshadow.a(commonio.o): relocation R_X86_64_32 can not be used when
making a shared object; recompile with -fPIC
/usr/lib64/libshadow.a(commonio.o): could not read symbols: Bad value
collect2: ld returned 1 exit status

emerge --info:

Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.13-gentoo-r2 x86_64)
=================================================================
System uname: 2.6.13-gentoo-r2 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.13
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.15.90.0.1.1-r5
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -fomit-frame-pointer -fweb -frename-registers -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -fomit-frame-pointer -fweb -frename-registers -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict
userpriv"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d acpi alsa apache2 athena bash-completion berkdb bitmap-fonts
ccache cdparanoia cli cracklib crypt ctype doc emacs encode exif fam gd gdbm
gif
gpm gtk gtk2 imagemagick imap innodb ithreads java jpeg maildir motif mp3 mpeg
mpeg4 mpm-worker mysql mysqli ncurses nls no-htdocs nptl nvidia ogg oggvorbis
opengl oss pam passfile pcre pdo-external pear perl php png readline rtc samba
server session simplexml spell ssl threads tiff truetype truetype-fonts type1
type1-fonts usb xml xml2 xsl xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

gcc --version
gcc (GCC) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)

------- Comment #10 From Gary Dezern 2005-09-22 15:56:03 0000 -------
More info:  re-emerged shadow with the older binutils, and then courier-authlib
emerged just fine with no errors.

------- Comment #11 From SpanKY 2005-09-26 06:16:21 0000 -------
unable to reproduce at all

you'll need to post a full build log with binutils-2.16.1

run `emerge libxml2 >& log` and post the log as an attachment


------- Comment #12 From Drew Kirkpatrick 2005-09-26 06:20:06 0000 -------
I've already rebuilt my entire system with the older binutils (was in middle of
emerge -e system && emerge -e world...) so I can't reproduce this now, anyone
else still have the latest "stable" binutils who can reproduce this? If not,
maybe when my system is done compiling I can re-emerge the new binutils and
reproduce it quicky....Might take a while tho

------- Comment #13 From SpanKY 2005-09-26 17:10:08 0000 -------
well get back to us please

------- Comment #14 From Gregorio Guidi (RETIRED) 2005-09-29 01:52:16 0000 -------
*** Bug 73931 has been marked as a duplicate of this bug. ***

------- Comment #15 From Drew Kirkpatrick 2005-09-29 05:43:45 0000 -------
Created an attachment (id=69480) [details]
3 build logs for libxml2, which different binutils versions

Ok, what I have is a 2005.0 system completely rebuilt with binutils 2.15.90.
I've logged the building of libxml2 with that (a simple rebuild), then I
emerged the current amd64 stable package of binutils 2.15.92.0.2-r10, and
repeated the emerging/logging of libxml2. 

Strangley, now it compliles cleanly, which never happened WHILE is I was in the
process of my 2004.3->2005.0 migration, and the followup emerge -e system &&
emerge -e system && emerge -e world && emerge -e world. Therefore I don't know
if this will help you track down this most elusive of problems that seems to be
inflicting many people (just search for -fpic issues, seems to be in KDE a
bunch as well). I also logged the building of libxml2 with the ~amd64 binutils
2.16.1, which also cleanly compiled. 

All logs are named with the version of binutils they were compiled against. I
did not recompile any other packages besides binutils and libxml2, so maybe
there's something else screwing up libxml2, that depends on the version of
binutils when its built. I hope this helps, thanks!

------- Comment #16 From Drew Kirkpatrick 2005-09-29 05:46:27 0000 -------
Created an attachment (id=69481) [details]
libxml2 build log for binutils version 2.15.90

------- Comment #17 From Drew Kirkpatrick 2005-09-29 05:47:02 0000 -------
Created an attachment (id=69482) [details]
build log for libxml2 with binutils 2.15.92.0.2-r10

------- Comment #18 From Drew Kirkpatrick 2005-09-29 05:47:28 0000 -------
Created an attachment (id=69483) [details]
build log for libxml2 with binutils 2.16.1

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug