HomeFreeBSD

lang/perl5*: work around duplicate symbol errors with lld 15 and dtrace enabled

Description

lang/perl5*: work around duplicate symbol errors with lld 15 and dtrace enabled

Building any of the lang/perl5* ports with clang and lld 15, and the
DTRACE option enabled (which is default on) results in link errors
similar to:

cc -pthread -Wl,-E  -fstack-protector-strong -L/usr/local/lib -o miniperl  mpdtrace/opmini.o mpdtrace/perlmini.o mpdtrace/universalmini.o mpdtrace/gv.o mpdtrace/toke.o mpdtrace/perly.o mpdtrace/pad.o mpdtrace/regcomp.o mpdtrace/dump.o mpdtrace/util.o mpdtrace/mg.o mpdtrace/reentr.o mpdtrace/mro_core.o mpdtrace/keywords.o mpdtrace/builtin.o mpdtrace/hv.o mpdtrace/av.o mpdtrace/run.o mpdtrace/pp_hot.o mpdtrace/sv.o mpdtrace/pp.o mpdtrace/scope.o mpdtrace/pp_ctl.o mpdtrace/pp_sys.o mpdtrace/doop.o mpdtrace/doio.o mpdtrace/regexec.o mpdtrace/utf8.o mpdtrace/taint.o mpdtrace/deb.o mpdtrace/globals.o mpdtrace/perlio.o mpdtrace/numeric.o mpdtrace/mathoms.o mpdtrace/locale.o mpdtrace/pp_pack.o mpdtrace/pp_sort.o mpdtrace/caretx.o mpdtrace/dquote.o mpdtrace/time64.o mpdtrace/miniperlmain.o dtrace_mini.o -lpthread -lm -lcrypt -lutil
ld: error: duplicate symbol: __dtraceenabled_perl___sub__entry
>>> defined in mpdtrace/pp_hot.o
>>> defined in mpdtrace/pp_sort.o

ld: error: duplicate symbol: __dtraceenabled_perl___sub__entry
>>> defined in mpdtrace/pp_hot.o
>>> defined in mpdtrace/regexec.o

ld: error: duplicate symbol: __dtraceenabled_perl___op__entry
>>> defined in mpdtrace/perlmini.o
>>> defined in mpdtrace/run.o

ld: error: duplicate symbol: __dtraceenabled_perl___op__entry
>>> defined in mpdtrace/perlmini.o
>>> defined in mpdtrace/dump.o

ld: error: duplicate symbol: __dtraceenabled_perl___sub__entry
>>> defined in mpdtrace/pp_hot.o
>>> defined in mpdtrace/pp_ctl.o
cc: error: linker command failed with exit code 1 (use -v to see invocation)

Work around these errors by allowing multiple definitions during
linking, using the --allow-multiple-definition linker flag. (Note: this
flag is also supported by GNU ld.)

PR: 265516
Approved by: maintainer timeout (1 month)
MFH: 2022Q3

Details

Provenance
dimAuthored on Sep 19 2022, 6:54 PM
Parents
R11:0da40873e4e0: databases/mondodb60: Remove stray argument
Branches
Unknown
Tags
Unknown