Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 685186 - sys-libs/ncurses-6.1-r3 - configure misdetects dlsym() with CFLAGS="-O2 -flto"
Summary: sys-libs/ncurses-6.1-r3 - configure misdetects dlsym() with CFLAGS="-O2 -flto"
Status: RESOLVED DUPLICATE of bug 606142
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-06 10:49 UTC by Roy Bamford
Modified: 2019-05-06 14:26 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 Roy Bamford gentoo-dev 2019-05-06 10:49:10 UTC
Linking of sys-libs/ncurses-6.1-r3 fails with both the gold and bfd linkers unless   EXTRA_ECONF="LIBS=-ldl" is used. 

Reproducible: Always

Steps to Reproduce:
1.emerge -1 =sys-libs/ncurses-6.1-r3
2.Notice configure fails
3.
Actual Results:  
checking if you want to load GPM dynamically... yes
checking for dlsym... yes
checking whether able to link to dl*() functions... configure: error: Cannot link test program for libdl


Expected Results:  
emerge -1 =sys-libs/ncurses-6.1-r3 should work

mail ~ # emerge --info
Portage 2.3.66 (python 3.6.8-final-0, default/linux/amd64/17.0/no-multilib/hardened, gcc-9.1.0, glibc-2.29-r2, 4.16.3-gentoo x86_64)
=================================================================
System uname: Linux-4.16.3-gentoo-x86_64-AMD_Phenom-tm-_9550_Quad-Core_Processor-with-gentoo-2.6
KiB Mem:     2049956 total,    769404 free
KiB Swap:     499500 total,    489772 free
Timestamp of repository gentoo: Mon, 06 May 2019 01:15:01 +0000
Head commit of repository gentoo: b670f8d8b7a68020ab2c87bc7555272754e3b08a
sh bash 5.0_p7
ld GNU gold (Gentoo 2.32 p2 2.32.0) 1.16
app-shells/bash:          5.0_p7::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r3::gentoo, 2.32-r1::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo, 9.1.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=amdfam10 -mcx16 -msahf -mpopcnt -mindirect-branch=thunk -flto            --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=amdfam10"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=amdfam10 -mcx16 -msahf -mpopcnt -mindirect-branch=thunk -flto            --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=amdfam10"
DISTDIR="/var/cache/http-replicator"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox 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://gentoo.mneisen.org/                  http://mirror.uni-c.dk/pub/gentoo/                  http://mirror.mdfnet.se/mirror/gentoo                  http://ftp.gentoo.bg/                  http://distfiles.gentoo.bg/                  http://mirrors.ludost.net/gentoo/                  http://mirror.hamakor.org.il/pub/mirrors/gentoo/                  http://ftp.dei.uc.pt/pub/linux/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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="/var/tmp"
USE="3dnow 3dnowext acl amd64 bzip2 caps crypt cxx gpm graphite hardened iconv ipv6 libtirpc mmx ncurses nls nptl openmp pam pcre pie readline seccomp sse sse2 sse4a ssl ssp unicode xattr xtpax zlib" ABI_X86="64" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4a" ELIBC="glibc" KERNEL="linux" L10N="en_GB en_US" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64 ppc64 sparc sparc64" QEMU_USER_TARGETS="i386 x86_64 ppc64 sparc sparc64" RUBY_TARGETS="ruby24" 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mike Gilbert gentoo-dev 2019-05-06 14:16:33 UTC
Please attach 2 things:

1. Full build log.
2. config.log from the build directory.
Comment 2 Mike Gilbert gentoo-dev 2019-05-06 14:24:44 UTC
I can reproduce with CFLAGS="-O2 -flto".
Comment 3 Mike Gilbert gentoo-dev 2019-05-06 14:26:33 UTC

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