Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Aug 2020 15:42:12 +0200
From:      "O. Hartmann" <ohartmann@walstatt.org>
To:        freebsd-current <freebsd-current@freebsd.org>
Subject:   ld: error: duplicate symbol:
Message-ID:  <20200817154208.42d25b89@freyja>

next in thread | raw e-mail | index | archive | help
On CURRENT 9not necessarily most recent with LLVM11, but since noon of tod=
ay it
is FreeBSD 13.0-CURRENT #15 r364297: Mon Aug 17 14:39:06 CEST 2020 amd64) =
I'm
faced with some very sticky and nasty micompilations in several essential
ports, for instance

ports-mgmt/pkg
devel/libunwind
devel/binutils

In most cases somewhere in the (parallel) build the process fails with the=
 error

ld: error: duplicate symbol: xxxxxxxx

As a result, several ports or even the rebuild of the whole installed port=
s
fail to compile/recompile.

Compiling port devel/binutils, for example, fails with this error message =
from
linker:

[...]
cc -DHAVE_CONFIG_H -I.  -I. -I./../include -I./../elfcpp
-DLOCALEDIR=3D"\"/usr/local/share/locale\"" -DBINDIR=3D"\"/usr/local/bin\"=
"
-DTOOLBINDIR=3D"\"/usr/local/x86_64-portbld-freebsd13.0/bin\""
-DTOOLLIBDIR=3D"\"/usr/local/x86_64-portbld-freebsd13.0/lib\""  -isystem
/usr/local/include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wsha=
dow
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -frandom-seed=3Dmremap.o  -pt=
hread -O2
-pipe  -fstack-protector-strong -isystem /usr/local/include
-fno-strict-aliasing  -MT mremap.o -MD -MP -MF .deps/mremap.Tpo -c -o mrem=
ap.o
mremap.c mv -f .deps/yyscript.Tpo .deps/yyscript.Po

libtool: link: cc -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -O2 -pipe
-fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing
-fstack-protector-strong -o coffdump coffdump.o coffgrok.o bucomm.o versio=
n.o
filemode.o /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib
../bfd/.libs/libbfd.a -L/usr/local/lib -lz ../libiberty/libiberty.a mv -f
.deps/mremap.Tpo .deps/mremap.Po

ld: error: duplicate symbol: program_name
>>> defined at coffdump.c
>>>            coffdump.o:(program_name)
>>> defined at bucomm.c
>>>            bucomm.o:(.bss+0x0)

What is going wrong here?

Thanks in advance

oh



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200817154208.42d25b89>