Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138231 - dev-libs/gmp-4.2.1 won't compile (recompile with -fPIC)
Summary: dev-libs/gmp-4.2.1 won't compile (recompile with -fPIC)
Status: RESOLVED NEEDINFO
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: 2006-06-27 10:09 UTC by Darren Dale
Modified: 2014-12-29 00:37 UTC (History)
2 users (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 Darren Dale 2006-06-27 10:09:24 UTC
I'm getting an error when I try to compile gmp-4.2.1:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/assert.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
.libs/assert.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libgmp.la] Error 1
make[2]: Leaving directory `/var/tmp/portage/gmp-4.2.1/work/gmp-4.2.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gmp-4.2.1/work/gmp-4.2.1'
make: *** [all] Error 2



here's my emerge info:

Portage 2.1.1_pre1-r4 (default-linux/amd64/2006.0, gcc-4.1.1/amd64-vanilla, glibc-2.4-r3, 2.6.16-gentoo-r9 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r9 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.1
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
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
sys-devel/binutils:  2.16.1-r2, 2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer -fpermissive"
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/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer -fpermissive"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
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.namerica.gentoo.org/gentoo-portage"
USE="amd64 X aac acl alsa atlas avi bash-completion berkdb bitmap-fonts blas bzip2 cairo cblas cdr cli crypt ctype cups doc dri dvd dvdr eds emboss encode examples f77 fftw firefox foomaticdb foomativdb fortran gif gimpprint gpm gstreamer gtk gtk2 hal imagemagick imap imlib isdnlog java jpeg jpeg2k kde lapack ldap lzw lzw-tiff mime mmap mozilla mozsvg mp3 mpeg multislot ncurses nptl nptlonly nsplugin opengl oss pam pcre pdf pdflib perl pic png ppds pppd python qt qt3 qt4 quicktime readline reflection rss sdl session spell spl ssl subversion svg symlink tcltk tcpd tetex threads tiff truetype truetype-fonts type1-fonts unicode usb winbind wxwindows xfs xinerama xorg xpm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_ati video_cards_vga"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Kyle Liddell 2006-06-29 15:06:47 UTC
Same -fPIC error here, just in a slightly different place.

x86_64-pc-linux-gnu-g++ -shared -nostdlib /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/crtbeginS.o  .libs/dummy.o cxx/.libs/isfuns.o cxx/.libs/ismpf.o cxx/.libs/ismpq.o cxx/.libs/ismpz.o cxx/.libs/ismpznw.o cxx/.libs/osdoprnti.o cxx/.libs/osfuns.o cxx/.libs/osmpf.o cxx/.libs/osmpq.o cxx/.libs/osmpz.o  -Wl,--rpath -Wl,/var/tmp/portage/gmp-4.2.1/work/gmp-4.2.1/.libs ./.libs/libgmp.so -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/crtn.o  -march=k8 -Wl,-soname -Wl,libgmpxx.so.3 -o .libs/libgmpxx.so.3.1.1
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: cxx/.libs/isfuns.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
cxx/.libs/isfuns.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libgmpxx.la] Error 1
make[2]: Leaving directory `/var/tmp/portage/gmp-4.2.1/work/gmp-4.2.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gmp-4.2.1/work/gmp-4.2.1'
make: *** [all] Error 2

emerge info:

Portage 2.1.1_pre1-r5 (default-linux/amd64/2005.0, gcc-4.1.1/amd64-vanilla, glibc-2.4-r3, 2.6.16-gentoo-r9 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r9 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.1
ccache version 2.4 [disabled]
dev-lang/python:     2.2.3-r6, 2.3.5, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  [Not Present]
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
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -pipe -O2 -freorder-blocks-and-partition -frename-registers -fweb -O3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -pipe -O2 -freorder-blocks-and-partition -frename-registers -fweb -O3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
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.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d a52 aac aalib acl acpi aim alsa apache2 audiofile avi bash-completion berkdb bitmap-fonts bzip2 bzlib calendar cdr cli crypt cups curl dga dio doc dri dvd eds emacs emboss encode encoder ethereal exif fam ffmpeg fftw flac fontserver foomaticdb fortran ftp gd gif ginac gnome gnutls gphoto2 gpm gstreamer gtk gtk2 icq imagemagick imap imlib ipv6 isdnlog jabber joystick jpeg lcms lesstif libcaca lirc lm_sensors lzw lzw-tiff maildir mikmod mime mmap mng mozilla mp3 mpeg msn ncurses neXt nis nls nptl nptlonly offensive ogg oggvorbis openal opengl oscar pam pcre pdflib perl plotutils png posix ppds pppd python qt3 qt4 quicktime readline reflection samba sdl session sharedmem sndfile sockets sox speex spell spl ssl svg sysvipc tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts usb vorbis wmf xine xml2 xmms xorg xpm xv xvid yahoo zlib elibc_glibc kernel_linux lirc_devices_serial userland_GNU video_cards_nv"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Kyle Liddell 2006-07-04 13:08:25 UTC
Ok, this problem isn't with gmp (I don't think), it's something to do with portage, or portage with gmp.  I can compile the vanilla gmp-4.2.1 source code, and I can also compile it with all the patches that get applied in the emerge process.  Everything seems to work fine, and it passes the "make check" process.  I'm not sure where to look now though.
Comment 3 Duncan 2006-07-06 07:57:08 UTC
This bug has been discussed on the amd64 list http://permalink.gmane.org/gmane.linux.gentoo.amd64/8143 

