Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53857 - libsdl doesnt build shared libraries when USE=libcaca
Summary: libsdl doesnt build shared libraries when USE=libcaca
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 All
: High normal (vote)
Assignee: SpanKY
Depends on:
Reported: 2004-06-13 23:07 UTC by Rutger Hendriks
Modified: 2004-11-09 21:16 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Rutger Hendriks 2004-06-13 23:07:31 UTC
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/\"                     -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/\" -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 -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/ -L/usr/lib -ldl -lpthread  -march=k8 -momit-leaf-frame-pointer -Wl,-rpath -Wl,/usr/lib -Wl,-soname -Wl, -o .libs/
/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]: *** [] 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.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"
CFLAGS="-O2 -march=k8 -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -frename-registers -pipe"
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"
FEATURES="autoaddcvs ccache sandbox"
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"
Comment 1 Rutger Hendriks 2004-06-14 01:57:08 UTC
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...
Comment 2 Danny van Dyk (RETIRED) gentoo-dev 2004-06-29 11:34:51 UTC
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}/
  sed -i -e "s/;;/#;;/" ${S}/

SpanKY: wolf31of2 told me to ask you for permission to include.
Comment 3 Danny van Dyk (RETIRED) gentoo-dev 2004-06-29 12:55:21 UTC
Spanky doesn't want this solution.

Loial: For the time being, emerge libsdl with USE="-libcaca" as a workaround.
Comment 4 SpanKY gentoo-dev 2004-06-29 20:04:33 UTC
i'll look through libcaca to make sure the pic stuff in it is correct
Comment 5 SpanKY gentoo-dev 2004-07-14 11:51:23 UTC
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 otherwise

this happens on amd64 and not x86 which is why i hadnt noticed ... i'll
get banging on amd64 to track this down ;)
Comment 6 SpanKY gentoo-dev 2004-07-20 20:22:49 UTC
*** Bug 57359 has been marked as a duplicate of this bug. ***
Comment 7 Danny van Dyk (RETIRED) gentoo-dev 2004-07-22 03:44:47 UTC
libcaca is now use.mask'ed on amd64 until this bug is solved cause it causes breakage in (at least) xine-libs and directfb.
Comment 8 Luke-Jr 2004-07-22 08:50:18 UTC
libcaca is not broken, so there's no reason for it to be masked... It works fine with other programs.
Comment 9 SpanKY gentoo-dev 2004-07-22 09:11:17 UTC
he didnt say it was package masked, he said it was use masked
Comment 10 Danny van Dyk (RETIRED) gentoo-dev 2004-09-30 18:05:05 UTC
Fix in CVS now. Just take the ~arch version now (libsdl-1.2.7-r3) and everything is fine.