Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666196 - sys-fs/xfsprogs USE="static static-libs" fails to build: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
Summary: sys-fs/xfsprogs USE="static static-libs" fails to build: Using 'getgrnam' in ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://bugzilla.kernel.org/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks: 652270
  Show dependency tree
 
Reported: 2018-09-13 22:07 UTC by Herbert Wantesh
Modified: 2018-10-20 18:56 UTC (History)
0 users

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


Attachments
build.log (sys-fs_xfsprogs-4.17.0-r1_use_mwttc.xz,34.14 KB, application/x-xz)
2018-09-14 06:03 UTC, Rolf Eike Beer
Details
build-xfsprogs-4.18.0.log (build-xfsprogs-4.18.0.log,94.29 KB, text/x-log)
2018-09-14 06:21 UTC, Tomáš Mózes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Herbert Wantesh 2018-09-13 22:07:56 UTC
[ebuild     U  ] sys-fs/xfsprogs-4.17.0-r1::gentoo [4.14.0::gentoo] USE="nls readline static static-libs -icu% -libedit" 0 KiB

xfsprogs breaks with the following compile error:

../libfrog/.libs/libfrog.a(convert.o): In function `gid_from_string':
convert.c:(.text+0x984): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64/libreadline.a(complete.o): In function `rl_username_completion_function':
(.text+0x48e9): warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../libfrog/.libs/libfrog.a(convert.o): In function `uid_from_string':
convert.c:(.text+0x904): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64/libreadline.a(shell.o): In function `sh_get_home_dir':
(.text+0x218): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64/libreadline.a(complete.o): In function `rl_username_completion_function':
(.text+0x48de): warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
(.text+0x4991): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(init.o): In function `check_open':
init.c:(.text+0x43): undefined reference to `platform_findrawpath'
init.c:(.text+0x54): undefined reference to `platform_findblockpath'
init.c:(.text+0x10e): undefined reference to `platform_check_ismounted'
init.c:(.text+0x16a): undefined reference to `platform_check_ismounted'
init.c:(.text+0x180): undefined reference to `platform_check_iswritable'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(init.o): In function `libxfs_device_open':
init.c:(.text+0x44b): undefined reference to `platform_direct_blockdev'
init.c:(.text+0x4e7): undefined reference to `platform_set_blocksize'
init.c:(.text+0x52e): undefined reference to `platform_set_blocksize'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(init.o): In function `libxfs_device_close':
init.c:(.text+0x687): undefined reference to `platform_flush_device'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(init.o): In function `libxfs_init':
init.c:(.text+0x775): undefined reference to `radix_tree_init'
init.c:(.text+0xaa0): undefined reference to `platform_findsizes'
init.c:(.text+0xb98): undefined reference to `platform_findsizes'
init.c:(.text+0xd33): undefined reference to `platform_findsizes'
init.c:(.text+0xd60): undefined reference to `platform_findsizes'
init.c:(.text+0xdd3): undefined reference to `platform_findsizes'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(init.o):init.c:(.text+0xe30): more undefined references to `platform_findsizes' follow
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(init.o): In function `libxfs_mount':
init.c:(.text+0x1564): undefined reference to `radix_tree_insert'
init.c:(.text+0x174e): undefined reference to `radix_tree_delete'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(init.o): In function `libxfs_umount':
init.c:(.text+0x1a1a): undefined reference to `radix_tree_delete'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(init.o): In function `libxfs_nproc':
init.c:(.text+0x1c65): undefined reference to `platform_nproc'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(init.o): In function `libxfs_device_alignment':
init.c:(.text+0x1bc9): undefined reference to `platform_align_blockdev'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(init.o): In function `libxfs_physmem':
init.c:(.text+0x1cb9): undefined reference to `platform_physmem'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64/libdevmapper.a(libdm-common.o): In function `_check_udev_sync_requirements_once':
(.text+0xca1): undefined reference to `udev_new'
(.text+0xcb5): undefined reference to `udev_queue_new'
(.text+0xcc9): undefined reference to `udev_queue_get_udev_is_active'
(.text+0xcdc): undefined reference to `udev_queue_unref'
(.text+0xce4): undefined reference to `udev_unref'
(.text+0xe5c): undefined reference to `udev_unref'
(.text+0xf51): undefined reference to `udev_queue_unref'
(.text+0xf59): undefined reference to `udev_unref'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(xfs_defer.o): In function `libxfs_defer_finish':
xfs_defer.c:(.text+0x278): undefined reference to `list_sort'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(xfs_sb.o): In function `libxfs_perag_get':
xfs_sb.c:(.text+0x1e): undefined reference to `radix_tree_lookup'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(xfs_sb.o): In function `xfs_perag_get_tag':
xfs_sb.c:(.text+0x79): undefined reference to `radix_tree_gang_lookup_tag'
/tmp/tmerge/portage/sys-fs/xfsprogs-4.17.0-r1/work/xfsprogs-4.17.0/libxfs/.libs/libxfs.a(xfs_sb.o): In function `libxfs_initialize_perag_data':
xfs_sb.c:(.text+0x1562): undefined reference to `radix_tree_lookup'
collect2: error: ld returned 1 exit status
gmake[2]: *** [../include/buildrules:46: xfs_io] Error 1
gmake[1]: *** [include/buildrules:35: io] Error 2
make: *** [Makefile:77: default] Error 2
Comment 1 Rolf Eike Beer archtester 2018-09-14 06:03:48 UTC
Created attachment 546892 [details]
build.log
Comment 2 Rolf Eike Beer archtester 2018-09-14 06:04:59 UTC
Tatt log:

FEATURES=' test' USE='' succeeded for =sys-fs/xfsprogs-4.17.0-r1
USE='-icu -nls -readline -static -static-libs' succeeded for =sys-fs/xfsprogs-4.17.0-r1
USE='icu -nls -readline -static -static-libs' succeeded for =sys-fs/xfsprogs-4.17.0-r1
USE='icu nls -readline -static -static-libs' succeeded for =sys-fs/xfsprogs-4.17.0-r1
USE='-icu nls readline -static -static-libs' succeeded for =sys-fs/xfsprogs-4.17.0-r1
USE='icu nls readline -static -static-libs' succeeded for =sys-fs/xfsprogs-4.17.0-r1
USE='icu nls -readline -static static-libs' succeeded for =sys-fs/xfsprogs-4.17.0-r1
USE='-icu -nls readline -static static-libs' succeeded for =sys-fs/xfsprogs-4.17.0-r1
USE='-icu -nls -readline static static-libs' failed for =sys-fs/xfsprogs-4.17.0-r1
    log has been saved as /root/tatt/logs/sys-fs_xfsprogs-4.17.0-r1_use_mwttc
USE='-icu nls -readline static static-libs' failed for =sys-fs/xfsprogs-4.17.0-r1
    log has been saved as /root/tatt/logs/sys-fs_xfsprogs-4.17.0-r1_use_TRoMU
USE='icu nls -readline static static-libs' failed for =sys-fs/xfsprogs-4.17.0-r1
    log has been saved as /root/tatt/logs/sys-fs_xfsprogs-4.17.0-r1_use_Uf6wN
USE='icu -nls readline static static-libs' failed for =sys-fs/xfsprogs-4.17.0-r1
    log has been saved as /root/tatt/logs/sys-fs_xfsprogs-4.17.0-r1_use_onXP3
USE='icu nls readline static static-libs' failed for =sys-fs/xfsprogs-4.17.0-r1
    log has been saved as /root/tatt/logs/sys-fs_xfsprogs-4.17.0-r1_use_Y9mjh

So it seems that USE=static is the culprit.
Comment 3 Tomáš Mózes 2018-09-14 06:13:28 UTC
It also fails on the latest in tree version on ~amd64.

Portage 2.3.49 (python 2.7.15-final-0, default/linux/amd64/17.0, gcc-8.2.0, glibc-2.27-r6, 4.19.0-rc3 x86_64)
=================================================================
System uname: Linux-4.19.0-rc3-x86_64-Intel-R-_Core-TM-_i5-3570_CPU_@_3.40GHz-with-gentoo-2.6
KiB Mem:    16321452 total,  12206248 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 14 Sep 2018 00:15:01 +0000
Head commit of repository gentoo: 0ce09df81641ea0a9359a6f7e3711030a6dc7526
sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p1) 2.31.1
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5-r1::gentoo, 3.6.6::gentoo, 3.7.0::gentoo
dev-util/cmake:           3.12.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1::gentoo
sys-devel/gcc:            8.2.0-r2::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: 4.17::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo


ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=native -O2 -pipe"
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/php/apache2-php7.1/ext-active/ /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/php/cli-php7.2/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="-mtune=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY 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-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict 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://tux.rainside.sk/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j4"
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="acl amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 libtirpc modules multilib ncurses nptl openmp pam pcre readline seccomp ssl tcpd unicode 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="actions alias auth_basic authn_alias authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias watchdog" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx f16c popcnt sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 xen pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NGINX_MODULES_HTTP="access charset gzip limit_conn limit_req log proxy rewrite gunzip upstream_check stub_status geoip2" NGINX_MODULES_STREAM="geoip2" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-1 php7-2" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_5 python3_6 python3_7" RUBY_TARGETS="ruby23 ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel i915 i965" 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_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Tomáš Mózes 2018-09-14 06:21:21 UTC
Created attachment 546894 [details]
build-xfsprogs-4.18.0.log
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2018-09-29 22:53:38 UTC
There's more than one bug here.

../libfrog/.libs/libfrog.a(convert.o): In function `gid_from_string':
convert.c:(.text+0x984): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

