Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 166928 - [-fPIC] dev-libs/STLport-5.1.0
Summary: [-fPIC] dev-libs/STLport-5.1.0
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-14 23:47 UTC by Olaf Józefowicz
Modified: 2008-03-27 02:43 UTC (History)
3 users (show)

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


Attachments
Build log (build.log,11.38 KB, text/plain)
2007-02-15 15:16 UTC, Olaf Józefowicz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Józefowicz 2007-02-14 23:47:36 UTC
/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
Comment 1 Panagiotis Christopoulos (RETIRED) gentoo-dev 2007-02-15 08:18:05 UTC
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
Comment 2 Simon Stelling (RETIRED) gentoo-dev 2007-02-15 10:35:33 UTC
(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.
Comment 3 Olaf Józefowicz 2007-02-15 15:16:20 UTC
Created attachment 110290 [details]
Build log
Comment 4 Olaf Józefowicz 2007-02-15 15:28:27 UTC
(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:)

Comment 5 Juan Ignacio 2007-04-11 03:08:03 UTC
(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...

Comment 6 gent_bz 2007-04-11 14:21:49 UTC
Still a problem with STLport-5.1.2
Comment 7 Christoph Mende (RETIRED) gentoo-dev 2007-04-15 02:19:33 UTC
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 ;>
Comment 8 gent_bz 2007-04-26 03:43:23 UTC
(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.


Comment 9 Simon Cooper 2007-06-18 13:45:22 UTC
Another 'works for me'. Maybe try upgrading binutils to 2.17?
Comment 10 gent_bz 2007-06-21 02:00:11 UTC
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.
Comment 11 Nicolas MASSE 2007-06-30 18:29:06 UTC
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
Comment 12 gent_bz 2007-07-21 04:13:16 UTC
Could someone please just add -fPIC for amd64 to the ebuild?
Comment 13 Mark Loeser (RETIRED) gentoo-dev 2008-03-27 02:43:27 UTC
This seems to work for me on my amd64 box.  Reopen if you are still having problems.