On 10 Oct 2020, at 21:23, Shawn Webb <shawn.w...@hardenedbsd.org> wrote: > > On Sat, Oct 10, 2020 at 09:18:08PM +0200, Dimitry Andric wrote: >> On 10 Oct 2020, at 21:03, Shawn Webb <shawn.w...@hardenedbsd.org> wrote: >>> It appears the latest import of llvm 11.0.0 breaks the OpenJDK 12 and >>> above ports. Is anyone tracking this breakage? >> >> Define "break". :) I can't find any PR, so I don't think so. The latest >> builds on the ports cluster seem to have succeeded, but even though the >> ports builder says "head-amd64-default-job", it appears to compile with >> clang 8.0.1, for some reason. Might be incorrect, or on purpose, I don't >> know. > > Log of the HardenedBSD 13-CURRENT/amd64 package > build:http://ci-03.md.hardenedbsd.org/data/hardenedbsd-13_amd64-local/2020-10-09_14h46m02s/logs/errors/openjdk12-12.0.2+10.4_1.log > > HardenedBSD has switched to a full llvm compiler toolchain. I wonder > if that's the culprit? Using llvm-ar, llvm-nm, et al. > > Googling for the duplicate symbol error brought me this result: > https://www.mail-archive.com/freebsd-pkg-fallout@freebsd.org/msg1544005.html
Ah, that is -fno-common fallout, strange that there is no build breakage reported in the FreeBSD ports build cluster? From gcc 10 and clang 11 onwards, -fno-common is the default (this is really a historical mistake, -fcommon should never have been default). It can result in link errors, if duplicate symbols exist in object files. There is a suprising amount of software that makes this very basic mistake! The quick way to work around these errors is to set -fcommon in CFLAGS, which will basically fudge around the actual issue. The better way is to get rid of the duplicated symbols. This is usually easy, except that Java ports tend to take ages to build. :) I'll submit a patch when my machine's finished crunching through it. -Dimitry
signature.asc
Description: Message signed with OpenPGP