Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617756 - sys-fs/lvm2-2.02.171::gentoo failed (compile phase): undefined reference to `nearbyint'
Summary: sys-fs/lvm2-2.02.171::gentoo failed (compile phase): undefined reference to `...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
: 648556 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-07 18:35 UTC by Conrad Kostecki
Modified: 2018-05-19 21:31 UTC (History)
4 users (show)

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


Attachments
emerge -pqv, emerge --info, and build.log (ryper_output.txt,60.54 KB, text/plain)
2017-05-12 18:24 UTC, rypervenche
Details
Proposed fix (fix_libmath.patch,525 bytes, patch)
2017-05-21 10:27 UTC, Philippe Valembois
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2017-05-07 18:35:23 UTC
x86_64-pc-linux-gnu-gcc -march=native -mfpmath=sse,387 -mtune=intel -O2 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fPIC -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now -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+0x1ad9): 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/6.3.0/../../../../lib64/libudev.a(util.o): In function `get_group_creds':
(.text+0x22b1): 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/6.3.0/../../../../lib64/libudev.a(util.o): In function `get_group_creds':
(.text+0x2312): 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/6.3.0/../../../../lib64/libudev.a(util.o): In function `get_user_creds':
(.text+0x21db): 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/6.3.0/../../../../lib64/libudev.a(util.o): In function `get_user_creds':
(.text+0x2113): 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-string.o): In function `dm_size_to_string':
libdm-string.c:(.text+0x11ae): undefined reference to `nearbyint'
libdm-string.c:(.text+0x11c3): undefined reference to `trunc'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [Makefile:70: dmeventd.static] Fehler 1
make[2]: Verzeichnis „/var/tmp/portage/sys-fs/lvm2-2.02.171/work/LVM2.2.02.171/daemons/dmeventd“ wird verlassen
make[1]: *** [../make.tmpl:335: dmeventd.device-mapper] Fehler 2
make[1]: Verzeichnis „/var/tmp/portage/sys-fs/lvm2-2.02.171/work/LVM2.2.02.171/daemons“ wird verlassen
make: *** [make.tmpl:335: daemons.device-mapper] Fehler 2
make: *** Es wird auf noch nicht beendete Prozesse gewartet....
x86_64-pc-linux-gnu-gcc -march=native -mfpmath=sse,387 -mtune=intel -O2 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fPIC -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now -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 -march=native -mfpmath=sse,387 -mtune=intel -O2 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fPIC -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now -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 -lm -lpthread  -ludev -lblkid -luuid -lpthread -lrt
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../lib64/libudev.a(util.o): In function `get_group_creds':
(.text+0x22b1): 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/6.3.0/../../../../lib64/libudev.a(util.o): In function `get_group_creds':
(.text+0x2312): 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/6.3.0/../../../../lib64/libudev.a(util.o): In function `get_user_creds':
(.text+0x21db): 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/6.3.0/../../../../lib64/libudev.a(util.o): In function `get_user_creds':
(.text+0x2113): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
make[1]: Verzeichnis „/var/tmp/portage/sys-fs/lvm2-2.02.171/work/LVM2.2.02.171/tools“ wird verlassen
 * ERROR: sys-fs/lvm2-2.02.171::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-fs/lvm2-2.02.171::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-fs/lvm2-2.02.171::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-fs/lvm2-2.02.171/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-fs/lvm2-2.02.171/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-fs/lvm2-2.02.171/work/LVM2.2.02.171'
 * S: '/var/tmp/portage/sys-fs/lvm2-2.02.171/work/LVM2.2.02.171'
Comment 1 Conrad Kostecki gentoo-dev 2017-05-07 18:35:29 UTC
Portage 2.3.5 (python 3.5.3-final-0, default/linux/amd64/13.0, gcc-6.3.0, glibc-2.24-r1, 4.11.0-gentoo x86_64)
=================================================================
System uname: Linux-4.11.0-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_C2758_@_2.40GHz-with-gentoo-2.3
KiB Swap:   36700156 total,  36700156 free
Timestamp of repository gentoo: Sun, 07 May 2017 12:15:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo, 3.5.3::gentoo, 3.6.1-r1::gentoo
dev-util/ccache:          3.3.4::gentoo
dev-util/cmake:           3.8.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.25::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes

galactica
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/gnupg/qualified.txt /var/lib/fhem /var/lib/pyload /var/lib/slimserver/prefs /var/lib/unifi/data/system.properties"
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/cgi-php7.1/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.halifax.rwth-aachen.de/gentoo/"
INSTALL_MASK="/etc/xinetd.d/* /usr/lib/systemd/system/*"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now"
MAKEOPTS="-j9 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_BUNZIP2_COMMAND="pbunzip2"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
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 aac acl alsa amd64 berkdb bzip2 cairo caps cddb cgi cjk cracklib crypt ctype curl cvs cxx dbus dga djvu encode exif ffmpeg flite fontconfig ftp gd gif git gmp gnutls gpm graphviz hddtemp iconv icu idn imlib inotify introspection ipv6 javascript jbig jit jpeg jpeg2k lcms libcaca libnotify libsamplerate lm_sensors lzma lzo maildir mbox mhash mikmod mime mmap modplug mp3 mysql mysqli ncurses nls nntp nptl offensive ogg openal opencl opengl openmp orc oss pam pcre pdf perl png policykit posix postproc postscript pulseaudio python raw readline samba seccomp session simplexml slang sndfile sockets spell sqlite ssl subversion suid svg symlink syslog tcpd theora threads tiff truetype udev unicode usb vaapi vdpau vhosts vim-syntax vorbis wavpack webp wmf x264 xattr xcb xft xml xmp xpm xvid zeroconf zlib zsh-completion" ABI_X86="32 64" COLLECTD_PLUGINS="apcups cgroups conntrack contextswitch cpu cpusleep df disk dns entropy ethstat exec filecount hddtemp interface ipc ipmi irq load lvm md memory mysql netlink nfs nginx ntpd openvpn ping processes protocols rrdcached sensors serial smart swap syslog tcpconns thermal unixsock uptime users" CPU_FLAGS_X86="aes mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2" CURL_SSL="openssl" ELIBC="glibc" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LCD_DEVICES="crystalfontz lcd2usb" LINGUAS="de de_DE" NGINX_MODULES_HTTP="access auth_basic autoindex charset fancyindex fastcgi geo geoip gunzip gzip proxy realip rewrite stub_status upstream_keepalive" NGINX_MODULES_STREAM="access geo geoip realip ssl_preread" PHP_TARGETS="php7-1" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6" USERLAND="GNU" VIDEO_CARDS="ast fbdev"
USE_PYTHON="2.7 3.4 3.5 3.6"
Unset:  CC, CPPFLAGS, CTARGET, CXX
Comment 2 rypervenche 2017-05-12 18:24:01 UTC
Created attachment 472442 [details]
emerge -pqv, emerge --info, and build.log

I am also experiencing this build error. I have attached my emerge -pqv lvm2, emerge --info, and build.log as an attachment.
Comment 3 Philippe Valembois 2017-05-21 10:27:40 UTC
Created attachment 473616 [details, diff]
Proposed fix

I attach the patch which fixes the issue.
The problem is because libm is not linked with the static binary for libdevmapper.
Comment 4 Conrad Kostecki gentoo-dev 2017-05-21 10:32:36 UTC
(In reply to Philippe Valembois from comment #3)
> Created attachment 473616 [details, diff] [details, diff]
> Proposed fix
> 
> I attach the patch which fixes the issue.
> The problem is because libm is not linked with the static binary for
> libdevmapper.

Thanks!
Worked for me. I was able to compile LVM2.
Comment 5 Larry the Git Cow gentoo-dev 2018-05-08 17:11:41 UTC
The bug has been closed via the following commit(s):

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

commit da222eb668e9d0743688b0bd1608fd0824b1b8b1
Author:     Conrad Kostecki <conrad@kostecki.com>
AuthorDate: 2018-05-05 00:35:07 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2018-05-08 17:11:05 +0000

    sys-fs/lvm2-2.02.17{1,2,3}: Fix static build
    
    Closes: https://bugs.gentoo.org/617756
    Package-Manager: Portage-2.3.35, Repoman-2.3.9
    (cherry picked from commit 0d57a354c5b3ab9db2b8e2ea6adbdad2dd6a1c03)
    Closes: https://github.com/gentoo/gentoo/pull/8265
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch | 13 +++++++++++++
 sys-fs/lvm2/lvm2-2.02.171.ebuild                  |  3 ++-
 sys-fs/lvm2/lvm2-2.02.172.ebuild                  |  3 ++-
 sys-fs/lvm2/lvm2-2.02.173.ebuild                  |  3 ++-
 4 files changed, 19 insertions(+), 3 deletions(-)
Comment 6 Rolf Eike Beer archtester 2018-05-14 17:48:43 UTC
 * Applying lvm2-2.02.171-static-libm.patch ...
1 out of 1 hunk FAILED -- saving rejects to file make.tmpl.in.rej [ !! ]
 * ERROR: sys-fs/lvm2-2.02.171::gentoo failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/sys-fs/lvm2-2.02.171/files/lvm2-2.02.171-static-libm.patch

 * Applying lvm2-2.02.171-static-libm.patch ...
1 out of 1 hunk FAILED -- saving rejects to file make.tmpl.in.rej [ !! ]
 * ERROR: sys-fs/lvm2-2.02.172::gentoo failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/sys-fs/lvm2-2.02.172/files/lvm2-2.02.171-static-libm.patch

 * Applying lvm2-2.02.171-static-libm.patch ...
1 out of 1 hunk FAILED -- saving rejects to file make.tmpl.in.rej [ !! ]
 * ERROR: sys-fs/lvm2-2.02.173::gentoo failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/sys-fs/lvm2-2.02.173/files/lvm2-2.02.171-static-libm.patch
Comment 7 Rolf Eike Beer archtester 2018-05-14 17:49:01 UTC
*** Bug 648556 has been marked as a duplicate of this bug. ***
Comment 8 Larry the Git Cow gentoo-dev 2018-05-19 21:31:12 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b91ec9ce59ba715f29b61cb384d1585d48fddc2

commit 1b91ec9ce59ba715f29b61cb384d1585d48fddc2
Author:     Conrad Kostecki <conrad@kostecki.com>
AuthorDate: 2018-05-14 20:58:30 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2018-05-19 21:30:41 +0000

    sys-fs/lvm2: Fix correct order for applying patches
    
    Closes: https://bugs.gentoo.org/617756
    Package-Manager: Portage-2.3.36, Repoman-2.3.9
    (cherry picked from commit 8e74564c314c390f347bb6b2b5e83d448bf2735d)
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/8402

 sys-fs/lvm2/lvm2-2.02.171.ebuild | 2 +-
 sys-fs/lvm2/lvm2-2.02.172.ebuild | 2 +-
 sys-fs/lvm2/lvm2-2.02.173.ebuild | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)