Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128531 - libXV (and libXVMC) need -fPIC in order to compil xine
Summary: libXV (and libXVMC) need -fPIC in order to compil xine
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-02 09:06 UTC by Grégoire Favre
Modified: 2006-04-14 14:02 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 Grégoire Favre 2006-04-02 09:06:54 UTC
Hello,

In order to be able to compil my xine-lib against xorg-7 with XV I have to add -fPIC to libXV, then xine-lib compils just fine.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-04-02 09:11:30 UTC
Please, don't restrict bugs without any reason...
Comment 2 Simon Stelling (RETIRED) gentoo-dev 2006-04-02 10:06:35 UTC
emerge --info please
Comment 3 Grégoire Favre 2006-04-02 10:11:32 UTC
I don't know what to answer in respect to Jakub Moc comment (I don't understand the comment).

Portage 2.1_pre7-r3 (default-linux/amd64/2005.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.16-rc6-mm1 x86_64)
=================================================================
System uname: 2.6.16-rc6-mm1 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.14
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=k8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/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.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /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/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=k8 -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.switch.ch/mirror/gentoo/ http://www.gigaload.org/gentoo.org/ ftp://mirror.switch.ch/mirror/gentoo/"
LC_ALL="en_GB.iso8859-15"
LDFLAGS="-Wl,-O1 "
LINGUAS="en ko"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/xgl-coffee"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 3dnowex 7zip X Xaw3d a52 aac acpi aim alsa amr aotuv apache2 apm asf async atlas auctex audacious avi bash-completion batch berkdb bidi bitmap-fonts blas bonjour browserplugin buffysize buttons bzlib cairo cdda cddb cdio cdparanoia cg chroot crypt cscope css csv ctype cups curlwrappers dga dio divx4linux djbfft djvu doc dri dv dvb dvd dvdr dvdread dvi dynagraph ecc eds effects emboss encode exscalibar ext-doc ext-dvi ext-gnumeric ext-koffice ext-kpresenter ext-kspread ext-kword ext-lyx ext-man ext-openoffice ext-pdf ext-ppt ext-ps ext-rpm ext-rtf ext-tex ext-xls extrafilters fame fat fbcon ffmpeg fftw flood fltk fontconfig foomaticdb fortran fping fpx freetext gdal general gg gif gimp gimpprint ginac glibc-compat20 glibc-omitfp glitz glx gmtfull gmthigh gmtsuppl gmttria gnome gnutls gopher gpgme gpm grammar graphviz grass gs gstreamer gtalk gtk gtk2 h323 hdf5 icq ieee1394 imlib input_devices_keyboard input_devices_mouse ipv6 irc isdnlog ithreads jabber javascript jbig jikes jp2 jpeg jpeg2k kig-scripting lame libtommath libvisual live lj lm_sensors logitech-mouse logrotate lzo lzw lzw-tiff mbox mime mimencode mjpeg mod mozsvg mozxmlterm mp3 mpeg mpeg2 msn msnextras musepack mythtv nas nautilus ncurses nethack netpbm network nfs nls nntp normalizemime nptl nptlonly nsplugin nvidia oggvorbis on-the-fly-crypt openexr opengl openssl oscar pam pda pdf pdflib perl player png posix ppds pppd python pyzor qhull quicktime readline reiser4 reiserfs rss rtc sasl screen sdl shout sid silc slp smime sms sndfile spell sse-filters ssl stream szip tcpd tetex theora thesaurus threads tiff tomsfastmath tools truetype-fonts type1-fonts unicode usb uudeview v4l v4l2 vcd vcdimager video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_v4l video_cards_vesa video_cards_vga vim vim-pager vim-with-x vorbis wma wma123 wordperfect wv wxgtk1 wxwindows x264 xanim xattr xchattext xext xfs xine xinerama xpm xprint xv xvmc yahoo zlib elibc_glibc kernel_linux linguas_en linguas_ko userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG
Comment 4 Sérgio Luís 2006-04-02 10:46:25 UTC
Can you try without fvisibility-inlines-hidden ?

Just this:
CXXFLAGS="-O2 -pipe -march=k8"
Comment 5 Simon Stelling (RETIRED) gentoo-dev 2006-04-02 10:50:20 UTC
thanks for pointing that out, missed it. remove that flag and it'll work
Comment 6 Grégoire Favre 2006-04-02 11:47:33 UTC
Removing fvisibility-inlines-hidden don't solve anything... -fPIC is still needed.
Comment 7 Simon Stelling (RETIRED) gentoo-dev 2006-04-02 13:01:30 UTC
did you recompile all involved packages? i'm pretty sure the issue is -fvisibility-inlines-hidden
Comment 8 Grégoire Favre 2006-04-02 13:03:52 UTC
Well, I did recompil libXv, libXvMC and tried to compil xine-lib which fails with the -fPIC missing message.
Comment 9 Simon Stelling (RETIRED) gentoo-dev 2006-04-02 13:13:00 UTC
Probably it's another library then. I just tried the following on my system, and it works. Beside that I've successfully compiled several apps that link against libXv.

 $ echo 'main(){}' > test.c ; gcc -o test test.c -lXv
 $

-fvisibility-inlines-hidden is known to cause troubles with PIC.
Comment 10 Simon Stelling (RETIRED) gentoo-dev 2006-04-02 13:14:26 UTC
if you really insist on -fvisibility-inlines-hidden being innocent, please provide an error log, because I can't reproduce it here 
Comment 11 Grégoire Favre 2006-04-02 14:09:56 UTC
then I think I have to rebuild lots of things with only "-O2 -march=k8 -pipe" and see how things goes :)

Thank you very much for help !
Comment 12 Grégoire Favre 2006-04-14 13:22:07 UTC
I have just finished recompiling all my gentoo without fvisibility-inlines-hidden and now I have to reopen the bug...

*** Warning: Linking the shared library xineplug_vo_out_xv.la against the
*** static library /usr/X11R6/lib/libXv.a is not portable!
libtool-nofpic: link: warning: `/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../..//libfreetype.la' seems to be moved
gcc -shared  .libs/x11osd.o .libs/deinterlace.o .libs/video_out_xv.o  -Wl,--rpath -Wl,/usr/src/CVS/xine-lib/src/xine-engine/.libs /usr/X11R6/lib/libXv.a -L/usr/lib64 /usr/lib64/libXinerama.so /usr/lib64/libXext.so /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libX11.so ../../src/xine-engine/.libs/libxine.so -L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../ -lpthread  -march=k8 -Wl,-soname -Wl,xineplug_vo_out_xv.so -o .libs/xineplug_vo_out_xv.so
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/X11R6/lib/libXv.a(Xv.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/X11R6/lib/libXv.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [xineplug_vo_out_xv.la] Error 1
make[4]: Leaving directory `/usr/src/CVS/xine-lib/src/video_out'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/CVS/xine-lib/src/video_out'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/CVS/xine-lib/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/CVS/xine-lib'
make: *** [all] Error 2
Comment 13 Grégoire Favre 2006-04-14 14:02:19 UTC
Oops, the problem came from my overlay for xine who wanted to use "--enable-static-xv".

I am trully sorry for the wrong repport : I should be more carefull with my overlays :(