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

Bug 605852

Summary: sys-fs/xfsdump: xfsinvutil uses ncurses but ebuild doesn't depend on it
Product: Gentoo Linux Reporter: Pacho Ramos <pacho>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 457530    

Description Pacho Ramos gentoo-dev 2017-01-16 08:47:16 UTC
Or, at least, it needs to be rebuilt when ncurses soname changes:
>>> package: sys-libs/ncurses-6.0-r1
 *  - /usr/lib32/libncurses.so.5
 *  - /usr/lib32/libncurses.so.5.9
 *      used by /usr/lib32/libgpm.so.1.20.0 (sys-libs/gpm-1.20.7-r2)
 *  - /lib64/libncurses.so.5
 *  - /lib64/libncurses.so.5.9
 *      used by /bin/tcsh (app-shells/tcsh-6.18.01-r2)
 *      used by /lib64/libgpm.so.1.20.0 (sys-libs/gpm-1.20.7-r2)
 *      used by /sbin/xfsinvutil (sys-fs/xfsdump-3.1.6)
 *      used by 3 other files
 *  - /lib64/libncursesw.so.5
 *  - /lib64/libncursesw.so.5.9
 *      used by /usr/lib64/ruby/2.0.0/x86_64-linux/curses.so (dev-lang/ruby-2.0.0_p648)

xfsinvutil looks to need it
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-01-16 12:28:14 UTC
I don't have xfsdump linking to ncurses:

# qlist -e xfsdump | xargs --no-run-if-empty scanelf -L -n -q -F '%n #F' | tr , '\n' | xargs --no-run-if-empty readlink -f | uniq | xargs --no-run-if-empty qfile -CS | sort -u
sys-apps/attr:0 (/lib64/libattr.so.1.1.0)
sys-apps/util-linux:0 (/lib64/libuuid.so.1.3.0)
sys-fs/xfsprogs:0 (/lib64/libhandle.so.1.0.3)
sys-libs/glibc:2.2 (/lib64/libc-2.23.so)
sys-libs/glibc:2.2 (/lib64/libpthread-2.23.so)

# ldd $(which xfsinvutil)
        linux-vdso.so.1 (0x00007fff9c9ea000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fc3f57e8000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fc3f5450000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fc3f59f0000)

So I wonder where this comes from on your system. Do you have "-Wl,--as-needed" in your LDFLAGS?
Comment 2 Pacho Ramos gentoo-dev 2017-01-16 21:14:06 UTC
Yeah, it has the default ones :/
Comment 3 Pacho Ramos gentoo-dev 2017-01-16 21:14:42 UTC
I am not sure... in that system I am running mostly stable, maybe linker behavior is different
Comment 4 Pacho Ramos gentoo-dev 2017-01-17 08:45:15 UTC
Portage 2.3.0 (python 2.7.12-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.4, glibc-2.23-r3, 4.4.26-gentoo x86_64)
=================================================================
System uname: Linux-4.4.26-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E7500_@_2.93GHz-with-gentoo-2.3
KiB Mem:     3915976 total,    860148 free
KiB Swap:    4194300 total,   2118492 free
Timestamp of repository gentoo: Fri, 13 Jan 2017 12:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.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.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.6.3::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

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

science
    location: /usr/portage/local/layman/science
    masters: gentoo
    priority: 0

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -fno-stack-protector"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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/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 -march=native -fno-stack-protector"
DISTDIR="/usr/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --autounmask-write --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.heanet.ie/pub/gentoo/"
LANG="es_ES.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/local/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="X a52 aac acl acpi alsa amd64 applet avahi bash-completion berkdb branding bzip2 cairo ccache cdda cddb cdr cli colord cracklib crypt cups cvs cxx dbus djvu dri dts dvd dvdr dvi eds emboss enchant encode evo exif fam fat ffmpeg firefox flac fortran fuse gdbm gif glamor gnome gnome-keyring gnome-online-accounts google gphoto2 gpm gstreamer gtk gtk3 gtkstyle gui hfs http iconv infinality introspection irc jabber jpeg kpathsea latex lcms ldap libnotify libsecret libvisual lyx mad mms mmx mmxext mng modules monolithic-build mp3 mp4 mpeg multilib musicbrainz nautilus ncurses network-cron networkmanager nls nptl ntfs numa ogg opengl openmp optimized-qmake pam pango pch pdf png policykit ppds pulseaudio qt3support qt4 readline reiserfs scanner sdl seccomp session smp spell sse sse2 ssl startup-notification svg systemd t1lib tcpd theora threads tiff tracker truetype udev udisks unicode upnp upnp-av upower usb v4l vaapi vala vcd vdpau vorbis wifi wxwidgets x264 xattr xcb xfs xml xv xvid youtube zeroconf zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" 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" KERNEL="linux" L10N="es es-ES en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="es es_ES en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev vesa radeon" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 5 Pacho Ramos gentoo-dev 2017-01-17 08:54:17 UTC
Also, grepping in the sources, I see ncurses is called from configure (probably from m4/package_ncurses.m4)

In doc/CHANGES I also see:
xfsdump-2.2.12 (29 May 2003)
        - fix up an invutil Makefile botch which was effectively
          disabling the optional ncurses support (interactive mode).
xfsdump-2.2.4 (08 November 2002)
        - configure now looks for, and xfsinvutil uses, the ncurses
          header and library rather than the curses version - this
          resolves an issue in those distributions that don't make
          the compatibility library available.

and I see multiple #include <ncurses.h> under invutil directory
Comment 6 SpanKY gentoo-dev 2017-01-18 09:57:04 UTC
the configure script will fail to detect ncurses if you have it built with USE=tinfo.  once that's fixed, making the ebuild support USE=ncurses is easy.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e67598f720e5e8f09cf2f8dbbae75047b227419