Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 736866 - app-pda/libplist-2.2.0-r2 - ../src/.libs/libplist-2.0.so: error: undefined reference to 'fmin'
Summary: app-pda/libplist-2.2.0-r2 - ../src/.libs/libplist-2.0.so: error: undefined re...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-12 10:47 UTC by Fabio Coatti
Modified: 2020-08-13 12:19 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,40.86 KB, text/plain)
2020-08-12 10:49 UTC, Fabio Coatti
Details
config.log (config.log,50.13 KB, text/plain)
2020-08-13 08:19 UTC, Fabio Coatti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Coatti 2020-08-12 10:47:51 UTC
While emerging app-pda/libplist-2.2.0-r2 I get the following error:
libtool: link: x86_64-pc-linux-gnu-gcc -Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden -pthread -I/var/tmp/portage/app-pda/libplist-2.2.0-r2/work/libplist-2.2.0/include -O2 -pipe -O2 -pipe -o .libs/plistutil plistutil.o  -Wl,--as-needed ../src/.libs/libplist-2.0.so -lpthread -pthread
../src/.libs/libplist-2.0.so: error: undefined reference to 'fmin'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:423: plistutil] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-pda/libplist-2.2.0-r2/work/libplist-2.2.0_build/tools'
make[1]: *** [Makefile:442: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-pda/libplist-2.2.0-r2/work/libplist-2.2.0_build'
make: *** [Makefile:372: all] Error 2
 * ERROR: app-pda/libplist-2.2.0-r2::gentoo failed (compile phase):
 *   emake failed


Reproducible: Always




Tested with 
CFLAGS="-O2 -pipe" 
CXXFLAGS="${CFLAGS}"                                                            
LDFLAGS="-Wl,--as-needed -O2 -pipe"

and also LTO enabled. No changes.

Portage 3.0.2 (python 3.7.8-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-10.2.0, glibc-2.31-r6, 5.7.10-cova x86_64)
=================================================================
System uname: Linux-5.7.10-cova-x86_64-Intel-R-_Core-TM-_i7-6820HQ_CPU_@_2.70GHz-with-gentoo-2.7
KiB Mem:    65747988 total,  37885772 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Wed, 12 Aug 2020 06:05:54 +0000
Head commit of repository gentoo: 6c58037633050e323d6afa9fd569badaf5361f1f

sh bash 5.0_p18
ld GNU gold (Gentoo 2.34 p6 2.34.0) 1.16
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3-r1::gentoo
dev-lang/python:          2.7.18-r1::gentoo, 3.6.11-r2::gentoo, 3.7.8-r2::gentoo, 3.8.5::gentoo, 3.9.0_beta5::gentoo
dev-util/cmake:           3.18.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.2::gentoo
sys-devel/binutils:       2.34-r2::gentoo
sys-devel/gcc:            7.5.0-r1::gentoo, 8.4.0-r1::gentoo, 9.3.0-r1::gentoo, 10.2.0::gentoo
sys-devel/gcc-config:     2.3.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.8::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r6::gentoo
Repositories:

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

kde
    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/kde.git
    masters: gentoo
    priority: 50

nvidia-docker-overlay
    location: /var/lib/layman/nvidia-docker-overlay
    sync-type: laymansync
    sync-uri: https://github.com/gronastech/nvidia-docker-overlay.git
    masters: gentoo
    priority: 50

local
    location: /usr/overlay
    masters: gentoo
    priority: 51

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/sddm/scripts/Xsetup"
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.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/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="-march=native -O3 -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="en_IE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -O3 -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="en it de"
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="3dnow 3dnowext 3dnowprefetch X \ a52 aac aalib acl acpi activities aim alsa amd64 apng appstream ares asf ati audio audiofile avahi bash-completion berkdb bidi bl bluetooth branding bri bzip2 cairo caps cdda cdr cjk cli crypt cups curl dba dbus declarative device-mapper dga divx divx4linux dri dts dv dvb dvd dvdr dvdread eap-sim edl egl emboss encode ethereal evdev exif expat faad fam fame fbcon ffmpeg fftw flac force-cgi-redirect fortran ftp gallium garmin gd gdbm gif gimp gmedia gmp gnutls gphoto2 gpm gps gsm gtk h264 h323 iconv icq icu idn ifp ilbc imagemagick imap innodb ipod iproute2 ipv6 ithreads jabber java javascript joystick jpeg kde kipi kontact kvm kwallet lastfm lcms ldap libglvnd libnotify libtirpc libvirtd live lm_sensors lua lvm lxc lzma lzo mad maildir matroska mbox mdnsresponder-compat mhash mime mjpeg mmap mmx mmxext mng mozdevelop mozilla mp3 mp4 mpeg msn mtp multilib mysql ncurses network networkmanager new-hpcups nfsv4 njb nls nptl nptlonly offensive ofx ogg oggvorbis ogm openal openexr opengl openmp oscar pam pango parted pcap pcre pdf phonon php plasma plotutils png policykit ppds pulseaudio qemu qml qt5 readline real rtc ruby samba sasl sdl seccomp semantic-desktop semantic-destkop sha512 sip slang slp smartcard sndfile snmp sox speex spell split-usr srt sse sse2 ssh ssl ssse3 startup-notification svg symlink systemd tcltk tcpd telepathy theora threads tiff tk touchpad tremor truetype udev udisks unicode upower usb utempter v4l v4l2 vaapi vcd vde vdpaum vhosts video videos vim-syntax virt-network virtualbox vorbis vulkan wav wayland widgets wifi wmf wmp wps wxwidgets wxwindows x264 xanim xattr xcb xface xft xine xinerama xml xosd xpm xscreensaver xsl xv xvid zeroconf zlib zpm" ABI_X86="64 32" ADA_TARGET="gnat_2018" 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="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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en it de en_IE" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7 python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby25 ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="i965 intel nvidia v4l" 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 1 Fabio Coatti 2020-08-12 10:49:12 UTC
Created attachment 654308 [details]
build.log
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-12 17:02:35 UTC
checking if fmin is a builtin function... yes

Why does it say that? Could you please attach the config.log, too?
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-12 17:06:09 UTC
(In reply to Fabio Coatti from comment #0)
> LDFLAGS="-Wl,--as-needed -O2 -pipe"

does not equal

> LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -O3 -fgraphite-identity
> -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin
> -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection
> -Wl,--as-needed -Wl,--hash-style=gnu"

but assuming you *also* tested with the former and saw the same failure, rendering my observation entirely beside the purpose of this bug report, I must say that those are the weirdest LDFLAGS I have ever seen.
Comment 4 Fabio Coatti 2020-08-13 05:25:35 UTC
(In reply to Jeroen Roovers from comment #3)
> (In reply to Fabio Coatti from comment #0)
> > LDFLAGS="-Wl,--as-needed -O2 -pipe"
> 
> does not equal
> 
> > LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -O3 -fgraphite-identity
> > -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin
> > -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection
> > -Wl,--as-needed -Wl,--hash-style=gnu"
> 
> but assuming you *also* tested with the former and saw the same failure,
> rendering my observation entirely beside the purpose of this bug report, I
> must say that those are the weirdest LDFLAGS I have ever seen.

Yep, I concur, I indeed like to play around with compilation flags.However, As you may see from the build log, in this case the compilation was done with rather common CFLAGS/LDFLAGS. It could be that this behavior is somehow triggered by other packages CFLAGS, but I fail to see how.
Anyway. While looking around I found this bug report, not sure if it can be related:

https://github.com/libimobiledevice/libplist/issues/157
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-13 07:44:51 UTC
(In reply to Fabio Coatti from comment #4)
> https://github.com/libimobiledevice/libplist/issues/157

Nobody attached their config.log there either:

(In reply to Jeroen Roovers from comment #2)
> checking if fmin is a builtin function... yes
> 
> Why does it say that? Could you please attach the config.log, too?
Comment 6 Larry the Git Cow gentoo-dev 2020-08-13 08:07:01 UTC
The bug has been referenced in the following commit(s):

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

commit 04014b1e2768aa4d0747c44b7a0c0b473f5a4e04
Author:     Jeroen Roovers <jer@gentoo.org>
AuthorDate: 2020-08-13 07:58:56 +0000
Commit:     Jeroen Roovers <jer@gentoo.org>
CommitDate: 2020-08-13 08:06:58 +0000

    app-pda/libplist: Simplify configure test for fmin
    
    https://github.com/libimobiledevice/libplist/pull/168
    
    Package-Manager: Portage-3.0.2, Repoman-2.3.23
    Bug: https://bugs.gentoo.org/736866
    Signed-off-by: Jeroen Roovers <jer@gentoo.org>

 app-pda/libplist/files/libplist-2.2.0-fmin.patch   | 34 ++++++++++++++++++++++
 .../files/libplist-2.2.0-pkgconfig-lib.patch       |  5 ++--
 app-pda/libplist/libplist-2.2.0-r2.ebuild          |  5 +++-
 3 files changed, 40 insertions(+), 4 deletions(-)
Comment 7 Fabio Coatti 2020-08-13 08:19:44 UTC
Created attachment 654420 [details]
config.log

And here is the config.log. Sorry for the delay :)
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-13 08:37:20 UTC
(In reply to Fabio Coatti from comment #7)
> Created attachment 654420 [details]
> config.log

configure:12869: checking if fmin is a builtin function
configure:12892: x86_64-pc-linux-gnu-gcc -o conftest -O0  -Wl,--as-needed -O2 -pipe conftest.c -lpthread  >&5
configure:12892: $? = 0
configure:12900: result: yes

For some reason I cannot fathom that "works" here but fails later on. I assume that upstream is using an incorrect combination of autoconf caching and AC_TRY_LINK (as well as LDFLAGS injection) here and have proposed a high level simplification upstream.

Can you try again with the latest changes announced in comment #6, please?
Comment 9 Fabio Coatti 2020-08-13 11:17:30 UTC
(In reply to Jeroen Roovers from comment #8)

> 
> For some reason I cannot fathom that "works" here but fails later on. I
> assume that upstream is using an incorrect combination of autoconf caching
> and AC_TRY_LINK (as well as LDFLAGS injection) here and have proposed a high
> level simplification upstream.
> 
> Can you try again with the latest changes announced in comment #6, please?

With those changes I can confirm that the compilation is successful, both with normal CFLAGS and "weird" ones, including LTO.
Comment 10 Fabio Coatti 2020-08-13 11:18:48 UTC
If you need some info (dunno, for reference) from config.log just let me know.
Anyway, many thanks for the real quick fix!