emerge DirectFB fails: Making all in sdl make[4]: Entering directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20/src/core/sdl' /bin/sh ../../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../include -I../../../include-I../../../src -DDATADIR=\"/usr/share/directfb-0.9.20\" -DSOPATH=\"/usr/lib/libdirectfb-0.9.so.20\" -DMODULEDIR=\"/usr/lib/directfb-0.9.20\" "-DBUILDTIME=\"`date -u "+%Y-%m-%d %H:%M"`\"" -I/usr/include/libmpeg3 -I/usr/include/SDL -D_REENTRANT -D_REENTRANT -Wall -O3 -ffast-math -pipe -O2 -march=k8 -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -frename-registers -pipe -DFUSION_FAKE -Werror-implicit-function-declaration -c sdlinput.c mkdir .libs gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../include -I../../../include -I../../../src -DDATADIR=\"/usr/share/directfb-0.9.20\" -DSOPATH=\"/usr/lib/libdirectfb-0.9.so.20\" -DMODULEDIR=\"/usr/lib/directfb-0.9.20\" "-DBUILDTIME=\"2004-06-14 05:48\"" -I/usr/include/libmpeg3 -I/usr/include/SDL -D_REENTRANT -D_REENTRANT -Wall -O3 -ffast-math -pipe -O2 -march=k8 -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -frename-registers -pipe -DFUSION_FAKE -Werror-implicit-function-declaration -c sdlinput.c -fPIC -DPIC -o .libs/sdlinput.o /bin/sh ../../../libtool --mode=link gcc -I/usr/include/SDL -D_REENTRANT -D_REENTRANT -Wall -O3 -ffast-math -pipe -O2 -march=k8 -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -frename-registers -pipe -DFUSION_FAKE -Werror-implicit-function-declaration -lstdc++ -o libdirectfb_sdlinput.la -rpath /usr/lib/directfb-0.9.20/inputdrivers -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -export-dynamic -avoid-version -module sdlinput.lo -ldl -lpthread gcc -shared .libs/sdlinput.o -Wl,--whole-archive /usr/lib/libSDL.a -Wl,--no-whole-archive -Wl,--rpath -Wl,/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0 -Wl,--rpath -Wl,/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0 -L/usr/X11R6/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0 -L/usr/x86_64-pc-linux-gnu/lib -L/usr/x86_64-pc-linux-gnu/bin /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/libstdc++.so -L/usr/lib -ldl -lpthread -march=k8 -momit-leaf-frame-pointer -Wl,-rpath -Wl,/usr/lib -Wl,-soname -Wl,libdirectfb_sdlinput.so -o .libs/libdirectfb_sdlinput.so /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../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]: *** [libdirectfb_sdlinput.la] Error 1 make[4]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20/src/core/sdl' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20/src/core' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20' make: *** [all-recursive-am] Error 2 !!! ERROR: dev-libs/DirectFB-0.9.20 failed. !!! Function src_compile, Line 82, Exitcode 2 !!! (no error message) Re-emerging libsdl (either with USE="directfb" or USE="-directfb" doesn't help. emerge info: Portage 2.0.50-r8 (gcc34-amd64-2004.1, gcc-3.4.0, glibc-2.3.4.20040605-r0, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 x86_64 4 Gentoo Base System version 1.4.16 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-O2 -march=k8 -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -frename-registers -pipe" CHOST="x86_64-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=k8 -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -frename-registers -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.tiscali.nl/pub/mirror/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage" USE="S3TC X aac aalib acpi acpi4linux alsa amd64 apm arts asterisk audiofile avi berkdb cdr chroot crypt cups dga directfb divx4linux dv dvd dvdr encode faad fbcon fbdev ffmpeg fftw flac flash foomaticdb gd gdbm ggi gif gphoto2 gpm gstreamer gtk gtk2 icq ieee1394 imagemagick imap imlib imlib2 irmc jabber java javascript joystick jpeg kde kerberos krb4 lcd lcms ldap libcaca libg++ libwww linguas_en_GB linguas_nl lirc live mad mbox mikmod mng motif mozdomi mozilla mozp3p mozsvg mozxmlterm mpeg mpeg4 mpi msn mysql nas ncurses net nls nptl oav offensive oggvorbis opengl opie oss pam pda pdflib perl pic plotutils png python qt quicktime readline samba sasl sdl slang slp speex spell ssl tcltk tcpd tetex theora tiff transcode truetype usb v4l v4l2 videos wmf xml2 xmms xosd xprint xrandr xv xvid zlib zvbi"
I managed to install directfb by adding -fPIC to CFLAGS and CXXFLAGS for libsdl. After that, directfb installed properly, so I guess changing the libsdl ebuild should prevent this error...
Yepp, following lines are necessary in libsdl ebuild: (The latter 2 are necessary to not remove all those -DPIC s.) if [ "${ARCH}" != "x86" ]; then append-flags -fPIC sed -i -e "s/\-\?PIC/#&/" ${S}/strip_fPIC.sh sed -i -e "s/;;/#;;/" ${S}/strip_fPIC.sh fi SpanKY: wolf31of2 told me to ask you for permission to include.
Spanky doesn't want this solution. Loial: For the time being, emerge libsdl with USE="-libcaca" as a workaround.
i'll look through libcaca to make sure the pic stuff in it is correct
hrm, enabling libcaca causes libsdl to only produce .a libraries and not .so's then when you build DirectFB, it pulls in the libSDL.a file incorrectly when it would have pulled libSDL.so otherwise this happens on amd64 and not x86 which is why i hadnt noticed ... i'll get banging on amd64 to track this down ;)
*** Bug 57359 has been marked as a duplicate of this bug. ***
libcaca is now use.mask'ed on amd64 until this bug is solved cause it causes breakage in (at least) xine-libs and directfb.
libcaca is not broken, so there's no reason for it to be masked... It works fine with other programs.
he didnt say it was package masked, he said it was use masked
Fix in CVS now. Just take the ~arch version now (libsdl-1.2.7-r3) and everything is fine.