Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646284 - net-ftp/lftp - ld.gold: warning: skipping incompatible /usr/lib/libutil.so while searching for util
Summary: net-ftp/lftp - ld.gold: warning: skipping incompatible /usr/lib/libutil.so wh...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-01 09:39 UTC by Xuefer
Modified: 2018-02-26 09:27 UTC (History)
2 users (show)

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


Attachments
4.7.5 build.log (build.log,430.71 KB, text/plain)
2018-02-03 12:01 UTC, Xuefer
Details
config.log.xz (config.log.xz,31.58 KB, application/x-xz)
2018-02-05 07:37 UTC, Xuefer
Details
build.log.gz (build.log.gz,17.94 KB, application/gzip)
2018-02-24 10:25 UTC, Xuefer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xuefer 2018-02-01 09:39:47 UTC
It seems lftp is linking to /usr/lib not /usr/lib64 after unsymlink-lib

Reproducible: Always

Steps to Reproduce:
1. follow the steps of unsymlink-lib in news
2. emerge -1 lftp

Actual Results:  
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld.gold: warning: skipping incompatible /usr/lib/libutil.so while searching for util


Expected Results:  
build success, link with /usr/lib64/libutil.so instead
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-03 09:34:46 UTC
Please post your `emerge --info` output in a comment.
Please attach the entire build log to this bug report.
Comment 2 Xuefer 2018-02-03 11:17:46 UTC
Thanks

Portage 2.3.19 (python 2.7.14-final-0, default/linux/amd64/17.1, gcc-6.4.0, glibc-2.25-r9, 4.14.15-gentoo x86_64)
=================================================================
System uname: Linux-4.14.15-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E3-1230_V2_@_3.30GHz-with-gentoo-2.4.1
KiB Mem:    10195960 total,    307224 free
KiB Swap:   15353832 total,  15353832 free
Timestamp of repository gentoo: Sun, 28 Jan 2018 02:45:01 +0000
Head commit of repository gentoo: aaad91ed7cc052c556eb2b097a89659dc67e0f62
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
ccache version 3.2.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo, 3.6.3-r1::gentoo
dev-util/ccache:          3.2.4::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.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:


gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://mirrors.163.com/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:  --exclude-from=/etc/portage/rsync_excludes --progress

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-O2 -pipe -pipe -O2 -march=ivybridge -Wno-error=varargs -Wno-error=parentheses-equality -flto=thin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /var/qmail/alias /var/qmail/control"
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.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXX="clang++"
CXXFLAGS="-O2 -pipe -Wno-error=varargs -Wno-error=parentheses-equality -flto=thin"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch prelink-checksums 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://mirrors.163.com/gentoo/ #http://mirrors.sohu.com/gentoo/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--enable-new-dtags -Wl,--sort-common -Wl,-O2 -Wl,--as-needed -flto=thin -fuse-ld=gold"
MAKEOPTS=" -j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS=" --exclude-from=/etc/portage/rsync_excludes --progress"
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="/usr/src/portage"
USE="# acc acl aiglx alsa amd64 apache ares avi bash-completion berkdb bitmap-fonts bittorrent bzip2 cgi cjk cli crypt cscope curl cxx dbus enscript expat extensions fam fastcgi fbcon fontconfig fpm gba gd gdbm glib gpm headless-awt i18n icedtea iconv idn imap ipv6 javascript jikes jpeg libssh2 maildir modules mp mp3 mpeg multilib multislot mysqli ncurses nds nethack nls nodejs nptl nptlonly nvidia ogg openmp pam patch pcre pdo perlsuid php png python quicktime readline real rrdcgi sdk seccomp sed server silvercity soap sockets spamassassin sqlite ssl subversion suid svg sync-plugin-portage tcpd termcap-compat threads tinfo toolbar transmitter truetype unicode urandom utf-8 utf8 vim-pager vim-syntax webdav-neon win32codecs withsamplescripts wma xattr xcomposite xml xml2 zlib" ABI_X86="64" ALSA_CARDS="ens1371" APACHE2_MODULES="actions alias auth_basic authn_core authn_file authz_core authz_host unixd socache_shmcb autoindex dav dir env expires headers info log_config mime setenvif status" APACHE2_MPMS="event" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes mabm mcx16 mlzcnt msahf popcnt sse4.1 sse4.2" 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="coreboot efi-64 pc multiboot" INPUT_DEVICES="keyboard mouse joystick" KERNEL="linux" L10N="en-US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="serial" LLVM_TARGETS="X86 ARM AArch64" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="vmware fbdev vesa vga nvidia" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-03 11:23:52 UTC
(In reply to Jeroen Roovers from comment #1)
> Please attach the entire build log to this bug report.
Comment 4 Xuefer 2018-02-03 12:01:44 UTC
Created attachment 517652 [details]
4.7.5 build.log
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-05 06:48:59 UTC
Could you try again, please?

commit de4471051ee82f38df604ce9507bc06ab4dc788e
Author: Jeroen Roovers <jer@gentoo.org>
Date:   Sat Feb 3 12:37:39 2018 +0100

    net-ftp/lftp: Pass --libdir to econf (maybe bug #646284).

    Package-Manager: Portage-2.3.20, Repoman-2.3.6
Comment 6 Xuefer 2018-02-05 07:35:57 UTC
nope, still reproduced
i'm sure it's up to date by finding libdir in ebuild
Comment 7 Xuefer 2018-02-05 07:37:33 UTC
Created attachment 517840 [details]
config.log.xz

it seems /usr/lib is hardcoded into libtool.m4
Comment 8 Alexander Tsoy 2018-02-05 08:30:06 UTC
(In reply to Jeroen Roovers from comment #5)
> Could you try again, please?
> 
> commit de4471051ee82f38df604ce9507bc06ab4dc788e
> Author: Jeroen Roovers <jer@gentoo.org>
> Date:   Sat Feb 3 12:37:39 2018 +0100
> 
>     net-ftp/lftp: Pass --libdir to econf (maybe bug #646284).
> 
>     Package-Manager: Portage-2.3.20, Repoman-2.3.6
--libdir=/usr/lib64 is already added to configure args by econf. See build log. The actual error is:
/usr/src/portage/portage/net-ftp/lftp-4.7.5/work/lftp-4.7.5/src/.libs/liblftp-tasks.so: error: undefined reference to '__muloti4'
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)

So this bug is probably caused by clang or gold linker.
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-05 10:00:35 UTC
(In reply to Alexander Tsoy from comment #8)
> (In reply to Jeroen Roovers from comment #5)
> > Could you try again, please?
> > 
> > commit de4471051ee82f38df604ce9507bc06ab4dc788e
> > Author: Jeroen Roovers <jer@gentoo.org>
> > Date:   Sat Feb 3 12:37:39 2018 +0100
> > 
> >     net-ftp/lftp: Pass --libdir to econf (maybe bug #646284).
> > 
> >     Package-Manager: Portage-2.3.20, Repoman-2.3.6
> --libdir=/usr/lib64 is already added to configure args by econf. See build
> log. The actual error is:
> /usr/src/portage/portage/net-ftp/lftp-4.7.5/work/lftp-4.7.5/src/.libs/
> liblftp-tasks.so: error: undefined reference to '__muloti4'
> clang-5.0: error: linker command failed with exit code 1 (use -v to see
> invocation)
> 
> So this bug is probably caused by clang or gold linker.

That would be a different bug.
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-05 10:03:04 UTC
(In reply to Xuefer from comment #2)

> FEATURES="assume-digests binpkg-logs buildpkg ccache
> config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync
> multilib-strict news parallel-fetch prelink-checksums preserve-libs
> protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs
> unmerge-orphans userfetch userpriv usersandbox usersync xattr"

Did you try with FEATURES=-ccache?
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-05 10:03:13 UTC
Comment on attachment 517840 [details]
config.log.xz

READLINE_LDFLAGS='-L/usr/lib'
Comment 12 Xuefer 2018-02-05 10:30:37 UTC
> Did you try with FEATURES=-ccache?

I just did, same as in config.log
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-05 15:02:27 UTC
commit cee0bfb56f78270a1a4deaf8de03c8afb428d6a9 (HEAD -> master, origin/master, origin/HEAD)
Author: Jeroen Roovers <jer@gentoo.org>
Date:   Mon Feb 5 15:59:59 2018 +0100

    net-ftp/lftp: Remove all LDFLAGS=.*-L.*\/lib (bug #646284).

Could you try again, please?
Comment 14 Xuefer 2018-02-24 09:29:17 UTC
(In reply to Jeroen Roovers from comment #13)
> commit cee0bfb56f78270a1a4deaf8de03c8afb428d6a9 (HEAD -> master,
> origin/master, origin/HEAD)
> Author: Jeroen Roovers <jer@gentoo.org>
> Date:   Mon Feb 5 15:59:59 2018 +0100
> 
>     net-ftp/lftp: Remove all LDFLAGS=.*-L.*\/lib (bug #646284).
> 
> Could you try again, please?

yes but failed
/bin/sh ../libtool --silent  --tag=CXX   --mode=link g++  -O2 -pipe -fno-lto -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -module -avoid-version -rpath /usr/lib64/lftp/4.7.5 -Wl,-O1 -Wl,--as-needed -Wl,--enable-new-dtags -Wl,--sort-common -fno-lto -o cmd-sleep.la -rpath /usr/lib64/lftp/4.7.5 SleepJob.lo  -lutil -ltinfo -ldl  -lidn
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/lib/libz.a: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1890: liblftp-network.la] Error 1
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-24 10:20:13 UTC
(In reply to Xuefer from comment #14)
> yes but failed

You're compiling cmd-sleep.la here:

> /bin/sh ../libtool --silent  --tag=CXX   --mode=link g++  -O2 -pipe -fno-lto
> -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti
> -fno-implement-inlines -module -avoid-version -rpath /usr/lib64/lftp/4.7.5
> -Wl,-O1 -Wl,--as-needed -Wl,--enable-new-dtags -Wl,--sort-common -fno-lto -o
> cmd-sleep.la -rpath /usr/lib64/lftp/4.7.5 SleepJob.lo  -lutil -ltinfo -ldl 
> -lidn

But this error message is from linking liblftp-network.la:

> /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/
> ld: skipping incompatible /usr/lib/libz.so when searching for -lz
> /usr/lib/libz.a: error adding symbols: File format not recognized
> collect2: error: ld returned 1 exit status
> make[2]: *** [Makefile:1890: liblftp-network.la] Error 1

Why don't you attach the *entire* build log to this bug report?
Comment 16 Xuefer 2018-02-24 10:25:17 UTC
Created attachment 520872 [details]
build.log.gz
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-24 12:01:54 UTC
Looks like I left a ZLIB_LDFLAGS lingering in configure.ac for 4.7.5.
Comment 18 Jeroen Roovers (RETIRED) gentoo-dev 2018-02-24 12:14:19 UTC
OK, please try again.

commit d1b0eb928ded4867cbed2d25effca4a52bc37922
Author: Jeroen Roovers <jer@gentoo.org>
Date:   Sat Feb 24 13:13:23 2018 +0100

    net-ftp/lftp: Remove ZLIB_LDFLAGS from configure.ac (bug #646284 by Xuefer).

    Package-Manager: Portage-2.3.24, Repoman-2.3.6
Comment 19 Xuefer 2018-02-26 09:27:03 UTC
looks good. it's fixed