Bug 248748 - print/texlive-base: linker error: ld: error: duplicate symbol: dpi
Summary: print/texlive-base: linker error: ld: error: duplicate symbol: dpi
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Niclas Zeising
URL:
Keywords:
Depends on:
Blocks: 248756
  Show dependency treegraph
 
Reported: 2020-08-19 07:24 UTC by O. Hartmann
Modified: 2020-08-19 17:44 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (hrs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2020-08-19 07:24:00 UTC
With LLVM11 in base, -fno-common is now the standard of clang and in the vain of this change several ports fail to compile/link due to a duplicate symbol error, see below.

A quick and dirty fix, as suggested by FreeBSD developers, is to add CFLAGS+=-fcommon to the set of compiler options. 


[...]
--- ttf2pk ---
/bin/sh ./libtool  --tag=CC    --mode=link cc -Wimplicit -Wreturn-type -O2 -pipe -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing   -fstack-protector-strong -o ttf2pk errormsg.o filesrch.o ftlib.o  ligkern.o newobj.o parse.o  subfont.o texenc.o ttfenc.o pklib.o ttf2pk.o  ttflib.o -L/usr/local/lib -lkpathsea -L/usr/local/lib -lfreetype -lz -lm
libtool: link: cc -Wimplicit -Wreturn-type -O2 -pipe -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing -fstack-protector-strong -o ttf2pk errormsg.o filesrch.o ftlib.o ligkern.o newobj.o parse.o subfont.o texenc.o ttfenc.o pklib.o ttf2pk.o ttflib.o  -L/usr/local/lib -lkpathsea -lfreetype -lz -lm
ld: error: duplicate symbol: dpi
>>> defined at ftlib.c
>>>            ftlib.o:(dpi)
>>> defined at pklib.c
>>>            pklib.o:(.bss+0x940)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [ttf2pk] Error code 1

make[6]: stopped in /usr/ports/print/texlive-base/work/texlive-20150521-source/texk/ttf2pk2
1 error

make[6]: stopped in /usr/ports/print/texlive-base/work/texlive-20150521-source/texk/ttf2pk2
*** [recurse] Error code 1

make[4]: stopped in /usr/ports/print/texlive-base/work/texlive-20150521-source/texk
Comment 1 Niclas Zeising freebsd_committer 2020-08-19 17:33:50 UTC
This should be fixed with ports r545441.

Please reopen if this is still an issue.