Note to devs/testers.  When this bug is resolved, please note a bit about where it was.  Since it compiles and works when compiled by hand, but doesn't when compiled thru portage (for the filer, no issues here), I'm thinking environmental differences, but I'm curious to what and how, particularly as I've been following the portage per-stage environment reconstruction issues with interest, and it could help in future troubleshooting.  Thanks!

Abridged (- local fs and mirror info) emerge --info:

Portage 2.1.1_pre2-r2 (default-linux/amd64/2006.0, gcc-4.1.1/amd64-vanilla, glibc-2.4-r3, 2.6.17 x86_64)
=================================================================
System uname: 2.6.17 x86_64 AMD Opteron(tm) Processor 242
Gentoo Base System version 1.12.1
ccache version 2.4 [enabled]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  0.4.2-r1
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
sys-devel/binutils:  2.16.1-r2, 2.16.93, 2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -Os -pipe -fomit-frame-pointer -frename-registers -funit-at-a-time -fweb -freorder-blocks -freorder-blocks-and-partition -ftree-pre -fmerge-all-constants"
CHOST="x86_64-pc-linux-gnu"
...
FEATURES="autoconfig buildpkg candy ccache confcache distlocks multilib-strict parallel-fetch sandbox sfperms strict userfetch"
LANG="en_US"
LDFLAGS="-Wl,-z,now"
LINGUAS="en"
MAKEOPTS="-j6 -l5"
USE="amd64 7zip X a52 aac acpi alsa amr apm arts asf audiofile avi bash-completion berkdb bitmap-fonts bzip2 caps cdparanoia cdr cli crypt css cups curl dga divx4linux dlloader dri dts dv dvd dvdr dvdread eds emboss encode expat extrafilters fam fame ffmpeg flac font-server foomaticdb gdbm gif glibc-omitfp gpm gtk2 idn imagemagick imlib isdnlog ithreads jp2 jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility lcms libwww linuxthreads-tls lm_sensors logitech-mouse logrotate lzo lzw lzw-tiff mad maildir mikmod mjpeg mng motif mp3 mp4 mpeg musicbrainz ncurses network no-old-linux nolvm1 nomirrors nptl nptlonly offensive ogg openexr opengl oss pam pcre pdflib perl pic png ppds pppd profile python qt qt3 quicktime radeon readline reflection scanner session slang smime speex spell spl ssl tcltk theora threads tiff truetype truetype-fonts type1 type1-fonts usb userlocales vcd vorbis x264 xcomposite xine xinerama xml xml2 xmms xorg xosd xpm xrandr xv xvid yv12 zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en userland_GNU video_cards_radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL
Comment 4 Kyle Liddell 2006-07-07 22:37:23 UTC
This only happens when using gcc 4.1.1.  If I switch back to 3.4.*, gmp 4.2.1 builds fine with 'emerge'.  (However, I can build gmp by hand with gcc 4.1 and it works...)
Comment 5 Simon Stelling (RETIRED) gentoo-dev 2006-07-20 10:16:15 UTC
the config.log in ~portage/gmp-4.2.1/work/gmp*/ would be very helpful in this case. If you have spare CPU cycles, the one from a gcc 3.4 would be also very interesting
Comment 6 Simon Stelling (RETIRED) gentoo-dev 2006-08-25 09:16:48 UTC
please provide the requested information