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

Bug 568106

Summary: sys-boot/grub-0.97-r16 failed to build on tinfo ncurses
Product: Gentoo Linux Reporter: Daniel Savard <dsavard>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED DUPLICATE    
Severity: normal CC: dsavard
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 457530    
Attachments: Patch to configure.ac to fix the problem

Description Daniel Savard 2015-12-13 03:28:50 UTC
sys-boot/grub-0.97-r16 fails to ebuild on the ncurses library when tinfo is selected. I have seen this problem with at least two other packages so far.

x86_64-pc-linux-gnu-gcc -m32 -DHAVE_CONFIG_H -I. -I..  -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 -DUSE_MD5_PASSWORDS=1 -DSUPPORT_HERCULES=1 -DSUPPORT_SERIAL=1  -I../stage2 -I../stage1 -I../lib -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -O0 -fno-strict-aliasing -g -c -o asmstub.o asmstub.c
asmstub.c: In function ‘console_putchar’:
asmstub.c:655:11: warning: variable ‘y’ set but not used [-Wunused-but-set-variable]
    int x, y;
           ^
x86_64-pc-linux-gnu-gcc -m32 -O0 -fno-strict-aliasing -g  -Wl,-O1 -Wl,--as-needed -Wl,--build-id=none -o grub main.o asmstub.o ../stage2/libgrub.a  ../lib/libcommon.a -lncurses 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: asmstub.o: undefined reference to symbol 'COLS'
/usr/lib32/libtinfo.so.5: error adding symbols: DSO missing from command line
Comment 1 Daniel Savard 2015-12-13 03:30:59 UTC
# emerge --info sys-boot/grub
Portage 2.2.24 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.3, glibc-2.21-r1, 3.18.16-gentoo-nvidia x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.18.16-gentoo-nvidia-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16415128 total,   8095628 free
KiB Swap:   16777212 total,  16777080 free
Timestamp of repository gentoo: Sat, 12 Dec 2015 18:00:02 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.2.5-r6::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo
dev-util/ccache:          3.1.9-r4::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.18.4::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.9.6-r4::gentoo, 1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

gnome
    location: /usr/local/layman/gnome
    masters: gentoo
    priority: 0

science
    location: /usr/local/layman/science
    masters: gentoo
    priority: 1

My-overlay
    location: /usr/local/portage/my
    masters: gentoo science
    priority: 2

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL AdobeFlash-10.3 AdobeFlash-11.x"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /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 -pipe"
DISTDIR="/var/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync 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://gentoo.gossamerhost.com http://gentoo.mirrors.tera-byte.com/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.arcticnetwork.ca/ http://mirror.the-best-hosting.net http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.llarian.net/ http://mirror.iawnet.sandia.gov/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/ ftp://mirrors.tera-byte.com/pub/gentoo ftp://gentoo.arcticnetwork.ca/pub/gentoo/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://ftp.lug.udel.edu/pub/gentoo/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ "
LANG="fr_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/var/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"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac aalib acl acpi aim alsa amd64 android ao apache2 arj audiofile avahi berkdb blas bluetooth bonobo branding bsf bzip2 cairo caps cdaudio cdda cddax cddb cdparanoia cdr cgi cli colord cracklib crypt cscope css ctype cups curl curlwrappers cxx db2 dbi dbm dbus dbx derby dga directfb djvu dri dts dv dvd dvdr dvdread eds emacs emboss encode enscript evo examples exif expat extras fam fastcgi fbcon festival ffmpeg fftw flac flatfile fltk fontconfig foomaticdb fortran ftp fuse g3dvl gb gcj gconf gd gdbm geant4 geoip ggi gif gimp ginac git glamor glitz glut gmp gnome gnome-keyring gnome-online-accounts gnuplot gnutls gphoto2 gpm gps graphviz gsl gsm gssapi gstreamer gtk gtkhtml gzip hddtemp httpd i18n iconv icq icu id3tag idn ieee1394 imagemagick imap imlib inifile intel intl introspection ios ipv6 ithreads jabber jack jadetex java javascript jbig jikes jingle jpeg jpeg2k junit kerberos kpathsea lame lapack lash latex lcms ldap ldap-sasl leim libcaca libedit libgda libnotify libsamplerate libsecret libwww live lm_sensors lzma lzo mad maildir mailwrapper mbox mcal memlimit midi mikmod milter mime mmap mms mmx mmxext mng mod modplug modules mozilla mp3 mp4 mpeg mpi mplayer msn mtp mule multilib musepack musicbrainz nas nautilus ncurses networkmanager nls nntp nptl nsplugin nvidia ocaml ocr odbc ofx ogg oggvorbis openal openexr opengl openldap openmp openssl osc oscar pam pam_krb5 pam_ssh pango pcre pda pdf perl php pidgin plotutils png policykit portaudio posix postgres ppds prefork pthreads pulseaudio python qnx qt3support qt4 quicktime radius rar raw readline rss rtmp sane sasl scanner sdl seccomp sendmail servletapi session sha512 sharedext sharedmem slang slp smartcard smp sndfile snmp soap sockets sound sox speex spell sqlite sqlite3 sse sse2 ssl ssse3 startup-notification stream suexec svg swt symlink syslog systemd sysvipc taglib tcl tcpd tetex theora threads tiff timidity tk tls tokenizer tracker truetype udev udisks unicode upower usb v4l v4l2 vaapi vcd vdpau vhosts vim-syntax vlm vnc vorbis wavpack wddx win32codecs wmf wxwidgets x264 xattr xcb xcomposite xemacs xface xft xine xinerama xinetd xml xmlrpc xmp xmpp xosd xpm xprint xscreensaver xsl xulrunner xv xvid xvmc yahoo 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="actions alias auth_basic auth_digest authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config log_forensic logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif speling status unique_id userdir usertrack version vhost_alias" APACHE2_MPMS="prefork" 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" CPU_FLAGS_X86="3dnow 3dnowext aes avx avx2 fma3 fma4 mmx mmxext padlock popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" DRACUT_MODULES="mdraid multipath lvm syslog gensplash plymouth syslog debug dm network" 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 ublox ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en fr fr_FR fr_CA" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi dav flv geoip gunzip lua mp4 metrics push_stream stub_status xslt" NGINX_MODULES_MAIL="imap smtp" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 arm" RUBY_TARGETS="ruby20 ruby21" SANE_BACKENDS="net epson epson2" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau intel v4l" 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, USE_PYTHON

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

sys-boot/grub-0.97-r14::gentoo was built with the following:
USE="ncurses -custom-cflags -netboot -static" ABI_X86="64"
CFLAGS=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=bfd"


sys-boot/grub-2.02_beta2-r7::gentoo was built with the following:
USE="device-mapper fonts mount multislot nls sdl themes truetype -debug -doc -efiemu (-libzfs) -static -test" ABI_X86="64" GRUB_PLATFORMS="-coreboot -efi-32 -efi-64 -emu -ieee1275 -loongson -multiboot -pc -qemu -qemu-mips -uboot -xen"
CFLAGS=""
LDFLAGS=""

#=============================================================================

# equery u ncurses
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for sys-libs/ncurses-5.9-r99:
 U I
 + + abi_x86_32  : 32-bit (x86) libraries
 - - ada         : Add bindings for the ADA programming language
 + + cxx         : Build support for C++ (bindings, extra libraries, code generation, ...)
 + + gpm         : Add support for sys-libs/gpm (Console-based mouse driver)
 - - static-libs : Build static versions of dynamic libraries as well
 + + tinfo       : Build curses library (libncurses) sep from the low-level terminfo library (libtinfo) -- usually needed only for binary packages -- but it is binary compatible in either mode 
 + + unicode     : Add support for Unicode
Comment 2 Daniel Savard 2015-12-13 04:10:55 UTC
Created attachment 419072 [details, diff]
Patch to configure.ac to fix the problem

This patch fixes the problem adding the library libtinfow.so and libtinfo.so to the libraries.

Probably it needs to be checked separately in the configure script and added only if found. But, as a quick fix, it works for me.
Comment 3 Felix Janda 2015-12-13 12:58:18 UTC
You can also ask pkg-config for the correct ldflags.
https://autotools.io/pkgconfig/pkg_check_modules.html
Comment 4 Michael Palimaka (kensington) gentoo-dev 2015-12-13 18:01:44 UTC

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