[OpenAFS-devel] Build fails with gcc 9.1.1

Harald Barth haba@kth.se
Fri, 26 Jul 2019 11:56:36 +0200 (CEST)


> /bin/sh ../../libtool --quiet --mode=link --tag=CC gcc -static   -L/home/abuild/rpmbuild/BUILD/openafs-1.8.3/lib -L/home/abuild/rpmbuild/BUILD/openafs-1.8.3/lib  -O   -O2 -Wall  -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -flto=4 -fno-strict-aliasing -fPIC  -O   -I/home/abuild/rpmbuild/BUILD/openafs-1.8.3/src/config -I/home/abuild/rpmbuild/BUILD/openafs-1.8.3/include -I. -I.     -pthread -D_REENTRANT -DAFS_PTHREAD_ENV  -o pt_util pt_util.o ptutils.o ptubik.o utils.o map.o \
>         ../../src/ptserver/liboafs_prot.la ../../src/ubik/liboafs_ubik.la ../../src/sys/liboafs_sys.la ../../src/rx/liboafs_rx.la ../../src/rxstat/liboafs_rxstat.la ../../src/lwp/liboafs_lwpcompat.la ../../src/rxkad/liboafs_rxkad.la ../../src/cmd/liboafs_cmd.la ../../src/util/liboafs_util.la ../../src/opr/liboafs_opr.la -lafshcrypto -lrokenafs -lpthread -lresolv  
> lto1: fatal error: multiple prevailing defs for 'ubik_SetServerSecurityProcs'

The linker complains about multiple ubik_SetServerSecurityProcs
definitions among what it should use to link together pt_util.

So one needs to look at all the objetcs and see if there actually are multiple definitions.
If there are multiples all but one should be removed. 

And there is a related bug where there might be multiple definitions but these are not used and
the the linker should just ignore that (because in that case it does not matter).
https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg579310.html

That's my 5c idea.

Harald.