Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134873 - dev-python/psycopg-1.1.21 fails to build: "recompile with -fPIC"
Summary: dev-python/psycopg-1.1.21 fails to build: "recompile with -fPIC"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-29 23:43 UTC by Jonathan Coome (RETIRED)
Modified: 2006-08-01 14:32 UTC (History)
3 users (show)

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


Attachments
config log of the failed build (config.log,11.84 KB, text/plain)
2006-06-23 12:26 UTC, Michael Weyershäuser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Coome (RETIRED) gentoo-dev 2006-05-29 23:43:18 UTC
psycopg-1.1.21 fails with the following error message here:

x86_64-pc-linux-gnu-gcc -pthread -shared  ./module.o ./connection.o ./cursor.o ./typeobj.o ./typemod.o  -L/usr/lib -lpq -lcrypt -lpthread -ldl -lutil  -o ./psycopgmodule.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: ./cursor.o: relocation R_X86_64_PC32 against `_psyco_curs_tuple_converter' 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: *** [psycopgmodule.so] Error 1


$ emerge --info
Portage 2.1_rc3-r1 (default-linux/amd64/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.0
dev-lang/python:     2.3.5-r2, 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.59-r7
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
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fno-ident"
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/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe -fno-ident"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms splitdebug strict test userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk     http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/     http://ftp.heanet.ie/pub/gentoo/     http://pandemonium.tiscali.de/pub/gentoo/"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB"
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 alsa audiofile berkdb bitmap-fonts bzip2 cairo cdparanoia cdr chroot crypt ctype curl dri dvd dvdr dvdread emul-linux-x86 encode exif expat fam ffmpeg firefox flac ftp gd gdbm gif glut gpm gtk gtk2 iconv imlib jpeg jpeg2k kdeenablefinal kdehiddenvisibility kqemu lesstif libwww mad maildir mbox mng mono mp3 mpeg msn musepack ncurses nls nptl offensive ogg oggvorbis opengl pam pam_chroot pcre pdflib php png python readline sdl spell ssl svg tcpd tetex threads truetype truetype-fonts type1-fonts udev unicode usb userlocales vorbis xml2 xpm xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en_GB userland_GNU video_cards_radeon video_cards_vesa video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Csaba Tóth 2006-06-13 12:42:22 UTC
the same problem here, fresh new install with ~amd64
Comment 2 Csaba Tóth 2006-06-13 13:36:07 UTC
i tryed to put the -fPIC into the CC and LD command line, but no good effect. the same problem with it.
Comment 3 Simon Stelling (RETIRED) gentoo-dev 2006-06-23 11:40:59 UTC
I can't reproduce it here. Can you please attach `/var/tmp/portage/psycopg-1.1.21/work/psycopg-1.1.21/config.log'?
Comment 4 Michael Weyershäuser 2006-06-23 12:25:48 UTC
I can confirm this, config log follows, emerge --info here:

gentoo ~ # emerge --info
Portage 2.1.1_pre1-r1 (default-linux/amd64/2006.0, gcc-4.1.1/amd64-vanilla, glibc-2.4-r3, 2.6.16-suspend2-r7-Dudebox-Edition x86_64)
=================================================================
System uname: 2.6.16-suspend2-r7-Dudebox-Edition x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.1
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
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.59-r7
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.93
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 -fomit-frame-pointer -pipe -msse3"
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"
CXXFLAGS="-O2 -march=k8 -fomit-frame-pointer -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache collision-protect confcache distcc distlocks metadata-transfer multilib-strict parallel-fetch sandbox sfperms strict test userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j3"
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_overlay/default /usr/local/portage_overlay/vmware/trunk"
SYNC="rsync://server/gentoo-portage"
USE="amd64 X a52 aac aalib alsa arts artswrappersuid avi berkdb bitmap-fonts bzip2 bzlib cairo cddb cdparanoia cdr cli crypt css cups curl divx4linux dri dts dvd dvdr dvdread eds emboss emul-linux-x86 encode esd exif exscalibar fam fame fbcon ffmpeg flac flash font-server foomaticdb gif glitz gpm gtk gtk2 icq id3 imagemagick imap imlib isdnlog ithreads java jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility libcaca lirc lm_sensors logrotate lzw lzw-tiff mad matroska mp3 mpeg mplayer musepack musicbrainz mysql ncurses nls nptl nptlonly nsplugin offensive ogg opengl pam pcre pdf pdflib perl png ppds pppd python qt quicktime rar readline reflection sasl sdl session spell spl sql sse3 ssl subversion tcpd theora threads tiff truetype-fonts type1-fonts unicode usb userlocales vcd vorbis wxgtk1 x264 xcomposite xine xml xml2 xmms xorg xosd xpm xscreensaver xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux linguas_de lirc_devices_hauppauge_dvb userland_GNU video_cards_fglrx"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Michael Weyershäuser 2006-06-23 12:26:39 UTC
Created attachment 89941 [details]
config log of the failed build
Comment 6 Martin Frankel 2006-07-19 13:40:37 UTC
I am also hitting this problem.

It looks like three of the reporters are running GCC 4.1.1 (myself included). Toth, what about you?

Seems most likely that this is toolchain related.

cursor.o is being compiled -fPIC yet compiler warns that it needs to be compiled -fPIC. Again, this suggests compiler problem.
Comment 7 Martin Frankel 2006-07-19 13:45:10 UTC
I confirmed that switching back to GCC 3.4.3 temporarily allowed me to build psycopg cleanly.

This is a workaround but not a fix.
Comment 8 Csaba Tóth 2006-07-19 14:22:10 UTC
Yeah, i made a fresh new install (~amd64), so i use the latest available GCC.
If i build it with an older GCC, it wont make any problem? I mean this is a test server, i use it to test my python programs, so i need a well worker solution. :)
Comment 9 Martin Frankel 2006-07-19 15:19:27 UTC
Can't see how it would cause any problem to build psycopg with an old GCC. It's just a workaround, but it shouldn't cause any runtime problems, and so far it's working for me. Just don't forget to gcc-config back to 4.1.1 when you're done.

Comment 10 Lukasz Strzygowski (RETIRED) gentoo-dev 2006-08-01 14:32:28 UTC
Fixed in portage.