From nobody Tue Sep 17 18:40:34 2024 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X7Vw859Fdz5VcG4; Tue, 17 Sep 2024 18:40:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X7Vw831p8z59LD; Tue, 17 Sep 2024 18:40:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726598440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NL+z9BpZfz5CmeJG4OLrSonyfKmCYHMnzVZNlA3+otU=; b=e4hRBgLuXeriG4O6FPK/1/7K9VQki/XT1RHwmOKud4I9MP9mIWZ3NmMySkSXbgeqm/8Yw7 x8Z8+OEA5QdV3Bo0DVzD5uK9jJBRg/fGbT1612qAdiuvrDPhmbUkIceYI2OtuVypgJUHS0 KzjAZFiwCDR+qpnGv5IJMSr1p+fL+6nPyxNZngXIdwuImXfyskHjAA2qP+XmW6/i1M9vQz XVPp0LceNKNf1oihNbxDepEypzH0OAPiw+6tfgAwGf9nqlMrSHRvbs4ws4PyBOhd6KfxIi lZ9Sy85YZEA+E8jC6l1+XQja0QdlTeYsNctMbheFwI/rmv331L9zdj0+NrMU0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726598440; a=rsa-sha256; cv=none; b=hQ9AlzP1qsc9h2QXKFDMpxEAjqtw/l8QUdSb5tQ5W6PoXJAr9v0YrgMwfiPVaappqQjorn kXD0G5WEBbvdf5G5JXGGcHAZ/vTKYoVM98MEsHVxyo7cmxgQhpsnURU1mGmnq+cRSpBxqB T30ykHsay2GoCifRU8Lj34cvvr5Ah/5qaNbp7r3HpP6DTujoUpsYu3cNf6FvvX43P1CGkT GHj/q5R/OM6RBYv92fq5gJx0WbVOw1iJx3RM6V0dYbSDYt8V255MWrASey9zG7uubdYGrM ixAGjuwlsJTRkXhnT0vVIfKR0JAiON7p3xtHpwnqbOaYBh5ieWGk61HvJ+0ASg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726598440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NL+z9BpZfz5CmeJG4OLrSonyfKmCYHMnzVZNlA3+otU=; b=iFlgkq4X/mnXsw5ewaP9LQPLfU1SZ7iSVIV2fpI9s/3+OGLCJLZZs4H45Z6hdPWyPGBb2P SBb4F5lOAZwpO8qrwfeiAaKIwGwZ14ESmJHAYAn6n3FrUnGUMypJ1tJxxi34y4OFsWRnqq Qc4UOifM6RrUnHZHRooIOEkvKVgTVcuS3JGzQtEGsiKfAKVcmzaRP5dRBFZtWBmZmFfGqP AU1MNe3tvD3nRDcTnsr1QJ0zs+ybHEY9nQIMEWC98QQgC32b60SCbNgCTe0TDKxmlHUFZt yHtxp1g5oHk4EpwDfBamuKqo78UGcjiU5W60yCXZzOAhco3VWCbnb0b4IHWCuQ== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R10" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4X7Vw81xkxz15qr; Tue, 17 Sep 2024 18:40:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.wg.andric.com [10.69.1.2]) (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 6F01D67053; Tue, 17 Sep 2024 20:40:37 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_C4C2E523-FD3C-447B-B23C-A194117E0C88" List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports@freebsd.org Sender: owner-freebsd-ports@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.2\)) Subject: Re: official lang/gcc14 package builds are broken, at least for armv7: "error: attempt to use a poisoned identifier" and more Date: Tue, 17 Sep 2024 20:40:34 +0200 In-Reply-To: <44F55AB3-D1C3-4171-9EE7-C852EBF2055C@yahoo.com> Cc: FreeBSD Toolchain , FreeBSD Mailing List , Lorenzo Salvadore , Brooks Davis , fuz@freebsd.org To: Mark Millard References: <44F55AB3-D1C3-4171-9EE7-C852EBF2055C.ref@yahoo.com> <44F55AB3-D1C3-4171-9EE7-C852EBF2055C@yahoo.com> X-Mailer: Apple Mail (2.3731.700.6.1.2) --Apple-Mail=_C4C2E523-FD3C-447B-B23C-A194117E0C88 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii This is because of gcc's weird identifier poisoning system, and them not = correctly marking all used standard C++ headers for inclusion before the = poisoning takes place. Try the attached patch, which I have been using for a long time now = (months, at least since the bootstrap options were deleted, but which I = reverted locally). -Dimitry --Apple-Mail=_C4C2E523-FD3C-447B-B23C-A194117E0C88 Content-Disposition: attachment; filename=lang__gcc14-devel-fix-plugins-1.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="lang__gcc14-devel-fix-plugins-1.diff" Content-Transfer-Encoding: 7bit commit 796ff654329e8b58ea1455552501a110e821ee3a Author: Dimitry Andric Date: 2024-02-08T13:35:27+01:00 lang/gcc14-devel: apply fixes for plugins diff --git a/lang/gcc14-devel/files/patch-gcc_jit_dummy-frontend.cc b/lang/gcc14-devel/files/patch-gcc_jit_dummy-frontend.cc new file mode 100644 index 000000000000..db708c731596 --- /dev/null +++ b/lang/gcc14-devel/files/patch-gcc_jit_dummy-frontend.cc @@ -0,0 +1,11 @@ +--- gcc/jit/dummy-frontend.cc.orig 2024-01-14 22:32:46 UTC ++++ gcc/jit/dummy-frontend.cc +@@ -18,6 +18,8 @@ along with GCC; see the file COPYING3. If not see + . */ + + #include "config.h" ++#define INCLUDE_STRING ++#define INCLUDE_VECTOR + #include "system.h" + #include "coretypes.h" + #include "jit-playback.h" diff --git a/lang/gcc14-devel/files/patch-gcc_jit_jit-builtins.cc b/lang/gcc14-devel/files/patch-gcc_jit_jit-builtins.cc new file mode 100644 index 000000000000..1840caaad2d3 --- /dev/null +++ b/lang/gcc14-devel/files/patch-gcc_jit_jit-builtins.cc @@ -0,0 +1,11 @@ +--- gcc/jit/jit-builtins.cc.orig 2024-01-14 22:32:46 UTC ++++ gcc/jit/jit-builtins.cc +@@ -18,6 +18,8 @@ along with GCC; see the file COPYING3. If not see + . */ + + #include "config.h" ++#define INCLUDE_STRING ++#define INCLUDE_VECTOR + #include "system.h" + #include "coretypes.h" + #include "target.h" diff --git a/lang/gcc14-devel/files/patch-gcc_jit_jit-playback.cc b/lang/gcc14-devel/files/patch-gcc_jit_jit-playback.cc new file mode 100644 index 000000000000..f352011dfcce --- /dev/null +++ b/lang/gcc14-devel/files/patch-gcc_jit_jit-playback.cc @@ -0,0 +1,11 @@ +--- gcc/jit/jit-playback.cc.orig 2024-01-14 22:32:46 UTC ++++ gcc/jit/jit-playback.cc +@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see + + #include "config.h" + #define INCLUDE_MUTEX ++#define INCLUDE_STRING ++#define INCLUDE_VECTOR + #include "libgccjit.h" + #include "system.h" + #include "coretypes.h" diff --git a/lang/gcc14-devel/files/patch-gcc_jit_jit-recording.cc b/lang/gcc14-devel/files/patch-gcc_jit_jit-recording.cc new file mode 100644 index 000000000000..15e456fcb923 --- /dev/null +++ b/lang/gcc14-devel/files/patch-gcc_jit_jit-recording.cc @@ -0,0 +1,11 @@ +--- gcc/jit/jit-recording.cc.orig 2024-01-14 22:32:46 UTC ++++ gcc/jit/jit-recording.cc +@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see + + #include "config.h" + #define INCLUDE_SSTREAM ++#define INCLUDE_STRING ++#define INCLUDE_VECTOR + #include "system.h" + #include "coretypes.h" + #include "tm.h" diff --git a/lang/gcc14-devel/files/patch-gcc_jit_libgccjit.cc b/lang/gcc14-devel/files/patch-gcc_jit_libgccjit.cc new file mode 100644 index 000000000000..ca1b4c27e0c5 --- /dev/null +++ b/lang/gcc14-devel/files/patch-gcc_jit_libgccjit.cc @@ -0,0 +1,11 @@ +--- gcc/jit/libgccjit.cc.orig 2024-01-14 22:32:46 UTC ++++ gcc/jit/libgccjit.cc +@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see + + #include "config.h" + #define INCLUDE_MUTEX ++#define INCLUDE_STRING ++#define INCLUDE_VECTOR + #include "system.h" + #include "coretypes.h" + #include "timevar.h" --Apple-Mail=_C4C2E523-FD3C-447B-B23C-A194117E0C88 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 17 Sep 2024, at 16:24, Mark Millard wrote: >=20 > Also: no member named 'fancy_abort' in namespace 'std' >=20 > Such is associated with not using STANDARD_BOOTSTRAP for armv7, given = GCC's historic lack of keeping builds of everything working for just = direct use of clang++/libc++ or the like. >=20 > The specific change that got back into this issue was: >=20 > -LANGUAGES:=3D c,c++,objc,fortran > +LANGUAGES:=3D c,c++,objc,fortran,jit >=20 > It is the jit part of the build that fails to build as stands. >=20 > See: >=20 > = https://pkg-status.freebsd.org/ampere2/data/main-armv7-default/p13f486017d= 78_s3df987c99/logs/errors/gcc14-14.2.0_1.log >=20 > Example: >=20 > In file included from = /wrkdirs/usr/ports/lang/gcc14/work/gcc-14.2.0/gcc/jit/dummy-frontend.cc:23= : > In file included from = /wrkdirs/usr/ports/lang/gcc14/work/gcc-14.2.0/gcc/jit/jit-playback.h:24: > In file included from /usr/include/c++/v1/string:594: > In file included from = /usr/include/c++/v1/__memory_resource/polymorphic_allocator.h:20: > In file included from /usr/include/c++/v1/tuple:1455: > In file included from /usr/include/c++/v1/exception:82: > /usr/include/c++/v1/__exception/exception_ptr.h:111:3: error: no = member named 'fancy_abort' in namespace 'std'; did you mean simply = 'fancy_abort'? > 111 | std::abort(); > | ^~~~~ > /wrkdirs/usr/ports/lang/gcc14/work/gcc-14.2.0/gcc/system.h:808:13: = note: 'fancy_abort' declared here > 808 | extern void fancy_abort (const char *, int, const char *) > | ^ > In file included from = /wrkdirs/usr/ports/lang/gcc14/work/gcc-14.2.0/gcc/jit/dummy-frontend.cc:23= : > In file included from = /wrkdirs/usr/ports/lang/gcc14/work/gcc-14.2.0/gcc/jit/jit-playback.h:26: > In file included from /usr/include/c++/v1/vector:325: > In file included from = /usr/include/c++/v1/__format/formatter_bool.h:20: > In file included from = /usr/include/c++/v1/__format/formatter_integral.h:35: > /usr/include/c++/v1/locale:288:32: error: attempt to use a poisoned = identifier > 288 | __status =3D (unsigned char*)malloc(__nkw); > | ^ > /usr/include/c++/v1/locale:1385:24: error: attempt to use a poisoned = identifier > 1385 | __ob =3D (char_type*)malloc(2 * static_cast(__nc) * = sizeof(char_type)); > | ^ > /usr/include/c++/v1/locale:2429:31: error: attempt to use a poisoned = identifier > 2429 | _Tp* __t =3D (_Tp*)std::realloc(__owns ? __b.get() : 0, = __new_cap); > | ^ > /usr/include/c++/v1/locale:2632:24: error: attempt to use a poisoned = identifier > 2632 | __h.reset((char*)malloc(static_cast(__wn - __wb.get() + = 2))); > | ^ > /usr/include/c++/v1/locale:2910:28: error: attempt to use a poisoned = identifier > 2910 | __hd.reset((char_type*)malloc(static_cast(__n) * = sizeof(char_type))); > | ^ > /usr/include/c++/v1/locale:2936:28: error: attempt to use a poisoned = identifier > 2936 | __hw.reset((char_type*)malloc(__exn * sizeof(char_type))); > | ^ > /usr/include/c++/v1/locale:2974:27: error: attempt to use a poisoned = identifier > 2974 | __h.reset((char_type*)malloc(__exn * sizeof(char_type))); > | ^ >=20 >=20 >=20 > =3D=3D=3D > Mark Millard > marklmi at yahoo.com >=20 >=20 --Apple-Mail=_C4C2E523-FD3C-447B-B23C-A194117E0C88--