Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154813 - compiling dev-lang/mono-1.2 fails - recompile with -fPIC
Summary: compiling dev-lang/mono-1.2 fails - recompile with -fPIC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: dotnet project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-11 09:21 UTC by Christian Korff
Modified: 2007-05-24 15:06 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 Christian Korff 2006-11-11 09:21:18 UTC
compiling mono 1.2 fails with following message:

/bin/sh ../../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -I../.. -I../../libgc/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -O2 -march=nocona -pipe -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs   -o mono  -export-dynamic -Wl,-version-script=./ldscript.mono main.o libmono-static.la -pthread -lgthread-2.0 -lglib-2.0   -Wl,--export-dynamic -lgmodule-2.0 -ldl -lglib-2.0   -lm -lpthread -lm
x86_64-pc-linux-gnu-gcc -I../.. -I../../libgc/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O2 -march=nocona -pipe -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs -o mono -Wl,-version-script=./ldscript.mono main.o -pthread -Wl,--export-dynamic -Wl,--export-dynamic  ./.libs/libmono-static.a /usr/lib64/libgthread-2.0.so /usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libglib-2.0.so -lpthread -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: ./.libs/libmono-static.a(threads.o): relocation R_X86_64_TPOFF32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
./.libs/libmono-static.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mono] Error 1
make[4]: Leaving directory `/mnt/sda1/portage/portage/mono-1.2/work/mono-1.2/mono/mini'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/mnt/sda1/portage/portage/mono-1.2/work/mono-1.2/mono/mini'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/sda1/portage/portage/mono-1.2/work/mono-1.2/mono'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/sda1/portage/portage/mono-1.2/work/mono-1.2'
make: *** [all] Error 2

!!! ERROR: dev-lang/mono-1.2 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  mono-1.2.ebuild, line 88:   Called die

!!! compile failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

emerge --info
Portage 2.1.1-r1 (hardened/amd64/multilib, gcc-3.4.6, glibc-2.3.6-r4, 2.6.14 x86_64)
=================================================================
System uname: 2.6.14 x86_64 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.12.6
Last Sync: Sat, 11 Nov 2006 15:30:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [disabled]
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.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-r3
sys-devel/gcc-config: 1.3.13-r4
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="-O2 -march=nocona -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/mpd/conf /usr/NX/etc /usr/NX/home /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 /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=nocona -pipe"
DISTDIR="/usr/src/portage-distfiles"
FEATURES="autoconfig confcache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LINGUAS="fr de en_GB"
PKGDIR="/usr/local/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="/mnt/sda1/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa amd64 arts avi berkdb cddb cjk crypt cups dlloader dri elibc_glibc enca esd flac gdbm gif gimpprint gpm gtk hardened input_devices_keyboard input_devices_mouse input_devices_vmmouse ipv6 jpeg justify kerberos kernel_linux ldap libcaca linguas_de linguas_en_GB linguas_fr mng mp3 mpeg multilib ncurses nls nptl ogg opengl pam perl pic png python readline sdl sse2 ssl svg tcpd tiff unicode usb userland_GNU userlocales video_cards_ati video_cards_dummy video_cards_fbdev video_cards_i810 video_cards_mach64 video_cards_nv video_cards_r128 video_cards_radeon video_cards_s3 video_cards_s3virge video_cards_sis video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware vorbis wmf xinerama xml xorg xprint xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Pacho Ramos gentoo-dev 2006-12-07 05:56:00 UTC
I compile succesfully mono-1.2.2.1

This is my emerge --info:
Portage 2.1.1-r2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.18-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.6
Last Sync: Thu, 07 Dec 2006 12:20: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.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-r3
sys-devel/gcc-config: 1.3.13-r4
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=k8 -O2 -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/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -O2 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.club-internet.fr/pub/mirrors/gentoo http://ftp.heanet.ie/pub/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://gentoo.intergenia.de/ http://ftp.rhnet.is/pub/gentoo/"
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LINGUAS="es en_US"
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 /usr/portage/local/layman/science /usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acpi alsa amd64 apache2 arts asf audiofile bash-completion beagle bitmap-fonts bzip2 bzlib cairo caps cdb cdda cddb cdparanoia cdr cli cracklib cross crypt cscope cups curl dbus dga divx4linux dlloader dri dts dvd dvdr dvdread elibc_glibc encode erandom escreen esd evo evolution exif fam fbcon flac foomaticdb fortran ftp galago gb gcj ggi gif gimp gimpprint glitz glut glx gnome gnome-print gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal iconv idn imagemagick imlib input_devices_keyboard input_devices_mouse isdnlog ithreads jabber jack java jpeg kde kdeenablefinal kdehiddenvisibility kernel_linux latex lcms libg++ libnotify linguas_en_US linguas_es logrotate mad madwifi mikmod mime mng mono motif mp3 mpeg mpi mplayer musepack musicbrainz nas nautilus ncurses nethack network nls nocardbus nptl nptlonly nvidia ogg oggvorbis openal opengl oss pam pcre pdf perl pic plotutils png posix ppds pppd python qt3 qt4 quicktime readline reflection rtc ruby scanner sdl seamonkey session slang slp sockets spell spl ssl svg sysvipc tcltk tcpd tetex theora threads tiff timidity tk totem trayicon truetype truetype-fonts type1-fonts udev unicode usb userland_GNU v4l v4l2 vcd video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_vesa video_cards_vga videos vim vorbis wma wmf xcomposite xine xml xml2 xorg xpm xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Saleem Abdulrasool (RETIRED) gentoo-dev 2006-12-10 13:55:30 UTC
Excellent, marking this as fixed then.
Comment 3 Neil Hodges 2007-05-24 15:06:24 UTC
On my system, the -fPIC problem still occurs:
====================================================
# emerge -av =mono-1.2.2.1

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] dev-lang/mono-1.2.2.1  USE="nptl -X" 0 kB
[ebuild  N    ] dev-dotnet/pe-format-0  0 kB

Total: 2 packages (2 new), Size of downloads: 0 kB
...
creating libmono-static.la
(cd .libs && rm -f libmono-static.la && ln -s ../libmono-static.la libmono-static.la)
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../..   -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP  -DUSE_COMPILER_TLS -I../.. -I../../libgc/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -O2 -march=k8 -pipe -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
/bin/sh ../../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -I../.. -I../../libgc/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -O2 -march=k8 -pipe -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs  -export-dynamic -Wl,-version-script=./ldscript.mono  -o mono main.o libmono-static.la -pthread -lgthread-2.0 -lrt -lglib-2.0   -Wl,--export-dynamic -lgmodule-2.0 -ldl -lglib-2.0   -lm -lpthread -lm
x86_64-pc-linux-gnu-gcc -I../.. -I../../libgc/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O2 -march=k8 -pipe -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs -Wl,-version-script=./ldscript.mono -o mono main.o -pthread -Wl,--export-dynamic -Wl,--export-dynamic  ./.libs/libmono-static.a /usr/lib64/libgthread-2.0.so -lrt /usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libglib-2.0.so -lpthread -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: ./.libs/libmono-static.a(domain.o): relocation R_X86_64_TPOFF32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
./.libs/libmono-static.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mono] Error 1
make[4]: Leaving directory `/var/tmp/portage/dev-lang/mono-1.2.2.1/work/mono-1.2.2.1/mono/mini'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/dev-lang/mono-1.2.2.1/work/mono-1.2.2.1/mono/mini'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-lang/mono-1.2.2.1/work/mono-1.2.2.1/mono'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-lang/mono-1.2.2.1/work/mono-1.2.2.1'
make: *** [all] Error 2

!!! ERROR: dev-lang/mono-1.2.2.1 failed.
Call stack:
  ebuild.sh, line 1615:   Called dyn_compile
  ebuild.sh, line 972:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  mono-1.2.2.1.ebuild, line 90:   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-lang/mono-1.2.2.1/temp/build.log'.
====================================================
This is my system configuration:
====================================================
# emerge --info
Portage 2.1.2.7 (hardened/amd64, gcc-3.4.6, glibc-2.5-r2, 2.6.21-hardened x86_64)
=================================================================
System uname: 2.6.21-hardened x86_64 Dual-Core AMD Opteron(tm) Processor 1214
Gentoo Base System release 1.12.10
Timestamp of tree: Wed, 23 May 2007 06:50:01 +0000
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.60
sys-devel/automake:  1.4_p6, 1.6.3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -mmmx -msse -msse2 -m3dnow -mfpmath=sse"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=k8 -pipe -mmmx -msse -msse2 -m3dnow -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo http://www.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ "
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LINGUAS="en ja"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY