/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: obj/gcc/so/dll_main.o: relocation R_X86_64_32 against `stlp_std::_Atomic_swap_struct<1>::_S_swap_lock' can not be used when making a shared object; recompile with -fPIC obj/gcc/so/dll_main.o: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [obj/gcc/so/libstlport.so.5.1.0] Error 1 make: Leaving directory `/var/tmp/portage/dev-libs/STLport-5.1.0/work/STLport-5.1.0/build/lib' !!! ERROR: dev-libs/STLport-5.1.0 failed. Call stack: ebuild.sh, line 1614: Called dyn_compile ebuild.sh, line 971: Called qa_call 'src_compile' environment, line 3531: Called src_compile STLport-5.1.0.ebuild, line 80: Called die !!! Compile failed !!! If you need support, post the topmost build error, and the call stack if relevant. !!! A complete build log is located at '/var/tmp/portage/dev-libs/STLport-5.1.0/temp/build.log'. Portage 2.1.2-r9 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.18-gentoo-r6 x86_64) ================================================================= System uname: 2.6.18-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.12.1 Timestamp of tree: Wed, 14 Feb 2007 09:50:01 +0000 dev-java/java-config: 1.3.7, 2.0.31 dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 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.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 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="-march=athlon64 -pipe -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/terminfo" CXXFLAGS="-march=athlon64 -pipe -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://gentoo.po.opole.pl/" LINGUAS="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" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac alsa amd64 arts berkdb bitmap-fonts cdr cli cracklib crypt cups dbus dlloader dri dvd dvdr firefox fortran gdbm gif gpm gtk gtk2 hal iconv ipv6 isdnlog java jpeg kde libg++ midi mp3 mpeg mplayer ncurses nls nptl nptlonly ogg opengl oss pam pcre pdf perl png ppds pppd python qt3 readline reflection samba session sndfile spl ssl tcl tcltk tcpd tk truetype truetype-fonts type1-fonts unicode usb vcd xine xorg xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3 I'm not an expert, but I think you will solve the problem by adding globally in your CFLAGS the switch "-fPIC" I hope I helped, Panagiotis
(In reply to comment #0) > !!! A complete build log is located at > '/var/tmp/portage/dev-libs/STLport-5.1.0/temp/build.log'. Could you attach this file to the bug report, please? > I'm not an expert, but I think you will solve the problem by adding globally in > your CFLAGS the switch "-fPIC" Sometimes it's a workaround that works, but it's surely not the real solution.
Created attachment 110290 [details] Build log
(In reply to comment #1) > http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3 > > I'm not an expert, but I think you will solve the problem by adding globally in > your CFLAGS the switch "-fPIC" > > I hope I helped, > Panagiotis > It worked:)
(In reply to comment #1) > http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3 > > I'm not an expert, but I think you will solve the problem by adding globally in > your CFLAGS the switch "-fPIC" > > I hope I helped, > Panagiotis > Doesn't work to me...
Still a problem with STLport-5.1.2
dev-libs/STLport-5.1.2 works for me, that error is sometimes produced by a broken toolchain too. I'm atm not sure, where exactly it may be broken, but I'd try the following: 1. gcc-config -fO 2. binutils-config `binutils-config -c` 3. emerge gcc 4. emerge glibc if anything of that works, please tell us, what exactly helped ;>
(In reply to comment #7) > dev-libs/STLport-5.1.2 works for me, that error is sometimes produced by a > broken toolchain too. I'm atm not sure, where exactly it may be broken, but > I'd try the following: <snip> Tried it all (gcc-config -fO is not valid), no luck. I still get the same error.
Another 'works for me'. Maybe try upgrading binutils to 2.17?
I still have the problem with sys-devel/binutils-2.17.50.0.12 and that's after rebuilding the entire toolchain (for a different problem). With -fPIC in CXXFLAGS, STLport-5.1.2 builds for me.
I had the same problem, tried : 1. emerge -av1 gcc (updated to 4.1.2) 2. gcc-config -f x86_64-pc-linux-gnu-4.1.2 3. binutils-config `binutils-config -c` 4. source /etc/profile ... and it did not help ! So I ran : CXXFLAGS="-fPIC" CFLAGS="-fPIC" emerge -av1 dev-libs/STLport ... and it worked ! (but, if I understand well, that is not a good solution) Portage 2.1.1-r2 (default-linux/amd64/2006.1, gcc-4.1.2, glibc-2.4-r3, 2.6.20-gentoo-r7 x86_64) ================================================================= System uname: 2.6.20-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.12.1 Last Sync: Sat, 30 Jun 2007 13:30:01 +0000 ccache version 2.3 [enabled] app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 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.13-r3 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="-march=athlon64 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-march=athlon64 -O2 -pipe" DISTDIR="/var/portage/distfiles" FEATURES="buildpkg ccache collision-protect distlocks metadata-transfer nostrip parallel-fetch sandbox sfperms strict userfetch" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo" LANG="fr_FR.UTF-8" LC_ALL="fr_FR.UTF-8" LINGUAS="fr en de" MAKEOPTS="-j2" PKGDIR="/var/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="/tmp" PORTDIR="/var/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X aac acl acpi alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol avahi berkdb bitmap-fonts bzip2 cairo caps cddb cli cracklib crypt cups dbus dri dvd elibc_glibc fam flac fortran gd gif gpm hal iconv idn input_devices_keyboard input_devices_mouse ipv6 isdnlog java jpeg jpeg2k kde kerberos kernel_linux kipi lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text libg++ linguas_de linguas_en linguas_fr lm_sensors lua matroska midi mp3 mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre perl png ppds pppd python qt3 readline reflection samba sasl session slp spl ssl svg tetex theora threads tiff truetype truetype-fonts type1-fonts unicode userland_GNU utempter v4l v4l2 video_cards_nv video_cards_nvidia vorbis xinerama xorg xv zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Could someone please just add -fPIC for amd64 to the ebuild?
This seems to work for me on my amd64 box. Reopen if you are still having problems.