Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Oct 2020 14:51:22 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Shawn Webb <shawn.webb@hardenedbsd.org>
Cc:        FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: OpenJDK ports and 13-CURRENT
Message-ID:  <8AD21ECC-4D62-4687-8648-F33029195977@FreeBSD.org>
In-Reply-To: <20201010194926.jnypzmbpu33wilbl@mutt-hbsd>
References:  <20201010190337.qtvivmpmzw4gtk3h@mutt-hbsd> <4ADAFC01-2148-48BE-AAE8-5E6A269C14CE@FreeBSD.org> <20201010192334.auepsizn3w57soes@mutt-hbsd> <8DD818E8-2569-4E2F-8BAD-143F8AE7FAE5@FreeBSD.org> <20201010194926.jnypzmbpu33wilbl@mutt-hbsd>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_ED07FCDD-C8E7-40FD-B101-076F4B289E30
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 10 Oct 2020, at 21:49, Shawn Webb <shawn.webb@hardenedbsd.org> wrote:
>=20
> On Sat, Oct 10, 2020 at 09:45:58PM +0200, Dimitry Andric wrote:
...
>> 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.
>=20
> Yup. Another victim: print/tex-luatex:
>=20
> =
https://git-01.md.hardenedbsd.org/HardenedBSD/hardenedbsd-ports/commit/229=
b7663bc82ff7e471dc1e19662f68d4226984a

I looked into this one finally, and it's not really an issue with any
recent clang import, as the PR is from 2018-12-20:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234221

The cause is a mixing of libstdc++ and libc++, which should not be done,
as it will almost always lead to unexpected linking errors.

The following diff fixes that:

Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- Makefile    (revision 552400)
+++ Makefile    (working copy)
@@ -74,6 +74,8 @@ CONFIGURE_ARGS+=3D--with-system-$L \
                --with-$L-include=3D${LOCALBASE}/include \
                --with-$L-libdir=3D${LOCALBASE}/lib
 .endfor
+CONFIGURE_ARGS+=3DCC=3D"${CC}" \
+               CXX=3D"${CXX}"
 CPPFLAGS+=3D     -I${LOCALBASE}/include
 MAKE_JOBS_UNSAFE=3D      yes
 TEX_FORMATS=3D   luatex


Note that the port's Makefile already has -fcommon added, to work
around duplicated symbols. Since the copy of texlive is ancient, it is
probably not worth the time to fix the actual issues.

-Dimitry


--Apple-Mail=_ED07FCDD-C8E7-40FD-B101-076F4B289E30
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

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCX4roygAKCRCwXqMKLiCW
ozfDAKD+eZm++uPqlOb47FerqDnsU6D+8QCfeMoTzmQYVeeCz8iuEv1TIFOKu7k=
=EShD
-----END PGP SIGNATURE-----

--Apple-Mail=_ED07FCDD-C8E7-40FD-B101-076F4B289E30--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8AD21ECC-4D62-4687-8648-F33029195977>