Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68457 - smpeg fails with relocation R_X86_64_32 can not be used when making a shared object
Summary: smpeg fails with relocation R_X86_64_32 can not be used when making a shared ...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 83369
  Show dependency tree
 
Reported: 2004-10-21 13:41 UTC by Bob Sanders
Modified: 2005-03-25 21:05 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Sanders 2004-10-21 13:41:56 UTC
Smpeg fails the emerge stating that a recompile using -fPIC is necessary.

I've recompiled the following with -fPIC set -

 gcc
 glibc
 binutils
 xorg-x11
 libsdl

And I've done the recompile indivudally, and in sequence.  The error is 
always the same.

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



Expected Results:  
mv -f .libs/MPEGsystem.lo MPEGsystem.lo
/bin/sh ./libtool --mode=link g++  -O2 -pipe -fexpensive-optimizations
-fomit-frame-pointer -I/usr/include/SDL -D_REENTRANT -DTHREADED_AUDIO
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-I/usr/X11R6/include  -I/usr/X11R6/include -DNDEBUG -I.. -DNOCONTROLS -I.
-I./audio -I./video -fno-exceptions -fno-rtti  -o libsmpeg.la -rpath /usr/lib
-release 0.4                -version-info 1:3:1 MPEG.lo MPEGring.lo MPEGlist.lo
MPEGstream.lo MPEGsystem.lo MPEGfilter.lo smpeg.lo audio/libaudio.la           
    video/libvideo.la -lsupc++ -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lm
rm -fr .libs/libsmpeg.la .libs/libsmpeg.* .libs/libsmpeg-0.4.*
gcc -shared  MPEG.lo MPEGring.lo MPEGlist.lo MPEGstream.lo MPEGsystem.lo
MPEGfilter.lo smpeg.lo -Wl,--whole-archive audio/.libs/libaudio.al
video/.libs/libvideo.al -Wl,--no-whole-archive  -L/usr/lib -lSDL -lpthread -lm
-lSDL -lpthread -lm -lsupc++ -lSDL -lpthread -lm -lc  -Wl,-soname
-Wl,libsmpeg-0.4.so.0 -o .libs/libsmpeg-0.4.so.0.1.3
/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr/lib/libSDL.a(SDL_error.o): relocation R_X86_64_32 can not be used when
making a shared object; recompile with -fPIC
/usr/lib/libSDL.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libsmpeg.la] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/smpeg-0.4.4-r4/work/smpeg-0.4.4'
make: *** [all-recursive] Error 1

!!! ERROR: media-libs/smpeg-0.4.4-r4 failed.
!!! Function src_compile, Line 48, Exitcode 2
!!! emake failed
!!! If you need support, post the topmost build error, NOT this status message.


crosis root # gcc -v
Reading specs from /usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/specs
Configured with: /var/tmp/portage/gcc-3.3.4-r1/work/gcc-3.3.4/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.3
--includedir=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3/info --enable-shared
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-system-zlib
--enable-languages=c,c++,f77 --enable-threads=posix --enable-long-long
--disable-checking --disable-libunwind-exceptions --enable-cstdio=stdio
--enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/include/g++-v3
--with-local-prefix=/usr/local --enable-shared --enable-nls
--without-included-gettext --enable-multilib --enable-__cxa_atexit
--enable-clocale=generic
Thread model: posix
gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)