^ this is part of xfsprogs, so it would make sense to report it to upstream there

And yes, I checked, this is a regression compared to 4.14.

/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../lib64/libreadline.a(complete.o): In function `rl_username_completion_function':
(.text+0x48e9): warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

^ this is part of readline, so it seems like readline can't be built as a fully functional static lib anymore?!

Anyway, this part goes away with USE="-readline" (so a workaround would be to require that).
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2018-09-30 22:08:24 UTC
(In reply to Andreas K. Hüttel from comment #5)
> There's more than one bug here.
> 
> ../libfrog/.libs/libfrog.a(convert.o): In function `gid_from_string':
> convert.c:(.text+0x984): warning: Using 'getgrnam' in statically linked
> applications requires at runtime the shared libraries from the glibc version
> used for linking
> 
> ^ this is part of xfsprogs, so it would make sense to report it to upstream
> there
> 
> And yes, I checked, this is a regression compared to 4.14.
> 

OK so following discussion on the upstream bug...

The full static-only build is a Gentoo-only thing (we patch the build system). Upstream only supports "mostly static" (where this leads to a build warning but not to a linkage failure).

Essentially we have three options now:
1) Fix upstream code to work again (not feasible imho),
2) Change the meaning of USE=static to mean what upstream intends, or
3) Remove the useflag.

I tend towards 2). We should add an ewarn then though.
Comment 7 Larry the Git Cow gentoo-dev 2018-10-20 18:56:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e5508a380821c3e0833ad4418325284df741a69

commit 0e5508a380821c3e0833ad4418325284df741a69
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2018-10-20 18:56:08 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2018-10-20 18:56:34 +0000

    sys-fs/xfsprogs: Static build is not possible anymore, bug 666196
    
    Dropping static useflag.
    
    Closes: https://bugs.gentoo.org/666196
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
    Package-Manager: Portage-2.3.50, Repoman-2.3.11

 sys-fs/xfsprogs/xfsprogs-4.17.0-r1.ebuild | 13 +++----------
 sys-fs/xfsprogs/xfsprogs-4.18.0.ebuild    | 15 ++++-----------
 2 files changed, 7 insertions(+), 21 deletions(-)