Summary: | sys-fs/xfsprogs-4.7.0 with sys-devel/binutils-2.25.1 - init.o: undefined reference to symbol 'progname' / libxfs.so.0: error adding symbols: DSO missing from command line | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Thomas Deutschmann (RETIRED) <whissi> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | eva, gentoo-bugs, hydrapolic, laine.gholson, Martin.vGagern, ntpt, om, tom, uzytkownik2 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 595288 | ||
Bug Blocks: | |||
Attachments: |
build.log
Content of libxfs/.libs/ and io/*.o as requested makefile.patch |
Description
Thomas Deutschmann (RETIRED)
![]() 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 |