crosis root # emerge info
Portage 2.0.51 (default-amd64-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.6.8-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.8-gentoo-r4 x86_64 AMD Opteron(tm) Processor 240
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux26-headers-2.6.6-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks"
GENTOO_MIRRORS="ftp://acoma.engr.sgi.com/gentoo
ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
http://gentoo.binarycompass.org http://ftp-mirror.internap.com/pub/gentoo/
http://ftp.easynet.nl/mirror/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="S3TC X aac aalib accessibility acpi alsa amd64 ansi apache2 async audiofile
avi berkdb bitmap-fonts bzlib cairo cap cdinstall cdparanoia cdr cjk codecs
crypt cups dbx dillo dio divx4linux doc dts dv dvd dvdr dvdread encode erandom
escreen esd etwin exif f77 faac faad fam ffmpeg fftw flac flash fluidsynth
foomaticdb ftp gb gd gdbm gif gimpprint glut gmp gpm gs gtk gtk2 ieee1394 image
imagemagick imlib imlib2 innodb iodbc ipv6 jack jack-tmpfs jpeg ladcca lcms
libcaca libgda libsamplerate libwww lzo lzw lzw-tiff mad mbox mikmod mime mixer
mng monkey motif mp3 mpeg mpeg4 mplayer multilib mysql ncurses nis nls nntp nptl
nptlonly odbc offensive oggvorbis openal opengl operanom2 oss pam pdflib perl
php physfs pic png posix ppds python qt quicktime readline recode rtc ruby sdl
session slang slp sndfile snmp sockets spell spl sqlite ssl svg tcltk tcpd tidy
tiff tokenizer transcode truetype trusted uim usb uudeview v4l v4l2 vcdimager
videos wmf xfs xine xml2 xmms xpm xprint xrandr xv xvid xvmc yv12 zlib zvbi"
Comment 1 Jeffrey Forman (RETIRED) gentoo-dev 2004-10-24 12:55:07 UTC
Uh, definitely not my bug. 

-Jeffrey
Comment 2 Karol Wojtaszek (RETIRED) gentoo-dev 2004-10-25 15:29:16 UTC
I think that is libSDL.so lib problem. Please recompile sdl.
Comment 3 Bob Sanders 2004-10-26 12:09:58 UTC
>I think that is libSDL.so lib problem. Please recompile sdl.

I've recompiled libsdl several times with and without the -fPIC flag and the 
results have been the same.

This morning, I did -  emerge -e smpeg

And the result was the same -
/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/libSDL.a(SDL_error.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
/usr/lib/libSDL.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libsmpeg.la] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/smpeg-0.4.4-r4/work/smpeg-0.4.4'
make: *** [all-recursive] Error 1


Additionally, I tried to emerge xine-ui and upon the compile of xine-lib,
the error surfaced -

/bin/sh ../../libtool-nofpic --mode=link gcc -I/usr/X11R6/include -DXINE_COMPILE  -I/usr/include/SDL -D_REENTRANT -I../../src/video_out/vidix -I../../src/video_out/vidix -I/usr/include    -I/usr/include/ -O3 -fomit-frame-pointer   -fexpensive-optimizations -fschedule-insns2 -fno-strict-aliasing -ffast-math -funroll-loops -finline-functions -Wall -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE  -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -DENABLE_IPV6 -O2 -pipe -ffunction-sections   -o xineplug_vo_out_sdl.la -rpath /usr/lib/xine/plugins/1.0.0 -avoid-version -module  alphablend.lo video_out_sdl.lo -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread ../../src/xine-engine/libxine.la 
libtool-nofpic: link: warning: `/usr/lib64/libfreetype.la' seems to be moved
gcc -shared  .libs/alphablend.o .libs/video_out_sdl.o -Wl,--whole-archive /usr/lib/libSDL.a -Wl,--no-whole-archive  -Wl,--rpath -Wl,/var/tmp/portage/xine-lib-1_rc6/work/xine-lib-1-rc6a/src/xine-engine/.libs -Wl,--rpath -Wl,/usr/lib -L/usr/lib64 -L/usr/X11R6/lib64 -L/usr/lib/../lib64 -L/lib/../lib64 -L/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/../../../../lib64 -L/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/../../../../x86_64-pc-linux-gnu/lib -L/usr/x86_64-pc-linux-gnu/lib -L/usr/x86_64-pc-linux-gnu/bin -L/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4 -L/usr/lib -lpthread ../../src/xine-engine/.libs/libxine.so  -Wl,-rpath -Wl,/usr/lib -Wl,-soname -Wl,xineplug_vo_out_sdl.so -o .libs/xineplug_vo_out_sdl.so
/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/libSDL.a(SDL.o): relocation R_X86_64_32 can not be used when making 
a shared object; recompile with -fPIC
/usr/lib/libSDL.a(SDL.o): could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [xineplug_vo_out_sdl.la] Error 1
make[4]: Leaving directory `/var/tmp/portage/xine-lib-1_rc6/work/xine-lib-1-rc6a/src/video_out'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/xine-lib-1_rc6/work/xine-lib-1-rc6a/src/video_out'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/xine-lib-1_rc6/work/xine-lib-1-rc6a/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/xine-lib-1_rc6/work/xine-lib-1-rc6a'
make: *** [all] Error 2

!!! ERROR: media-libs/xine-lib-1_rc6 failed.
!!! Function src_compile, Line 147, Exitcode 2
!!! Parallel make failed
!!! If you need support, post the topmost build error, NOT this status message.


Bob
Comment 4 Bob Sanders 2004-10-28 13:19:03 UTC
After a whole lot of compiles, this USE flag seems to trigger the problem -

[X] libcaca                 (   ) Local Flag: Enables libcaca support, colored ASCII-art graphics (media-video/mplayer)

Remove it, smpeg compiles, add it, and the -fPIC error show up.

Bob

Comment 5 Simon Stelling (RETIRED) gentoo-dev 2004-10-29 08:11:43 UTC
sorry, i can't confirm that, neither with nor without USE="libcaca". you could try  to disable ccache, clean out the /var/tmp/portage/libsdl-version dir and emerge libsdl again with USE="libcaca". perhaps this will help?
Comment 6 Bob Sanders 2004-11-01 09:24:59 UTC
I cleaned out /var/tmp/portage, and I'm not using ccache, but it fails
the same on my workstation.  I also tried on another dual-opteron server
that doesn't have mplayer.

Without the USE flag the compile worked.  Flipping the USE flag and the
compile fails the same way.

Here are the currrent steps I use to create the problem -

   ufed ---> sel libcaca, return to save
   emerge libsdl smpeg

Bob
Comment 7 Chris Mathis 2004-11-23 07:52:46 UTC
What happens if you do a emerge --newuse -uDa world after changing the use flag?
Comment 8 Bob Sanders 2004-11-24 11:48:00 UTC
crosis rsanders # emerge --newuse -av world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[ebuild     U ] media-libs/libcaca-0.9-r1 [0.9] +X +doc +imlib +ncurses -slang* 0 kB 
[ebuild   R   ] media-libs/libsdl-1.2.7-r3  +X +aalib +alsa -arts -dga -directfb +esd -fbcon -ggi +libcaca* -nas -noaudio -nojoystick -novideo +opengl +oss (-svga) -xinerama -xv 0 kB 
[ebuild   R   ] media-video/mplayer-1.0_pre4-r7  (-3dfx) (-3dnow) (-3dnowex) +X +aalib +alsa (-altivec) -arts -bidi -cdparanoia -debug -directfb +divx4linux -dvb +dvd +dvdread -edl +encode +esd -fbcon -ggi +gif +gnome +gtk +ipv6 -joystick +jpeg +libcaca* -lirc +live +lzo +mad -matroska -matrox (-mmx) (-mmx2) +mpeg -mythtv -nas +network +nls +oggvorbis +opengl +oss +png +real +rtc -samba +sdl (-sse) (-svga) +tga +theora +truetype +v4l +v4l2 -xinerama +xmms -xv +xvid 0 kB 

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No] No


