Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642018 - dev-haskell/pcap-0.4.5.2-r1 - dist/build/Network/Pcap/Base.o: ld: -r and -pie may not be used together
Summary: dev-haskell/pcap-0.4.5.2-r1 - dist/build/Network/Pcap/Base.o: ld: -r and -pie...
Status: RESOLVED DUPLICATE of bug 644170
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-22 10:55 UTC by M8R-u38wij
Modified: 2019-12-25 19:40 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,6.95 KB, text/plain)
2017-12-22 10:57 UTC, M8R-u38wij
Details
build_verbose_no_ccache.log (build_verbose_no_ccache.log,37.13 KB, text/plain)
2017-12-23 17:49 UTC, M8R-u38wij
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M8R-u38wij 2017-12-22 10:55:08 UTC
`emerge =dev-haskell/pcap-0.4.5.2-r1` fails with error

/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: -r and -pie may not be used together

Reproducible: Always




Portage 2.3.13 (python 2.7.14-final-0, default/linux/amd64/17.0/desktop/gnome, gcc-6.4.0, glibc-2.25-r9, 4.12.12-gentoo x86_64)
=================================================================
System uname: Linux-4.12.12-gentoo-x86_64-Intel-R-_Core-TM-_i5-2410M_CPU_@_2.30GHz-with-gentoo-2.4.1
KiB Mem:     8029732 total,   3261108 free
KiB Swap:   16776188 total,  16775668 free
Timestamp of repository gentoo: Thu, 21 Dec 2017 18:45:01 +0000
Head commit of repository gentoo: 044faa018977cda20c4311ff5651f246df232370
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-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.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
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://mirror.yandex.ru/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 

bliss-overlay
    location: /var/lib/layman/bliss-overlay
    masters: gentoo
    priority: 50

bumblebee
    location: /var/lib/layman/bumblebee
    masters: gentoo
    priority: 50

dlang
    location: /var/lib/layman/dlang
    masters: gentoo
    priority: 50

gamerlay
    location: /var/lib/layman/gamerlay
    masters: gentoo
    priority: 50

rust
    location: /var/lib/layman/rust
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

sublime-text
    location: /var/lib/layman/sublime-text
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    masters: gentoo
    priority: 50

tlp
    location: /var/lib/layman/tlp
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -mno-avx"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -mno-avx"
DISTDIR="/var/cache/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/var/cache/packfiles"
PORTAGE_CONFIGROOT="/"
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"
PORTAGE_TMPDIR="/media/SHARE/portemp"
USE="X a52 aac acl acpi alsa amd64 bash-completion bluetooth branding bzip2 cairo caja cdda cdr cli colord consolekit cracklib crypt cups cxx dbus djvu dri dts dvd dvdr eds emacs emboss encode evo exif fam ffmpeg firefox flac fortran fuse gdbm gif glamor gnome-keyring gnome-online-accounts gphoto2 gpm gstreamer gtk iconv icu idn introspection ipv6 jack jpeg lcms libnotify libsecret lzma mad mate mmx mng modules mp3 mp4 mpeg multilib ncurses networkmanager nls nptl nsplugin ogg opengl openmp pam pango pch pcre pdf perl png policykit ppds pth python qt3support qt4 qt5 readline sdl seccomp session sqlite sqlite3 sse sse2 ssl ssse3 startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vala vorbis wxwidgets x264 xattr xcb xml xv xvid 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" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard evdev synaptics" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru en" NETBEANS_MODULES="apisupport cnd" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby22" SANE_BACKENDS="pixma net" USERLAND="GNU" VIDEO_CARDS="intel nvidia" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 M8R-u38wij 2017-12-22 10:57:57 UTC
Created attachment 511456 [details]
build.log
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2017-12-22 19:57:24 UTC
I think it's not a pcap-specific failure but a leftoved of gcc switch from 5.x to 6.x. Please rebuild dev-lang/ghc and check if the error persists.

Thanks!
Comment 3 M8R-u38wij 2017-12-22 20:15:58 UTC
ghc was installed as part of `emerge dev-util/bustle` after switching to the new profile and `emerge -e @world`.

