Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444012 - =dev-lang/ghc-6.12.3 poorly handles -fPIC (ZCMain_main_closure' can not be used when making a shared object; recompile with -fPIC)
Summary: =dev-lang/ghc-6.12.3 poorly handles -fPIC (ZCMain_main_closure' can not be us...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 11:02 UTC by Jan Matějka (RETIRED)
Modified: 2013-07-29 12:44 UTC (History)
0 users

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 Jan Matějka (RETIRED) gentoo-dev 2012-11-20 11:02:22 UTC
dev-haskell/x11-1.5.0.1 can't be merged due to linking error

Reproducible: Always

Steps to Reproduce:
1. echo "dev-haskell/x11-1.5.0.1 ~amd64" >> /etc/portage/package.keywords
2. emerge dev-haskell/x11
3.
Actual Results:  
Calculating dependencies... done!
[ebuild  N    ~] dev-haskell/x11-1.5.0.1  USE="xinerama -doc -hscolour -profile" 0 kB

Total: 1 package (1 new), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-haskell/x11-1.5.0.1
 * X11-1.5.0.1.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                                                                                                                                                        [ ok ]
>>> Unpacking source...
>>> Unpacking X11-1.5.0.1.tar.gz to /var/tmp/portage/dev-haskell/x11-1.5.0.1/work
>>> Source unpacked in /var/tmp/portage/dev-haskell/x11-1.5.0.1/work
>>> Preparing source in /var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1 ...
 * Using cabal-1.14.0.
 * Prepending /usr/lib64/ghc-6.12.3 to LD_LIBRARY_PATH
/usr/bin/ghc -package Cabal-1.14.0 --make /var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.hs -dynamic -o setup
[1 of 1] Compiling Main             ( /var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.hs, /var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.o )

/var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.hs:3:0:
    Warning: In the use of `defaultUserHooks'
             (imported from Distribution.Simple):
             Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2
             compatibility in which case you must stick with defaultUserHooks"
Linking setup ...
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/ghc-6.12.3/libHSrtsmain.a(Main.o): relocation R_X86_64_32 against `ZCMain_main_closure' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/ghc-6.12.3/libHSrtsmain.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
/usr/bin/ghc -package Cabal-1.14.0 --make /var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.hs -o setup
[1 of 1] Compiling Main             ( /var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.hs, /var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.o )

/var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.hs:3:0:
    Warning: In the use of `defaultUserHooks'
             (imported from Distribution.Simple):
             Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2
             compatibility in which case you must stick with defaultUserHooks"
Linking setup ...
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.o: relocation R_X86_64_32S against `stg_CAF_BLACKHOLE_info' can not be used when making a shared object; recompile with -fPIC
/var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
 * ERROR: dev-haskell/x11-1.5.0.1 failed (configure phase):
 *   compiling /var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1/Setup.hs failed
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_configure
 *   environment, line 2633:  Called cabal_src_configure '--configure-option=--with-xinerama'
 *   environment, line  592:  Called haskell-cabal_src_configure '--configure-option=--with-xinerama'
 *   environment, line 1971:  Called cabal-bootstrap
 *   environment, line  420:  Called die
 * The specific snippet of code:
 *           } || make_setup "$@" || die "compiling ${setupmodule} failed";
 * 
 * If you need support, post the output of `emerge --info '=dev-haskell/x11-1.5.0.1'`,
 * the complete build log and the output of `emerge -pqv '=dev-haskell/x11-1.5.0.1'`.
 * The complete build log is located at '/var/tmp/portage/dev-haskell/x11-1.5.0.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-haskell/x11-1.5.0.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1'
 * S: '/var/tmp/portage/dev-haskell/x11-1.5.0.1/work/X11-1.5.0.1'



deathstar ~ # emerge --info 
Portage 2.1.11.31 (hardened/linux/amd64, gcc-4.5.4, glibc-2.15-r3, 3.5.7-gentoo x86_64)
=================================================================
System uname: Linux-3.5.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.1
Timestamp of tree: Mon, 19 Nov 2012 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona -msse -msse2 -msse3 -mmmx"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=nocona -msse -msse2 -msse3 -mmmx"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch webrsync-gpg"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en cs ja"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC=""
USE="3dnow 3dnowext aalib acl acpi alsa amd64 bzip2 cdr cli cracklib crypt cxx dri dvd faac ffmpeg gdbm gpm hardened iconv ipv6 justify lame laptop mmx mmxext modules mudflap multilib ncurses nls nptl opengl openmp pam pax_kernel pcre pppd readline session sse sse2 ssl ssse3 tcpd theora threads unicode urandom v4l v4l2 vim-syntax xcomposite xinerama 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en cs ja" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="x86_64 i386" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Jan Matějka (RETIRED) gentoo-dev 2012-11-20 12:38:12 UTC
However, the same thing happened to me when I tried
    emerge cabal

so I solved it with upgrading ghc from 6.12.3 to 7.4.1-r1 and using dev-haskell/x11-1.5.0.0-r1
Comment 2 Sergei Trofimovich gentoo-dev 2012-11-20 17:20:01 UTC
(In reply to comment #1)
> However, the same thing happened to me when I tried
>     emerge cabal
> 
> so I solved it with upgrading ghc from 6.12.3 to 7.4.1-r1 and using
> dev-haskell/x11-1.5.0.0-r1

Interesting. Did you install ghc-6.12.3 before switching to hardened or after?
I think ghc only recently got basic support for PIC.
Comment 3 Jan Matějka (RETIRED) gentoo-dev 2012-11-20 17:32:46 UTC
After switching.

This is newly installed system. I also remember, that

* I emerged some version of ghc and dev-haskell/x11 without issues.
* synced portage (that would be: Timestamp of tree: Mon, 19 Nov 2012 00:45:01 +0000)
* and since then I couldn't emerge the x11 or cabal again
Comment 4 Sergei Trofimovich gentoo-dev 2013-07-29 12:44:23 UTC
Ok, i'm closing this as WONTFIX, as ghc-7.4 got stabilized.

ghc-7.4 seems to work fine on hardened here.