Created attachment 442880 [details] build.log =sys-fs/xfsprogs-4.7.0 doesn't build on all of my boxes: > [...] > [CC] readdir.o > x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -mtune=native -O2 -pipe -O2 -pipe -march=native -mtune=native -DNDEBUG -DVERSION=\"4.7.0\" -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -I../libxfs -DENABLE_GETTEXT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -DHAVE_MNTENT -DHAVE_FSETXATTR -DENABLE_BLKID -DHAVE_FADVISE -DHAVE_MADVISE -DHAVE_MINCORE -DHAVE_SENDFILE -DHAVE_FIEMAP -DHAVE_INJECT -DHAVE_RESBLKS -DHAVE_SYNC_FILE_RANGE -DHAVE_FALLOCATE -DHAVE_PREADV -DHAVE_PWRITEV -DHAVE_READDIR -DHAVE_MREMAP -c readdir.c > [LD] xfs_io > /bin/sh ../libtool --quiet --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -o xfs_io -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed init.o attr.o bmap.o file.o freeze.o fsync.o getrusage.o imap.o link.o mmap.o open.o parent.o pread.o prealloc.o pwrite.o seek.o shutdown.o sync.o truncate.o reflink.o fadvise.o madvise.o mincore.o sendfile.o fiemap.o inject.o resblks.o sync_file_range.o readdir.o ../libxcmd/libxcmd.la ../libhandle/libhandle.la -lreadline > /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: init.o: undefined reference to symbol 'progname' > /var/tmp/portage/sys-fs/xfsprogs-4.7.0/work/xfsprogs-4.7.0/libxfs/.libs/libxfs.so.0: error adding symbols: DSO missing from command line > 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:71: default] Error 2 > * ERROR: sys-fs/xfsprogs-4.7.0::gentoo failed (compile phase): > * emake failed # emerge --info Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r2, 4.4.15-gentoo x86_64) ================================================================= System uname: Linux-4.4.15-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-2670_v3_@_2.30GHz-with-gentoo-2.2 KiB Mem: 24691776 total, 4779744 free KiB Swap: 4194300 total, 4194296 free Timestamp of repository gentoo: Tue, 09 Aug 2016 19:15:01 +0000 sh bash 4.3_p46 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 app-shells/bash: 4.3_p46::gentoo dev-lang/perl: 5.24.0-r1::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo dev-util/cmake: 3.6.1::gentoo dev-util/pkgconfig: 0.29.1::gentoo sys-apps/baselayout: 2.2-r1::gentoo sys-apps/openrc: 0.21.3::gentoo sys-apps/sandbox: 2.10-r2::gentoo sys-devel/autoconf: 2.69-r2::gentoo sys-devel/automake: 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.25.1-r1::gentoo, 2.26.1::gentoo sys-devel/gcc: 5.4.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage/ priority: -1000 ABI="amd64" ABI_X86="64" ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" ACCEPT_PROPERTIES="*" ACCEPT_RESTRICT="*" ARCH="amd64" BOOTSTRAP_USE="cxx unicode internal-glib python_targets_python3_4 python_targets_python2_7 multilib" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -mtune=native" CFLAGS_amd64="-m64" CFLAGS_x32="-mx32" CFLAGS_x86="-m32" CHOST="x86_64-pc-linux-gnu" CHOST_amd64="x86_64-pc-linux-gnu" CHOST_x32="x86_64-pc-linux-gnux32" CHOST_x86="i686-pc-linux-gnu" CPU_FLAGS_X86="aes mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CXXFLAGS="-O2 -pipe -march=native -mtune=native" DEFAULT_ABI="amd64" EDITOR="/bin/nano" ELIBC="glibc" EPREFIX="" EROOT="/" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles merge-sync 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" GCC_SPECS="" GRUB_PLATFORMS="pc" GUILE_LOAD_PATH="/usr/share/guile/2.0" HOME="/root" IUSE_IMPLICIT="abi_x86_64 prefix prefix-guest" KERNEL="linux" L10N="en en-US de de-DE" LANG="en_US.UTF-8" LC_MESSAGES="C" LC_NUMERIC="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LDFLAGS_amd64="-m elf_x86_64" LDFLAGS_x32="-m elf32_x86_64" LDFLAGS_x86="-m elf_i386" LINGUAS="en de" LOGNAME="root" MANPAGER="manpager" MULTILIB_ABIS="amd64 x86" PAGER="/usr/bin/less" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0" PHP_TARGETS="php5-6" PWD="/root" PYTHONDONTWRITEBYTECODE="1" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" ROOT="/" ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0" RUBY_TARGETS="ruby20 ruby21" SHELL="/bin/bash" SSH_TTY="/dev/pts/0" SYMLINK_LIB="yes" TERM="screen" USER="root" USERLAND="GNU"
that's weird because progname is defined unconditionally in libxfs/init.c (which is linked into libxfs.so) and in io/init.c (which is linked into xfs_io). what binutils version are you using ? tar up & attach these files: tar cf - libxfs/.libs/ io/*.o | xz > objs.tar.xz
I have the same issue. root@caiman:/root(13)# qlist -Iv binutils sys-devel/binutils-2.25.1-r1 sys-devel/binutils-2.26.1 sys-devel/binutils-config-5-r2 sys-libs/binutils-libs-2.25.1-r2
root@caiman:/root(14)# eselect binutils list [1] x86_64-pc-linux-gnu-2.25.1 * [2] x86_64-pc-linux-gnu-2.26.1
After eselecting binutils-2.26.1 the issue disapeared.
(In reply to Juergen Rose from comment #4) > After eselecting binutils-2.26.1 the issue disapeared. I can confirm, that the problem disappeared for me as well after switching from binutils 2.25.1 to 2.26.1.
Created attachment 442916 [details] Content of libxfs/.libs/ and io/*.o as requested Attaching "libxfs/.libs/" and "io/*.o" as requested in comment 2. I am also using sys-devel/binutils-2.25.1-r1. When I switch to binutils-2.26.1 the build error will disappear as well.
This might be related to LDFLAGS=-Wl,--as-needed (see bug 129413 and https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed). Specifically the linker invocation in question appears to be this: /bin/sh ../libtool --quiet --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -o xfs_i o -Wl,--as-needed -Wl,--as-needed -Wl,--as-needed -Wl,--as-needed init.o attr.o bmap.o file.o freeze.o fsync.o getrusage.o imap.o link.o mmap.o open.o pa rent.o pread.o prealloc.o pwrite.o seek.o shutdown.o sync.o truncate.o reflink.o fadvise.o madvise.o mincore.o sendfile.o fiemap.o inject.o resblks.o copy_file_ range.o sync_file_range.o readdir.o ../libxcmd/libxcmd.la ../libhandle/libhand le.la -lreadline As you can see, init.o may contain the symbol, but as far as I understand things it will be used to satisfy undefined symbols only in the preceding objects, not in following ones. If this analysis is correct, I still don't know why more recent binutils fix this. I don't see a likely change in https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=ld/NEWS;hb=refs/tags/binutils-2_27.
I am interested in this as well as this is preventing me from bumping networkmanager-openvpn and gnome-todo. Using binutils 2.25.1 ld.gold seems to workaround the problem as well as using 2.26.1. My LDFLAGS are set to LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed,--hash-style=gnu"
@Thomas Deutschmann and does libxfs/.libs/libxfs.so.0 contain progname symbol? readelf -s /var/tmp/portage/sys-fs/xfsprogs-4.7.0/work/xfsprogs-4.7.0/libxfs/.libs/libxfs.so.0 gives that progname symbol is there, however i getting failure aswell.
> # readelf -s libxfs.so.0.0.0 | grep -i progna > 539: 000000000025adc8 8 OBJECT GLOBAL DEFAULT 22 progname > 474: 000000000025adc8 8 OBJECT GLOBAL DEFAULT 22 progname BTW: I tested on Debian 8 as well which has binutils-2.25 but it isn't failing there. If someone wants to test their patch set...
This problem resolved for me when I when I used eselect to choose the most recent binutils: > localhost # eselect binutils list > [1] x86_64-pc-linux-gnu-2.25.1 > [2] x86_64-pc-linux-gnu-2.26.1 *
*** Bug 600054 has been marked as a duplicate of this bug. ***
Created attachment 454946 [details, diff] makefile.patch this makefile patch worked for me the problem is that libxfs isn't being explicitly linked in
binutils-2.26 is stable now, so i don't think we'll bother looking into this anymore