But anyway, just tried to `emerge =dev-lang/ghc-8.0.2 dev-haskell/pcap` and it still fails with the same error.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2017-12-22 22:55:04 UTC
(In reply to M8R-u38wij from comment #3)
> ghc was installed as part of `emerge dev-util/bustle` after switching to the
> new profile and `emerge -e @world`.
> 
> But anyway, just tried to `emerge =dev-lang/ghc-8.0.2 dev-haskell/pcap` and
> it still fails with the same error.

Oh, my apologies. I should have read error message more carefully. It's about -pie + -r mix, not -no-pie vs. -nopie. We'll need to dig a bit more to check why linker does not pass -no-pie into partially linked library.

1. Does ghc report it supports -no-pie? Please provide output of:
       ghc --info | fgrep pie
2. Let's enable more verbose log:
       CABAL_EXTRA_BUILD_FLAGS=-v HCFLAGS=-v emerge -v1 dev-haskell/pcap
   and attach the build log.
3. Does disabling ccache help? Something like:
       FEATURES=-ccache emerge -v1 dev-haskell/pcap
4. Plase provilde output of
       emerge --info dev-lang/ghc
Comment 5 M8R-u38wij 2017-12-23 17:49:37 UTC
Created attachment 511556 [details]
build_verbose_no_ccache.log

>1. Does ghc report it supports -no-pie? Please provide output of:
>       ghc --info | fgrep pie
 ,("C compiler supports -no-pie","NO")

>2. Let's enable more verbose log:
>       CABAL_EXTRA_BUILD_FLAGS=-v HCFLAGS=-v emerge -v1 dev-haskell/pcap
>   and attach the build log.
>3. Does disabling ccache help? Something like:
>       FEATURES=-ccache emerge -v1 dev-haskell/pcap
FEATURES="-ccache" CABAL_EXTRA_BUILD_FLAGS="-v" HCFLAGS="-v" emerge -v1 dev-haskell/pcap
log attached, still fails to build.

>4. Plase provilde output of
>       emerge --info dev-lang/ghc
Portage 2.3.13 (python 2.7.14-final-0, default/linux/amd64/17.0/desktop/gnome, gcc-6.4.0, glibc-2.25-r9, 4.12.12-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.12.12-gentoo-x86_64-Intel-R-_Core-TM-_i5-2410M_CPU_@_2.30GHz-with-gentoo-2.4.1
KiB Mem:     8029732 total,   2826972 free
KiB Swap:   16776188 total,  16652028 free
Timestamp of repository gentoo: Thu, 21 Dec 2017 18:45:01 +0000
Head commit of repository gentoo: 044faa018977cda20c4311ff5651f246df232370
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-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.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
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://mirror.yandex.ru/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 

myoverlay
    location: /home/igor/Dropbox/overlay
    masters: gentoo
    priority: 0

crossdev
    location: /usr/local/portage
    masters: myoverlay gentoo
    priority: 1

bliss-overlay
    location: /var/lib/layman/bliss-overlay
    masters: gentoo
    priority: 50

bumblebee
    location: /var/lib/layman/bumblebee
    masters: gentoo
    priority: 50

dlang
    location: /var/lib/layman/dlang
    masters: gentoo
    priority: 50

gamerlay
    location: /var/lib/layman/gamerlay
    masters: gentoo
    priority: 50

rust
    location: /var/lib/layman/rust
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

sublime-text
    location: /var/lib/layman/sublime-text
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    masters: gentoo
    priority: 50

tlp
    location: /var/lib/layman/tlp
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -mno-avx"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -mno-avx"
DISTDIR="/var/cache/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/var/cache/packfiles"
PORTAGE_CONFIGROOT="/"
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"
PORTAGE_TMPDIR="/media/SHARE/portemp"
USE="X a52 aac acl acpi alsa amd64 bash-completion bluetooth branding bzip2 cairo caja cdda cdr cli colord consolekit cracklib crypt cups cxx dbus djvu dri dts dvd dvdr eds emacs emboss encode evo exif fam ffmpeg firefox flac fortran fuse gdbm gif glamor gnome-keyring gnome-online-accounts gphoto2 gpm gstreamer gtk iconv icu idn introspection ipv6 jack jpeg lcms libnotify libsecret lzma mad mate mmx mng modules mp3 mp4 mpeg multilib ncurses networkmanager nls nptl nsplugin ogg opengl openmp pam pango pch pcre pdf perl png policykit ppds pth python qt3support qt4 qt5 readline sdl seccomp session sqlite sqlite3 sse sse2 ssl ssse3 startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vala vorbis wxwidgets x264 xattr xcb xml xv xvid 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" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard evdev synaptics" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru en" NETBEANS_MODULES="apisupport cnd" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby22" SANE_BACKENDS="pixma net" USERLAND="GNU" VIDEO_CARDS="intel nvidia" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-lang/ghc-8.0.2::gentoo was built with the following:
USE="binary gmp profile -doc -ghcbootstrap -ghcmakebinary" ABI_X86="(64)"
CFLAGS="-march=native -O2 -pipe -mno-avx -march=native -march=native -mno-avx -mno-avx -no-pie"
CXXFLAGS="-march=native -O2 -pipe -mno-avx"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -no-pie"
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2017-12-23 17:53:23 UTC
(In reply to M8R-u38wij from comment #5)
> USE="binary gmp profile -doc -ghcbootstrap -ghcmakebinary" ABI_X86="(64)"
> CFLAGS="-march=native -O2 -pipe -mno-avx -march=native -march=native
> -mno-avx -mno-avx -no-pie"
> CXXFLAGS="-march=native -O2 -pipe -mno-avx"
> LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -no-pie"

Aha, that is somewhat expected. Prebuilt ghc was built on a system without -no-pie support. I'll try to rebuild binaries against gcc-6.4.0.

As a workaround you can rebuild ghc with USE=-binary (will take a while).
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-25 19:40:51 UTC

*** This bug has been marked as a duplicate of bug 644170 ***