From owner-freebsd-ports@freebsd.org Sat Oct 10 19:46:08 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2CE2428FD1 for ; Sat, 10 Oct 2020 19:46:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7wRN5hdcz4Dj2; Sat, 10 Oct 2020 19:46:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 8ED71193C9; Sat, 10 Oct 2020 19:46:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::ec6b:716d:f188:b5ba] (unknown [IPv6:2001:470:7a58:0:ec6b:716d:f188:b5ba]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 796BE685A4; Sat, 10 Oct 2020 21:46:07 +0200 (CEST) From: Dimitry Andric Message-Id: <8DD818E8-2569-4E2F-8BAD-143F8AE7FAE5@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_1BA4978F-6292-486D-BA4A-0E936209E42B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: OpenJDK ports and 13-CURRENT Date: Sat, 10 Oct 2020 21:45:58 +0200 In-Reply-To: <20201010192334.auepsizn3w57soes@mutt-hbsd> Cc: FreeBSD Ports To: Shawn Webb References: <20201010190337.qtvivmpmzw4gtk3h@mutt-hbsd> <4ADAFC01-2148-48BE-AAE8-5E6A269C14CE@FreeBSD.org> <20201010192334.auepsizn3w57soes@mutt-hbsd> X-Mailer: Apple Mail (2.3445.104.17) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2020 19:46:08 -0000 --Apple-Mail=_1BA4978F-6292-486D-BA4A-0E936209E42B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 10 Oct 2020, at 21:23, Shawn Webb wrote: >=20 > On Sat, Oct 10, 2020 at 09:18:08PM +0200, Dimitry Andric wrote: >> On 10 Oct 2020, at 21:03, Shawn Webb = wrote: >>> It appears the latest import of llvm 11.0.0 breaks the OpenJDK 12 = and >>> above ports. Is anyone tracking this breakage? >>=20 >> 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. >=20 > 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 >=20 > HardenedBSD has switched to a full llvm compiler toolchain. I wonder > if that's the culprit? Using llvm-ar, llvm-nm, et al. >=20 > Googling for the duplicate symbol error brought me this result: > = https://www.mail-archive.com/freebsd-pkg-fallout@freebsd.org/msg1544005.ht= ml Ah, that is -fno-common fallout, strange that there is no build breakage reported in the FreeBSD ports build cluster? =46rom 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 --Apple-Mail=_1BA4978F-6292-486D-BA4A-0E936209E42B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCX4IPdgAKCRCwXqMKLiCW o7PxAKDrcRqRYqPyhDPJXs2W+gmm3quKlQCcDLeok9a1ow8sbH8q8AD2C9PPHHQ= =qiRI -----END PGP SIGNATURE----- --Apple-Mail=_1BA4978F-6292-486D-BA4A-0E936209E42B--