Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Error emerging xfsprogs: cannot find -ldevmapper
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
quinn_jones
n00b
n00b


Joined: 14 Dec 2005
Posts: 50
Location: Wilmington, MA, US

PostPosted: Sat Sep 22, 2018 9:13 pm    Post subject: [SOLVED] Error emerging xfsprogs: cannot find -ldevmapper Reply with quote

I ran into an error that I can't figure out how to clear, while executing an emerge -uDNav world: "cannot find -ldevmapper"

Package: sys-fs/xfsprogs
Installed version: 4.14.0
Upgrading to: 4.17.0-r1

I've ensured that libdevmapper.so exists:

Code:
# locate devmapper.so
/lib64/libdevmapper.so.1.02
/usr/lib64/libdevmapper.so


I've also re-emerged sys-fs/lvm2-2.02.145-r2, just in case.

There is a higher version of xfsprogs that is masked (~4.18.0), so I tried unmasking it and installing it by itself. It died with a similar/same error.

I've tried googling around and checking the Gentoo forums; either I'm alone with this error or my google-fu is weak today. I'm not sure what else to try.

Here is the tail-end of output from emerge --info '=sys-fs/xfsprogs-4.17.0-r1::gentoo', which shows the error and a bunch of warnings. The entire copy of /var/tmp/portage/sys-fs/xfsprogs-4.17.0-r1/temp/build.log is available at https://pastebin.com/5eUJbXjP

Code:
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ldevmapper
../libfrog/.libs/libfrog.a(convert.o): In function `gid_from_string':
convert.c:(.text+0x83c): 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+0x34de): 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+0x7bc): 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+0xe9): 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+0x34bc): warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
(.text+0x354c): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
gmake[2]: *** [../include/buildrules:46: xfs_io] Error 1
gmake[1]: *** [include/buildrules:36: io] Error 2
make: *** [Makefile:77: default] Error 2


Here is the output of emerge -pqv '=sys-fs/xfsprogs-4.17.0-r1::gentoo'

Code:
[ebuild     U ] sys-fs/xfsprogs-4.17.0-r1 [4.14.0] USE="nls readline static static-libs -icu% -libedit"


Here is the output from emerge --info '=sys-fs/xfsprogs-4.17.0-r1::gentoo'
Code:
Portage 2.3.40 (python 3.6.5-final-0, default/linux/amd64/17.0, gcc-7.3.0, glibc-2.26-r7, 4.9.95-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.95-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5400+-with-gentoo-2.4.1
KiB Mem:    16343988 total,   3336916 free
KiB Swap:    2104508 total,   2104508 free
Timestamp of repository gentoo: Fri, 21 Sep 2018 08:30:01 +0000
Head commit of repository gentoo: a04cd3628ed12c5c59d87e66d21f1cbdce041762
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p2) 2.30.0
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

crossdev
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /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"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=native"
DISTDIR="/storage/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://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j1"
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="3dnow 3dnowext X acl acpi alsa amd64 apache apache2 bash-completion berkdb bzip2 cairo cli crypt custom-cflags cxx dri dvd dvdr fortran gcj gdbm gdu gif glibc-omitfp gnutls gtk iconv id3tag ipv6 jpeg kdrive libtirpc lua maildir matroska mmx mmxext mng modules mp3 mpeg multilib ncurses nls nptl nptl-only offensive ogg openmp pam pcre php png python readline sasl script seccomp smp snmp sqlite sqlite3 sse sse2 sse3 ssl svg tcpd tiff truetype udisks unicode usb vhosts vorbis win32codecs xattr xinetd xml zlib" ABI_X86="64" ALSA_CARDS="sb16" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_core authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi 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 proxy proxy_html proxy_http rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias xml2enc" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3" 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" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NGINX_MODULES_HTTP="autoindex gzip referer fancyindex geoip gzip_static headers_more" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby23" SANE_BACKENDS="epjitsu" USERLAND="GNU" VIDEO_CARDS="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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Thank you, in advance, for any help in finding a solution!


Last edited by quinn_jones on Sun Sep 23, 2018 12:07 am; edited 2 times in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21624

PostPosted: Sat Sep 22, 2018 11:13 pm    Post subject: Reply with quote

You set USE=static, so you need a static libdevmapper. The ebuild should have had a dependency to force you to provide one, but may not have that dependency. Most people do not use static libraries much, so mistakes there are less likely to be noticed.

Do you actually need USE=static?
Back to top
View user's profile Send private message
quinn_jones
n00b
n00b


Joined: 14 Dec 2005
Posts: 50
Location: Wilmington, MA, US

PostPosted: Sun Sep 23, 2018 12:06 am    Post subject: Reply with quote

Removing the static flags seems to have solved the problem. Thank you for pointing that out!

I didn't even recognize that I was building static libraries, that was something I had set years ago (according to the timestamps in /etc/portage/package.use/*) and I don't even remember why. I set that flag on a few different packages, but I've removed them all and am currently rebuilding the packages.

Incidentally, this system has been running gentoo for over a decade now, and it's role has changed a few times. There's just a bit of cruft in /etc/portage. I'll go on a cleaning binge one of these days.

Thanks again!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21624

PostPosted: Sun Sep 23, 2018 12:32 am    Post subject: Reply with quote

The most common good reason for enabling static libraries (and people disagree about how good the reason is) is that you want to embed the resulting files in an initramfs (or some types of chroot setup), not embed supporting shared objects, and have a working environment. A related reason that may come up is enabling static linking for emergency recovery tools, so that there are fewer points of failure in a tool that you may need when the system is severely broken. Either could be a reason for setting it on xfs-progs, since you might need xfs fsck to work even when many things are broken.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum