Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 567572 - sys-fs/lvm2-2.02.136[static] fails to build - ../libdm/ioctl/libdevmapper.a(libdm-stats.o): In function `dm_stats_create_region': libdm-stats.c:(.text+0x33e8): undefined reference to `log10'
Summary: sys-fs/lvm2-2.02.136[static] fails to build - ../libdm/ioctl/libdevmapper.a(l...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-05 09:55 UTC by Herbert Wantesh
Modified: 2016-03-20 14:41 UTC (History)
6 users (show)

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


Attachments
build log (sys-fs:lvm2-2.02.136:20151206-195433.log,46.06 KB, text/plain)
2015-12-06 19:56 UTC, Herbert Wantesh
Details
add libm linker flags (lvm2-2.02.136-static-dmsetup-libm.patch,532 bytes, patch)
2015-12-17 23:11 UTC, Christian Hagau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Herbert Wantesh 2015-12-05 09:55:44 UTC
[ebuild     U ~] sys-fs/lvm2-2.02.136::gentoo [2.02.116-r2::gentoo] USE="readline static static-libs udev -clvm -cman -device-mapper-only -lvm1 -lvm2create_initrd (-selinux) -systemd -thin" 0 KiB

doesn't compile with static useflag enabled, lvm2-2.02.116-r2 compiled without a problem

Reproducible: Always

Actual Results:  
x86_64-pc-linux-gnu-gcc -shared -Wl,-soname,libdevmapper-event.so.1.02 \
        -O2 -pipe -fPIC -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--version-script,.export.sym -L../../libdm -L../../lib -L../../libdaemon/client -L../../daemons/dmeventd libdevmapper-event.o  -lrt  -ldevmapper -o libdevmapper-event.so.1.02
rm -f libdevmapper-event.a
x86_64-pc-linux-gnu-ar rs libdevmapper-event.a libdevmapper-event.o 
x86_64-pc-linux-gnu-ar: creating libdevmapper-event.a
ln -s -f libdevmapper-event.so.1.02 libdevmapper-event.so
x86_64-pc-linux-gnu-gcc -O2 -pipe -fPIC -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -L./libdm -L./lib -L./libdaemon/client -L./daemons/dmeventd -L../libdm -L../lib -L../libdaemon/client -L../daemons/dmeventd -L../../libdm -L../../lib -L../../libdaemon/client -L../../daemons/dmeventd  -Wl,--export-dynamic -L. -o dmeventd dmeventd.o \
-ldl -ldevmapper-event -lpthread -lrt  -ldevmapper -rdynamic
x86_64-pc-linux-gnu-gcc -O2 -pipe -fPIC -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -L./libdm -L./lib -L./libdaemon/client -L./daemons/dmeventd -L../libdm -L../lib -L../libdaemon/client -L../daemons/dmeventd -L../../libdm -L../../lib -L../../libdaemon/client -L../../daemons/dmeventd -Wl,--export-dynamic -Wl,--no-export-dynamic -static -L. -L../../libdm/ioctl -o dmeventd.static \
dmeventd.o -ldl -ldevmapper-event -lpthread -lrt  -ldevmapper  -ludev -lblkid -luuid
dmeventd.o: In function `_do_process_request':
dmeventd.c:(.text+0x2ec9): warning: Using 'dlopen' 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/4.9.3/../../../../lib64/libudev.a(util.o): In function `get_group_creds':
(.text+0x2967): warning: Using 'getgrgid' 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/4.9.3/../../../../lib64/libudev.a(util.o): In function `get_group_creds':
(.text+0x29d2): 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/4.9.3/../../../../lib64/libudev.a(util.o): In function `get_user_creds':
(.text+0x287a): 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/4.9.3/../../../../lib64/libudev.a(util.o): In function `get_user_creds':
(.text+0x27b7): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
make[2]: Leaving directory '/tmp/tmerge/portage/sys-fs/lvm2-2.02.136/work/LVM2.2.02.136/daemons/dmeventd'
make[1]: Leaving directory '/tmp/tmerge/portage/sys-fs/lvm2-2.02.136/work/LVM2.2.02.136/daemons'
x86_64-pc-linux-gnu-gcc -O2 -pipe -fPIC -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -L./libdm -L./lib -L./libdaemon/client -L./daemons/dmeventd -L../libdm -L../lib -L../libdaemon/client -L../daemons/dmeventd  -L../libdm \
      -o dmsetup dmsetup.o -ldevmapper -lrt 
x86_64-pc-linux-gnu-gcc -O2 -pipe -fPIC -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -L./libdm -L./lib -L./libdaemon/client -L./daemons/dmeventd -L../libdm -L../lib -L../libdaemon/client -L../daemons/dmeventd -Wl,--no-export-dynamic -static -L../libdm/ioctl \
      -o dmsetup.static dmsetup.o -ldevmapper  -ludev -lblkid -luuid -lpthread -lrt 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../lib64/libudev.a(util.o): In function `get_group_creds':
(.text+0x2967): warning: Using 'getgrgid' 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/4.9.3/../../../../lib64/libudev.a(util.o): In function `get_group_creds':
(.text+0x29d2): 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/4.9.3/../../../../lib64/libudev.a(util.o): In function `get_user_creds':
(.text+0x287a): 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/4.9.3/../../../../lib64/libudev.a(util.o): In function `get_user_creds':
(.text+0x27b7): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../libdm/ioctl/libdevmapper.a(libdm-stats.o): In function `dm_stats_create_region':
libdm-stats.c:(.text+0x33e8): undefined reference to `log10'
libdm-stats.c:(.text+0x33ed): undefined reference to `lround'
collect2: error: ld returned 1 exit status
Makefile:137: recipe for target 'dmsetup.static' failed



Portage 2.2.20.1 (python 2.7.10-final-0, hardened/linux/amd64, gcc-4.9.3, glibc-2.21-r1, 4.3.0-gentoo x86_64)
=================================================================
System uname: Linux-4.3.0-gentoo-x86_64-Intel-R-_Core-TM-_i5-2540M_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:    16351344 total,  12636548 free
KiB Swap:   20971516 total,  20971516 free
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
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.4.3::gentoo
dev-util/ccache:          3.1.9-r4::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.18.4::gentoo
sys-apps/sandbox:         2.9::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       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.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/gentoo.git
    priority: -1000

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 0

local
    location: /usr/local/portage/overlay
    masters: gentoo
    priority: 1

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
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"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nodoc parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common"
MAKEOPTS="-j4 -l4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude ChangeLog"
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="/tmp/portage"
USE="3dnow 3dnowext 64bit X a52 aac aalib accessibility acl acpi additions aften aio alsa amd64 amr amrnb amrwb ap apm apng archive arping asf asm aspell asyncns audio avcodec avformat avi avresample avx blksha1 browserplugin bzip2 cairo caps cdda cddb cdio cdparanoia chm city classic cli client clockdiff clucene cmake commercial consolekit cracklib crypt cryptsetup css cups curl custom-cflags custom-optimization cvs cxx d3d9 daemon dbus deprecated development device-mapper devil dga dhcpcd dirac divx divx4linux djvu dmx dri dts dvd dvdnav dvdr dvdread ebook egl embedded encode enda equalizer eselect evdev exceptions exif extensions extras faac faad fam fbcon ffmpeg filecaps firefox flac fluidsynth fontconfig fortran ftp fts3 fuse g3dvl gallium gbm gcrypt gd gecko geoip geoloc gif gimp gimpprint git gles gles2 glib glibc-omitfp glitz gmp gnutls gpl gpm gptfdisk gs gstreamer gtk gtk2 gtk3 gudev hardened httpd hwdb icecast iconv icu id3 id3tag idn imagemagick imap inotify ipc ipv6 jabber jav jingle jpeg jpeg2k justify kde kdrive keymap kipi lame lcms less libkms libnotify libsamplerate libvisual live lm_sensors loop-aes lua lvm lzma lzo mad magic maildir matroska meanwhile midi minizip mmx mmxext mng modemmanager modules mousewarp moznocompose moznoirc moznomail mp2 mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musepack nas ncat ncurses ndiff nemesi net network networkmanager nfs nfsv3 nls nmap normalize notification nping nptl nptlonly nss ntfsprogs nut nxclient offlinehelp ogg okteta openal opencore-amr openexr opengl openmp openrc openssl openvg optimized-qmake osdmenu osmesa otr p2p pam pcap pcre pdf perl pgp pie plasma player png polarssl policykit poppler-data postproc postscript ppds ppp privacy ps pulseaudio qmake qml qt-faststart qt3support qt4 quicktime raptor rar readline real realmedia redland replaygain reviewboard rpc rtc rtmp rtsp sasl schroedinger scrobbler sdl seccomp secure-delete server sesame2 session sftp sha512 shared-dricore shared-glapi shm shout silc slit smi smime smp sna snappy sndfile socks5 speex spell spice sqlite srt sse sse2 sse3 sse4 sse4_1 sse4_2 ssh ssl ssp ssse3 stars startup-notification stats stream subversion svg swscale system-cairo system-icu system-jpeg system-libvpx system-sqlite tcpd texteffect theora threads threadsafe tiff timidity tk tls toolbar tools tordns traceroute transcode transparent-proxy trayicon tremor truetype twolame udev udisks unicode unlock-notify upower usb userlocales utempter utils uxa v4l vaapi vcd vcdimager vdpau video virtuoso vorbis wallpapers wav wavpack weather webdav-neon webgl webkit webm webp widgets wifi wma wmf wmp x264 xa xanim xattr xcb xcomposite xfs xinerama xlib-xcb xml xmp xorg xpdf-headers xpm xprint xtf xtpax xv xvfb xvid xvmc zip 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="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en de de_DE" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21 ruby20" SANE_BACKENDS="hp5400 canon canon630u canon_dr" USERLAND="GNU" VIDEO_CARDS="intel 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"
USE_PYTHON="2.7"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

btw. i use eudev;
[ebuild   R    ] sys-fs/eudev-3.1.5::gentoo  USE="hwdb kmod static-libs -introspection -rule-generator (-selinux) {-test}" ABI_X86="(64) -32 (-x32)" 0 KiB
Comment 1 Michael Palimaka (kensington) gentoo-dev 2015-12-06 17:10:23 UTC
Please also attach the full build log.
Comment 2 Herbert Wantesh 2015-12-06 19:56:07 UTC
Created attachment 418680 [details]
build log
Comment 3 Christian Hagau 2015-12-17 23:11:36 UTC
Created attachment 419540 [details, diff]
add libm linker flags

add libm linker flags
Comment 4 Conrad Kostecki gentoo-dev 2015-12-23 14:38:04 UTC
(In reply to Christian Hagau from comment #3)
> Created attachment 419540 [details, diff] [details, diff]
> add libm linker flags
> 
> add libm linker flags

Thanks! That worked for me.
Comment 5 Martin von Gagern 2016-01-09 19:14:46 UTC
Thanks. Static build is officially supported upstream, right? Has someone reported this upstream already? So far I haven't even found an upstream bug tracker, so writing to one of the mailing lists might be the most appropriate way to report this.
Comment 6 Austin S. Hemmelgarn 2016-01-11 12:17:53 UTC
(In reply to Martin von Gagern from comment #5)
> Thanks. Static build is officially supported upstream, right? Has someone
> reported this upstream already? So far I haven't even found an upstream bug
> tracker, so writing to one of the mailing lists might be the most
> appropriate way to report this.

I'm pretty certain that it is supported upstream (there's an option in configure to build it that way, so if they don't support it, they've got a lot to do to properly indicate it).
Comment 7 Christian Hagau 2016-01-19 13:52:30 UTC
LVM2.2.02.139 fixes this upstream.
I have requested a version bump already, see #572352 for the necessary fixed lvm2-2.02.129-dynamic-static-ldflags.patch.
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2016-03-20 14:41:54 UTC
This is fixed in the tree and no stable version has this issue.