Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455106 - some packages fail to detect ncurses library with tinfo useflags through autoconf with LDFLAGS=-Wl,--as-needed
Summary: some packages fail to detect ncurses library with tinfo useflags through auto...
Status: RESOLVED DUPLICATE of bug 454216
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
Depends on:
Reported: 2013-02-02 11:11 UTC by Maciej Piechotka
Modified: 2013-02-05 12:44 UTC (History)
0 users

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

config log of tmux (config.log,48.27 KB, text/plain)
2013-02-02 13:00 UTC, Maciej Piechotka

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Piechotka 2013-02-02 11:11:37 UTC
It looks like ncurses library is not detected by autoconf with LDFLAGS=-Wl,--as-needed. I found the problem in a few libraries for example dev-haskell/terminfo:

checking for ncurses.h... yes
checking for setupterm in -lncursesw... no
checking for setupterm in -lncurses... no
checking for setupterm in -lcurses... no
configure: error: in `/var/tmp/portage/dev-haskell/terminfo-$
configure: error: curses library not found, so this package cannot be built
See `config.log' for more details

Without LDFLAGS=-Wl,--as-needed:

checking for ncurses.h... yes
checking for setupterm in -lncursesw... yes
configure: creating ./config.status

It is present in at least binutils 2.23.1 and

Portage 2.2.0_alpha161 (default/linux/amd64/10.0/desktop/gnome, gcc-4.6.3, glibc-2.16.0, 3.7.3-gentoo x86_64)
System uname: Linux-3.7.3-gentoo-x86_64-Intel-R-_Core-TM-_i7-3820QM_CPU_@_2.70GHz-with-gentoo-2.2
KiB Mem:    16070444 total,   1867380 free
KiB Swap:   16777212 total,  16738948 free
Timestamp of tree: Sat, 02 Feb 2013 09:45:01 +0000
ld GNU ld (Linux/GNU Binutils)
app-shells/bash:          4.2_p42
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.13.1
sys-devel/binutils:       2.23.1,
sys-devel/gcc:            4.6.3, 4.7.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r5::gnome
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo crossdev gnome x11 gentoo-haskell gamerlay vala science local
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -march=native -pipe -ggdb -w -Wa,--compress-debug-sections"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe -ggdb -w -Wa,--compress-debug-sections"
EMERGE_DEFAULT_OPTS="-j4 --load-average=7"
FCFLAGS="-O2 -march=native -pipe -ggdb -w -Wa,--compress-debug-sections"
FEATURES="assume-digests binpkg-logs clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox xattr"
FFLAGS="-O2 -march=native -pipe -ggdb -w -Wa,--compress-debug-sections"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=both -Wl,--sort-common -Wl,--no-keep-memory"
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"
PORTDIR_OVERLAY="/usr/local/portage-crossdev /var/lib/layman/gnome /var/lib/layman/x11 /var/lib/layman/haskell /var/lib/layman/gamerlay /var/lib/layman/vala /var/lib/layman/science /usr/local/portage"
USE="X a52 aac acl acpi alsa amd64 avx berkdb bluetooth branding bzip2 bzr c++0x cairo caps cdda cdr cli clutter colord cracklib crypt cryptsetup cups cxx dbus dconf debugger device-mapper dri dts dvd dvdr eds emacs emboss encode evo exif fam ffmpeg firefox firewalld flac flash fontconfig fortran fprint fuse g3dvl gdbm gdm gif git gmp gnome gnome-keyring gnome-online-accounts gnutls gpm grilo gsettings gstreamer gtk gtk3 gtkstyle gui iconv introspection ipsec ipv6 ipython irc ithreads jabber jemalloc jpeg kerberos laptop latex lcms ldap libkms libnotify libproxy llvm lvm lzma mad map mercurial mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl nsplugin ogg opencl opengl openmp oss pam pango parted pch pcre pdf perl pkcs11 png policykit postgres ppds profiler pulseaudio python qemu qt4 readline realtime samba sdl session sna socialweb spell spice sqlite sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification subversion svg symlink systemd tcpd telepathy theora threads tiff tracker truetype udev udisks unicode upower usb v4l vaapi vala vdpau virt-network virtfs virtualbox vorbis vpx webkit wxwidgets x264 xattr xcb xcomposite xinerama xml xv xvid zlib zsh-completion" 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" 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" DRACUT_MODULES="caps crypt lvm systemd" 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" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev synaptics mouse mutouch" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en pl en_GB" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 jython2_5" QEMU_SOFTMMU_TARGETS="arm x86_64 i386" QEMU_USER_TARGETS="arm x86_64 i386" RUBY_TARGETS="ruby19" 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"
Comment 1 Rafał Mużyło 2013-02-02 12:21:49 UTC
Attach config.log from such failed build.
Comment 2 Maciej Piechotka 2013-02-02 13:00:45 UTC
Created attachment 337668 [details]
config log of tmux

Example config.log
Comment 3 Rafał Mużyło 2013-02-02 21:57:50 UTC

This is known to break some checks.

But in this particular case: any chance your ncurses is built with 'tinfo' useflag ?
Comment 4 Maciej Piechotka 2013-02-03 10:38:56 UTC
(In reply to comment #3)
> CFLAGS="...-w..."
> CXXFLAGS="...-w..."
> This is known to break some checks.

Also known to unbreak -Werror I'm afraid.

> But in this particular case: any chance your ncurses is built with 'tinfo'
> useflag ?

Yes, it is. I believe it is enabled by default.
Comment 5 Rafał Mużyło 2013-02-03 16:22:59 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > CFLAGS="...-w..."
> > CXXFLAGS="...-w..."
> > 
> > This is known to break some checks.
> > 
> Also known to unbreak -Werror I'm afraid.
Two wrongs don't make a right (well, three sometimes do ;)). See bug 292416 for an example case against. 
> > But in this particular case: any chance your ncurses is built with 'tinfo'
> > useflag ?
> Yes, it is. I believe it is enabled by default.
No, it's not.

Anyway, as it seems to be a useflag problem, file against the packages, that fail.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-05 12:44:08 UTC

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