Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 639096 - dev-lang/ghc-7.8.4 fails configure : relocation R_X86_64_32S against symbol can not be used when making a shared object; recompile with -fPIC
Summary: dev-lang/ghc-7.8.4 fails configure : relocation R_X86_64_32S against symbol ...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo's Haskell Language team
Depends on:
Reported: 2017-11-28 19:05 UTC by Kent Fredric (IRC: kent\n)
Modified: 2018-01-10 17:15 UTC (History)
1 user (show)

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

ghc-7.8.4:20171128-185318.log.gz (ghc-7.8.4:20171128-185318.log.gz,14.24 KB, application/gzip)
2017-11-28 19:07 UTC, Kent Fredric (IRC: kent\n)

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) gentoo-dev 2017-11-28 19:05:43 UTC
On Gentoo 17.0 Profile, where there is -fPIC enforced, this version fails for reasons possibly similar to the ones in bug #606666  (OOo, bad omen)

 * Package:    dev-lang/ghc-7.8.4            
 * Repository: gentoo                          
 * Maintainer:                                         
 * USE:        abi_x86_64 amd64 elibc_glibc gmp kernel_linux userland_GNU
 * FEATURES:   ccache preserve-libs sandbox test userpriv usersandbox
 * PT_PAX marking -m /var/tmp/portage/dev-lang/ghc-7.8.4/work/usr/lib64/ghc-7.8.4/bin/ghc with paxctl
 * XATTR_PAX marking -me /var/tmp/portage/dev-lang/ghc-7.8.4/work/usr/lib64/ghc-7.8.4/bin/ghc with setfattr
 * Applying ghc-7.0.4-CHOST-prefix.patch ...                           
 * Applying ghc-7.8.1_rc1-libbfd.patch ...
 * Applying ghc-7.8.2-cgen-constify.patch ...
 * Applying ghc-7.8.3-prim-lm.patch ...                                   
 * Applying ghc-7.6.3-preserve-inplace-xattr.patch ...                 
 * Applying ghc-7.8.4-ia64-CLOSUREs.patch ...
 * Applying ghc-7.8.4-ia64-CLOSUREs-regenerated.patch ...
 * Applying ghc-7.8.3-linker-warn.patch ...                               
 * Applying ghc-7.8.3-pic-sparc.patch ...                              
 * Applying ghc-7.8.3-ppc32-fPIC.patch ...                             
 * Applying ghc-7.8.4-gold.patch ...        
 * Running eautoreconf in '/var/tmp/portage/dev-lang/ghc-7.8.4/work/ghc-7.8.4' ...
 * Running autoconf --force ...                                        
 * Running autoheader ...
 * ERROR: dev-lang/ghc-7.8.4::gentoo failed (configure phase):
 *   econf failed


checking whether bootstrap compiler is affected by bug 9439... /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin
/ld: conftestghc.o: relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a shared object; recompile
 with -fPIC                                                                                                                              
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-lang/ghc-7.8.4/work/usr/lib64/ghc-7.8
.4/base- relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when mak
ing a shared object; recompile with -fPIC                                                                                                
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-lang/ghc-7.8.4/work/usr/lib64/ghc-7.8
.4/base- relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when mak
ing a shared object; recompile with -fPIC 


/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-lang/ghc-7.8.4/work/usr/lib64/ghc-7.8
.4/base- warning: relocation against `utime@@GLIBC_2.2.5' in readonly section `.text'        
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output     
collect2: error: ld returned 1 exit status                                                                                               
./configure: line 3229: ./conftestghc: No such file or directory

<no location info>:                                                                                                                      
    Warning: Couldn't figure out LLVM version!                                                                                           
             Make sure you have installed LLVM                                                                                           
ghc: could not execute: opt                                                                                                              
failed to compile                                                                                                                        
checking build system type... x86_64-pc-linux-gnu                                                                                        
checking host system type... x86_64-pc-linux-gnu                                                                                         
checking target system type... x86_64-pc-linux-gnu                                                                                       
GHC build  : x86_64-unknown-linux                                                                                                        
GHC host   : x86_64-unknown-linux                                                                                                        
GHC target : x86_64-unknown-linux                                                                                                        
configure: Building in-tree ghc-pwd                                                                                                      
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: utils/ghc-pwd/dist-boot/Main.o: relocation R_X86_64_32S ag
ainst `.text' can not be used when making a shared object; recompile with -fPIC                                                          
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-lang/ghc-7.8.4/work/usr/lib64/ghc-7.8
.4/unix- relocation R_X86_64_32 against symbol `base_ForeignziMarshalziAlloc_mallocBytes2_cl
osure' can not be used when making a shared object; recompile with -fPIC


/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-lang/ghc-7.8.4/work/usr/lib64/ghc-7.8
.4/base- warning: relocation against `tcsetattr@@GLIBC_2.2.5' in readonly section `.text'    
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output     
collect2: error: ld returned 1 exit status                                                                                               
configure: error: Building ghc-pwd failed  


Portage 2.3.13 (python 2.7.14-final-0, default/linux/amd64/17.0/no-multilib, gcc-7.2.0, glibc-2.25-r9, 4.9.6-gentoo-r1 x86_64)
                         System Settings
System uname: Linux-4.9.6-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E6750_@_2.66GHz-with-gentoo-2.4.1
KiB Mem:     2042732 total,     49944 free
KiB Swap:   18588764 total,  18491164 free
Head commit of repository gentoo: 3fa63592f4bf6fc2c8d8119be4e67dab0796e4cf

sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
ccache version 3.2.4 [enabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14::gentoo, 3.4.5::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.8.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.9::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            7.2.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo

    location: /usr/portage
    sync-type: git
    priority: -1000

CFLAGS="-march=native -mtune=native -O2 -pipe"
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/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mtune=native -O2 -pipe"
EMERGE_DEFAULT_OPTS="--quiet-build y --jobs 3 --autounmask=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs binpkg-multi-instance ccache clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 modules ncurses nls nptl openmp pam pcre readline seccomp session ssl tcpd unicode xattr zlib" ABI_X86="64" 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" 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 author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" 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"
Comment 1 Kent Fredric (IRC: kent\n) gentoo-dev 2017-11-28 19:07:00 UTC
Created attachment 507018 [details]
Comment 2 Sergei Trofimovich gentoo-dev 2017-11-28 20:26:43 UTC
Do you need ghc-7.8 for something specific? ghc-7.10 should generally have better PIC support.
Comment 3 Kent Fredric (IRC: kent\n) gentoo-dev 2017-11-29 02:10:51 UTC
Not particularly, it just cropped up as a test target on my box due to recent changes, and subsequently I figure that given this sort of problem, the affected version should start on the road to being removed ( either by simply masking it or actual removal ), because in a near future, it will cease to be installable.