NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/52674: missing symbol xstrerror

>Number:         52674
>Category:       lib
>Synopsis: missing symbol xstrerror
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 30 02:50:00 +0000 2017
>Originator:     Kamil Rytarowski
>Release:        NetBSD 8.99.5 amd64
NetBSD chieftec 8.99.5 NetBSD 8.99.5 (GENERIC) #1: Fri Oct 27 18:16:18 CEST 2017  root@chieftec:/public/netbsd-root/sys/arch/amd64/compile/GENERIC amd64
GCC passes in the linker invocation (part of "gcc -v file.c"):

 ld -plugin /usr/libexec/ -plugin-opt=/usr/libexec/lto-wrapper -plugin-opt=-fresolution=/var/tmp//ccxda9Ar.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --eh-frame-hdr -dc -dp -e _start -dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crti.o /usr/lib/crtbegin.o /var/tmp//cc7A7mOK.o --as-needed -lgcc_s --no-as-needed -lgcc -lc --as-needed -lgcc_s --no-as-needed -lgcc /usr/lib/crtend.o /usr/lib/crtn.o

When attempting to use GNU GOLD, cannot be used because it has missing symbol xstrerror:

ld: error: /usr/libexec/ could not load plugin library: /usr/libexec/ Undefined PLT symbol "xstrerror" (symnum = 38)

From code and sources inspection, shall be linked with libiberty (-liberty), a utility GNU library for internal usage with helping functions.

liberty.a is already linked with for tools.:

$ nm /public/netbsd-root/tooldir.NetBSD-8.99.4-amd64/libexec/gcc/x86_64--netbsd/5.4.0/|grep xstr
000000000000c8e7 T xstrdup
000000000000c921 T xstrerror
0000000000210960 b xstrerror_buf

$ nm /usr/libexec/|grep xstr
                 U xstrerror

Verified to work:

Index: Makefile
RCS file: /cvsroot/src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile    23 Jul 2017 01:12:06 -0000      1.3
+++ Makefile    30 Oct 2017 02:38:19 -0000
@@ -31,6 +31,10 @@
+LIBIBERTYDIR!= cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR}
+LDADD+=                -L${LIBIBERTYDIR} -liberty
+DPADD+=                ${LIBIBERTYDIR}/libiberty.a
 # Yuck, we have to run configure to generate this one...
 CLEANFILES+=   config.h

If this is the proper solution, it should be backported to -8 and to gcc/ (HEAD uses gcc.old/ on NetBSD/amd64).

Home | Main Index | Thread Index | Old Index