Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154534 - media-libs/xvid: recompile w/ -fPIC
Summary: media-libs/xvid: recompile w/ -fPIC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL: http://list.xvid.org/pipermail/xvid-d...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-09 00:03 UTC by Marcin Deranek
Modified: 2007-01-25 20:27 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 Marcin Deranek 2006-11-09 00:03:09 UTC
Trying to compile either libquicktime or vlc fails with the following error:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libxvidcore.a(qpel_mmx.o): relocation R_X86_64_PC32 against `xvid_FIR_14_3_2_1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[3]: *** [lqt_ffmpeg.la] Error 1

Found only one reference to this problem (look provided URL), but no solution..

emerge --info:
Portage 2.1.2_rc1-r5 (default-linux/amd64, gcc-4.1.1, glibc-2.5-r0, 2.6.17-reiser4-r8 x86_64)
=================================================================
System uname: 2.6.17-reiser4-r8 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.6
Last Sync: Wed, 08 Nov 2006 23:50:01 +0000
ccache version 2.4 [enabled]
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -mtune=athlon64 -ftracer -frename-registers -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=athlon64 -mtune=athlon64 -ftracer -frename-registers -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en pl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac aalib accessibility acpi adns alsa apm audiofile bash-completion bcmath berkdb bidi bitmap-fonts bluetooth bzip2 cdparanoia cdr clamav cli cracklib crypt cscope ctype cups curl curlwrappers dga dio directfb dlloader dri dts dv dvb dvd dvdr dvdread elibc_glibc encode evo exif expat fbcon ffmpeg fftw firefox flac flatfile foomaticdb ftp gb gd gdbm ggi gif ginac glut gmp gnome gnutls gphoto2 gpm graphviz gstreamer gtk gtk2 gtkhtml guile hal iconv idn imagemagick imlib input_devices_keyboard input_devices_mouse isdnlog javascript jbig jikes jpeg jpeg2k kdehiddenvisibility kernel_linux lcms lesstif libcaca libedit libgda libwww linguas_en linguas_pl lm_sensors m17n-lib mad maildir matroska mbox mcal memlimit mhash mikmod mime mmap mng mono motif mp3 mpeg mpi mplayer msession ncurses nocd nptl nsplugin offensive ogg openal opengl osc oss pam pcntl pcre pda pdf pic plotutils png portaudio posix ppds pppd quicktime readline recode reflection scanner sdl session sharedmem shorten simplexml skey slang slp sndfile snmp sockets sox speex spell ssl svg sysvipc szip tcpd test theora threads tidy tiff truetype truetype-fonts type1-fonts unicode usb userland_GNU v4l vcd video_cards_fglrx video_cards_radeon videos vim-syntax vorbis wifi wmf wxwindows xine xml xmlrpc xorg xosd xpm xsl xv xvid yaz zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Brian Jackson (RETIRED) gentoo-dev 2006-12-28 08:46:41 UTC
Rebuilding with -fPIC didn't help me. I had to use this:

--- xvid-1.1.0-r3.ebuild        2006-12-03 14:06:17.000000000 -0600
+++ xvid-1.1.2.ebuild   2006-12-28 10:43:22.339244750 -0600
@@ -35,7 +35,7 @@
 }

 src_compile() {
-       econf $(use_enable altivec) || die "econf failed"
+       econf $(use_enable altivec) $(use_enable !amd64 assembly) || die "econf failed"
        emake || die "emake failed"
 }

Comment 2 Marcin Deranek 2007-01-14 09:16:42 UTC
The code which gcc is complaining about is written in assembler, so to fix it someone need to rewrite it.. or as you suggested you could disable assembly altogether to make gcc happy :-))
Comment 3 Marcin Deranek 2007-01-25 20:27:07 UTC
Looks like problem is somehow solved.. All packages compile nicely..