Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 474944

Summary: sys-apps/gptfdisk-0.8.6 USE=ncurses - ?
Product: Gentoo Linux Reporter: Jason Bucata <tech31842>
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jason Bucata 2013-06-27 07:18:48 UTC
Trying to create a fresh install of Gentoo on an amd64 chroot.  gptfdisk 0.8.6 won't compile with USE=ncurses.  Compiles with USE=-ncurses.  Also, it compiles fine on my 32-bit side even with USE=ncurses.

Near the top of the build output is:

Package ncurses was not found in the pkg-config search path.
Perhaps you should add the directory containing `ncurses.pc'
to the PKG_CONFIG_PATH environment variable
No package 'ncurses' found

...followed later by a bunch of "undefined reference to" ncurses-looking things at link time.

I'll note that, if I'm reading the ebuild correctly, it looks like gptfdisk-0.8.6 wants ncurses to be built with USE=static-libs.  My 64-bit chroot currently has ncurses with USE=-static-libs.  But, so does my 32-bit install!  I just reemerged gptfdisk on my 32-bit install, to be sure, and it finished with no errors.
Comment 1 Jason Bucata 2013-06-27 07:24:27 UTC
Just now I tried rebuilding ncurses with USE=static-libs.  gptfdisk subsequently built without error.  So the problem seems to be related to portage, perhaps?  It should be enforcing that ncurses must have static-libs enabled, but apparently it's not (except that, bizarrely, on 32-bit x86 it's not a problem).

...OK, even more bizarre, I now rebuilt ncurses without static libs.  Then I tried rebuilding gptfdisk.  Now it works!  So even though, ostensibly, ncurses no longer has the static libraries around at all, the fact of them **having existed previously** is enough for gptfdisk to suddenly start working.

Perhaps this is why it manages to compile on my 32-bit install too: It's very possible that at one time in the past, I had had ncurses built with static libraries.

I'll nose around to see if I can find static libraries for ncurses that weren't removed by Portage.
Comment 2 Jason Bucata 2013-06-27 07:51:07 UTC
Based on "equery files" none of the .a files were left over when I rebuilt without static-libs.

I'm out of further ideas.  I don't need to start using this chroot for real yet so I can mess around if needed; I'm happy to try to debug this.
Comment 3 Jason Bucata 2013-06-27 07:53:44 UTC
Portage 2.1.12.2 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.0.80 x86_64)
=================================================================
System uname: Linux-3.0.80-x86_64-AMD_Phenom-tm-_II_X3_705e_Processor-with-gentoo-2.2
KiB Mem:     3520220 total,    566416 free
KiB Swap:    7340028 total,   7337264 free
Timestamp of tree: Wed, 26 Jun 2013 14:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage_overlay interactive-fiction
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10.3 AdobeFlash-11.x"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=amdfam10 -fomit-frame-pointer"
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 -march=amdfam10 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" http://gentoo.gossamerhost.com http://mirror.iawnet.sandia.gov/gentoo/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
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="/work"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/root/portage_overlay /var/lib/layman/interactive-fiction"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X acl alsa amd64 bash-completion berkdb bzip2 cjk cli cracklib crypt cups cxx dbus dri exif fam flac gdbm gnutls gstreamer iconv jpeg libnotify lvm lzma mmx modules mudflap multilib ncurses nls nptl ogg opengl openmp pam pcre png readline session sse sse2 sse3 ssl svg tcpd tiff udev unicode usb vim-syntax vorbis 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="lvm" ELIBC="glibc" FOO2ZJS_DEVICES="km2300" 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 jp" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="hp3900" USERLAND="GNU" VIDEO_CARDS="r600 vesa" 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, USE_PYTHON
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-06-27 12:22:12 UTC
Please attach the entire build log and the config.log to this bug report.
Comment 5 Jason Bucata 2013-06-27 14:27:15 UTC
(In reply to Jeroen Roovers from comment #4)
> Please attach the entire build log and the config.log to this bug report.

Since I accidentally worked around the problem, I can't attach logs that show the problem any longer.  Unless we somehow figure out what the ncurses ebuild did to the filesystem, and revert it.
Comment 6 Jason Bucata 2013-07-16 06:24:39 UTC
I finally tried a fresh install from a current stage3 downloaded tonight.  I straightaway tried to emerge gptfdisk with ncurses and it worked fine.

It turns out that the amd64 installation I was originally seeing the bug in, was installed from a stage3 dating back to October 2012, and had been slowly updated ever since.

I tried to do a fresh install from that October 2012 stage3, but it complains about invalid EAPI value 5 in the profile (since it's looking at a current copy of the portage tree).  Not especially surprised.

Since it works out of the box now, it seems that there was some oddity in the stage3 as offered in October 2012 that has since been fixed.