Doing the -uD --newuse gives -

crosis rsanders # emerge --newuse -uDa world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!
[blocks B     ] x11-themes/gtk-engines-thinice (from pkg x11-themes/gnome-themes-2.6.2)
[ebuild   R   ] media-libs/freetype-2.1.5-r1  
[ebuild   R   ] net-www/lynx-2.8.5  
[ebuild   R   ] dev-libs/libxml2-2.6.15-r1  
[ebuild   R   ] dev-libs/glib-2.4.6  
[ebuild   R   ] media-libs/tiff-3.6.1-r2  
[ebuild   R   ] app-text/ghostscript-7.07.1-r7  
[ebuild   R   ] app-doc/doxygen-1.3.8  
[ebuild   R   ] media-sound/jack-audio-connection-kit-0.99.0  
[ebuild   R   ] x11-libs/pango-1.4.1-r1  
[ebuild   R   ] dev-libs/atk-1.6.1  
[ebuild   R   ] media-libs/aalib-1.4_rc4-r2  
[ebuild     U ] media-libs/libcaca-0.9-r1 [0.9] 
[ebuild   R   ] media-libs/libsdl-1.2.7-r3  
[ebuild   R   ] media-libs/libao-0.8.5  
[ebuild   R   ] net-misc/curl-7.11.1  
[ebuild   R   ] gnome-base/libglade-2.4.0  
[ebuild   R   ] gnome-base/libgnomecanvas-2.6.1.1  
[ebuild   R   ] gnome-base/libgnomeprint-2.6.2  
[ebuild   R   ] gnome-base/libgnomeprintui-2.6.2  
[ebuild   R   ] gnome-base/orbit-2.10.3  
[ebuild   R   ] gnome-base/libbonobo-2.6.2  
[ebuild   R   ] gnome-base/gconf-2.8.0.1  
[ebuild   R   ] gnome-base/gnome-vfs-2.6.1.1  
[ebuild   R   ] gnome-base/libgnome-2.6.1.1-r1  
[ebuild   R   ] gnome-base/libbonoboui-2.6.1  
[ebuild   R   ] gnome-base/libgnomeui-2.6.1.1  
[ebuild   R   ] media-gfx/imagemagick-6.1.3.2  
[ebuild   R   ] dev-php/php-5.0.2-r1  
[ebuild   R   ] dev-php/php-cgi-5.0.2  
[ebuild   R   ] gnome-base/gnome-libs-1.4.2  
[ebuild   R   ] x11-libs/fltk-1.1.4  
[ebuild   R   ] media-libs/libdv-0.102  
[ebuild   R   ] media-libs/xvid-0.9.1  
[ebuild   R   ] media-video/ffmpeg-0.4.8.20040322  
[ebuild   R   ] media-video/avifile-0.7.38.20030710-r1  
[ebuild   R   ] media-video/mjpegtools-1.6.2-r3  
[ebuild   R   ] x11-libs/evas-1.0.0.20041031_pre13  
[ebuild   R   ] gnome-base/librsvg-2.6.5  
[ebuild   R   ] media-libs/id3lib-3.8.3-r3  
[ebuild   R   ] media-video/mplayer-1.0_pre4-r7  
[ebuild   R   ] kde-base/kdelibs-3.3.0  
[ebuild   R   ] media-gfx/xloadimage-4.1-r1  
[ebuild   R   ] app-doc/quanta-docs-20030405  
[ebuild   R   ] media-libs/xine-lib-1_rc6  
[ebuild   R   ] kde-base/kdemultimedia-3.3.0  
[ebuild   R   ] kde-base/kdeaddons-3.3.0  
[ebuild   R   ] app-cdr/cdrdao-1.1.8-r1  
[ebuild   R   ] app-admin/gkrellm-2.1.28-r1  
[ebuild   R   ] dev-perl/gtk-perl-0.7008-r10  
[ebuild   R   ] gnome-base/libglade-0.17-r6  
[ebuild   R   ] x11-libs/gtkglext-1.0.6  

!!! Error: The above package list contains packages which cannot be installed
!!!        on the same system.


Bob
Comment 9 Danny van Dyk (RETIRED) gentoo-dev 2005-03-03 15:06:36 UTC
Bob: please have a look if libSDL.so exists on your system and report us.
Comment 10 Danny van Dyk (RETIRED) gentoo-dev 2005-03-25 14:29:55 UTC
Bob: Please tell us if this BUG has resolved in the meantime or if you still experience it. Otherwise, i'll close this one at the end of the month.
Comment 11 Bob Sanders 2005-03-25 21:05:42 UTC
Yes libSDL.so does exist.

As to whether it's resolved in the meantime. I've not attempted to reproduce
the bug this year.  It will be 1.5 wks from this date before I will have
access to the system to run through the steps again.

Bob