From unknown Wed Aug 20 06:40:17 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#75620 <75620@debbugs.gnu.org> To: bug#75620 <75620@debbugs.gnu.org> Subject: Status: [PATCH core-packages-team] gnu: gcc-6: Use libstdc++ headers appropriate for each GCC. Reply-To: bug#75620 <75620@debbugs.gnu.org> Date: Wed, 20 Aug 2025 13:40:17 +0000 retitle 75620 [PATCH core-packages-team] gnu: gcc-6: Use libstdc++ headers = appropriate for each GCC. reassign 75620 guix-patches submitter 75620 Leo Nikkil=C3=A4 severity 75620 normal tag 75620 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 16 22:11:10 2025 Received: (at submit) by debbugs.gnu.org; 17 Jan 2025 03:11:10 +0000 Received: from localhost ([127.0.0.1]:35461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYclJ-00056B-JC for submit@debbugs.gnu.org; Thu, 16 Jan 2025 22:11:10 -0500 Received: from lists.gnu.org ([2001:470:142::17]:34170) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYclH-00055t-Am for submit@debbugs.gnu.org; Thu, 16 Jan 2025 22:11:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tYclB-0005YZ-VL for guix-patches@gnu.org; Thu, 16 Jan 2025 22:11:02 -0500 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tYcl9-000757-OI for guix-patches@gnu.org; Thu, 16 Jan 2025 22:11:01 -0500 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.phl.internal (Postfix) with ESMTP id 23D3811401F6; Thu, 16 Jan 2025 22:10:57 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Thu, 16 Jan 2025 22:10:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lnikki.la; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm3; t=1737083457; x=1737169857; bh=ib pRKUv4H9jqrGoA3ps2MVsdRYDOapNlnnGApm+pFGQ=; b=nGJj+fcogswTrv8TUy ui64xk8k+543/7j2MVrEPIdtvALq5zHJ8LXS/a7gtUjm0bmk8N9yGvYmAEOf1pVA e6PYYWyEY+31yjleERxQXhHqsXG9sCUAlnwxL1izuLgqJn085XWZuT1lBtAM3++d SMT2BHLGC54GmpjtCYtrzaGW6+IR3X58ZNLrniJsvlM4zmi3/Se/cp2p4IPdhjD1 Xzy0d+CvV3eXN93rfjQcd1asW2/rjDpFxmFUQb5GD0UH3RjrmX5QcPrk8t7Jjawz c1AVvPQoovHicFBCZQwrfiW8dqbaD9Jkd3uOp/XvDWr6N3gWfxYRgcPzwwnrqTh7 H0Nw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1737083457; x=1737169857; bh=ibpRKUv4H9jqrGoA3ps2MVsdRYDO apNlnnGApm+pFGQ=; b=UnSOqxjNck2RXy8w6ADceZDw4cuzJ4vYWXWl0M7qfnxt n0B8g66kO0jwBMYWvXFsIKzjItZ80m4RN02k42PSrXA7JhuVMxe+duqMwZYD85iz LfVlnzdUtCjSgTJASQY0kGmJMPDnPCFQ7j6JWb8/qzitEPqNc2vZzn+oFjVNCZD8 HbpCpWT9LQp+LoqaddNTMjYYekeWhxSTCtJKLN8F0fkkPIfVZYINEa1+f/Ci7U1/ 1XOeo6bTpfJRWKk+eot6kT1Yfe42eA1y27zL3Q1uC8TcVrqSoqXhFpK+JcfwdQji wToHC1wtFYDYhQY1ENY4u7U7uxxozN+ow6c7VhcJeA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudeivddgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevuf ffkffogggtgfesthhqredtredtjeenucfhrhhomhepnfgvohcupfhikhhkihhlmocuoehh vghllhhosehlnhhikhhkihdrlhgrqeenucggtffrrghtthgvrhhnpeegheehheeuffeuhe egheetfeetheejveegjeefheeguefghfdtgefhfeeihfevudenucffohhmrghinhepghhn uhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehhvghllhhosehlnhhikhhkihdrlhgrpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrgh dprhgtphhtthhopehhvghllhhosehlnhhikhhkihdrlhgr X-ME-Proxy: Feedback-ID: i41f146a7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Jan 2025 22:10:56 -0500 (EST) From: =?utf-8?Q?Leo=20Nikkil=C3=A4?= To: guix-patches@gnu.org Subject: [PATCH core-packages-team] gnu: gcc-6: Use libstdc++ headers appropriate for each GCC. Date: Fri, 17 Jan 2025 05:08:49 +0200 Message-ID: <20250117030954.2640-1-hello@lnikki.la> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=103.168.172.158; envelope-from=hello@lnikki.la; helo=fhigh-a7-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Leo=20Nikkil=C3=A4?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) After the "hack" introduced for , all GC= Cs are built with the current GCC's libstdc++ headers. This results in subtly broken C++ headers in older versions, which aren't necessarily compatible w= ith libstdc++s from other versions. For example, this test case works with GCC 11: $ guix shell --container --emulate-fhs --pure -e '(@ (gnu packages gcc)= gcc)' binutils -- sh -c 'echo -e "#include \nint main() { return st= d::isnan(0); }" | g++ -x c++ -; echo $?' 0 but fails with GCC 9: $ guix shell --container --emulate-fhs --pure -e '(@ (gnu packages gcc)= gcc-9)' binutils -- sh -c 'echo -e "#include \nint main() { return = std::isnan(0); }" | g++ -x c++ -; echo $?' =20=20=20=20 In file included from /gnu/store/gkh2rljdrnj24q1q7baa6bhb119251w4-profi= le/include/c++/cmath:45, from :1: : In function 'int main()': :2:26: error: '__builtin_isnan' is not a member of 'std'; did yo= u mean '__builtin_isnan'? : note: '__builtin_isnan' declared here 1 This specific error can be traced back to the GCC build, where GCC 10 and 11 are configured with: checking for ISO C99 support in for C++11... yes but GCC 9 is configured with: checking for ISO C99 support in for C++11... no The configure check fails due to errors like these due to the mismatched libstdc++: configure:17817: checking for ISO C99 support in for C++11 configure:17886: /tmp/guix-build-gcc-9.5.0.drv-0/build/./gcc/xgcc -sha= red-libgcc -B/tmp/guix-build-gcc-9.5.0.drv-0/build/./gcc -nostdinc++ -L/tmp= /guix-build-gcc-9.5.0.drv-0/build/aarch64-unknown-linux-gnu/libstdc++-v3/sr= c -L/tmp/guix-build-gcc-9.5.0.drv-0/build/aarch64-unknown-linux-gnu/libstdc= ++-v3/src/.libs -L/tmp/guix-build-gcc-9.5.0.drv-0/build/aarch64-unknown-lin= ux-gnu/libstdc++-v3/libsupc++/.libs -B/gnu/store/l9a96zpznir4bm02lsycj35q0p= akln32-gcc-9.5.0/aarch64-unknown-linux-gnu/bin/ -B/gnu/store/l9a96zpznir4bm= 02lsycj35q0pakln32-gcc-9.5.0/aarch64-unknown-linux-gnu/lib/ -isystem /gnu/s= tore/l9a96zpznir4bm02lsycj35q0pakln32-gcc-9.5.0/aarch64-unknown-linux-gnu/i= nclude -isystem /gnu/store/l9a96zpznir4bm02lsycj35q0pakln32-gcc-9.5.0/aarch= 64-unknown-linux-gnu/sys-include -fchecking=3D1 -o conftest -g -O2 -D_GNU= _SOURCE -std=3Dc++11 -fno-exceptions -B/gnu/store/3gvs8sw95ldfypr1n688svl5= brwdmdi9-glibc-2.39/lib -Wl,-dynamic-linker -Wl,/gnu/store/3gvs8sw95ldfypr1= n688svl5brwdmdi9-glibc-2.39/lib/ld-linux-aarch64.so.1 conftest.cpp -lm >&5 In file included from /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libst= dc++-11.4.0/include/cmath:41, from /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libst= dc++-11.4.0/include/math.h:36, from conftest.cpp:41: /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libstdc++-11.4.0/include/bi= ts/c++config.h:491:18: error: missing binary operator before token "(" 491 | #if __has_builtin(__builtin_is_constant_evaluated) | ^ In file included from /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libst= dc++-11.4.0/include/cmath:41, from /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libst= dc++-11.4.0/include/math.h:36, from conftest.cpp:41: /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libstdc++-11.4.0/include/bi= ts/c++config.h:732:25: error: missing binary operator before token "(" 732 | #if _GLIBCXX_HAS_BUILTIN(__has_unique_object_representations) | ^ /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libstdc++-11.4.0/include/bi= ts/c++config.h:736:25: error: missing binary operator before token "(" 736 | #if _GLIBCXX_HAS_BUILTIN(__is_aggregate) | ^ /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libstdc++-11.4.0/include/bi= ts/c++config.h:740:25: error: missing binary operator before token "(" 740 | #if _GLIBCXX_HAS_BUILTIN(__builtin_is_constant_evaluated) | ^ /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libstdc++-11.4.0/include/bi= ts/c++config.h:744:25: error: missing binary operator before token "(" 744 | #if _GLIBCXX_HAS_BUILTIN(__is_same) | ^ /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libstdc++-11.4.0/include/bi= ts/c++config.h:748:25: error: missing binary operator before token "(" 748 | #if _GLIBCXX_HAS_BUILTIN(__builtin_launder) | ^ configure:17886: $? =3D 1 Updating libstdc++ to reference each GCC works around this. I've tested this with GCC 9, but I swapped the `libstdc++-headers' input directly as I didn't have the time to do a `guix pull'. I wrote this little test however to check that `this-package' should work here: (use-modules (guix build-system trivial) (guix gexp) (guix packages)) =20=20=20=20 (define (make-requirement pkg) (define builder #~(call-with-output-file #$output (lambda (port) (format port "~a~%" #$(package-name pkg))))) =20=20=20=20 (computed-file "requirement" builder)) =20=20=20=20 (define package-1 (package (name "package-1") (version "1") (source #f) (build-system trivial-build-system) (inputs `(("requirement" ,(make-requirement this-package)))) (arguments '(#:builder (copy-file (assoc-ref %build-inputs "requirement") %output))) (synopsis #f) (description #f) (home-page #f) (license #f))) =20=20=20=20 (define package-2 (package (inherit package-1) (name "package-2") (version "2"))) =20=20=20=20 (list package-1 package-2) Building these packages results in the expected output, where each package uses an input customised for it: $ cat $(guix build -f this-package.scm) package-2 package-1 * gnu/packages/gcc.scm (libstdc++, libstdc++-headers): Remove variables. (make-libstdc++-headers): New procedure. (gcc-6)[native-inputs]: Use it with `this-package'. --- gnu/packages/gcc.scm | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 6247919fec4..3735a9c9d94 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -17,6 +17,7 @@ ;;; Copyright =C2=A9 2023 Bruno Victal ;;; Copyright =C2=A9 2023 Maxim Cournoyer ;;; Copyright =C2=A9 2024 Nguy=E1=BB=85n Gia Phong +;;; Copyright =C2=A9 2025 Leo Nikkil=C3=A4 ;;; ;;; This file is part of GNU Guix. ;;; @@ -549,7 +550,7 @@ (define-public gcc-6 ;; XXX: This gross hack allows us to have libstdc++'s ;; in the search path, thereby avoiding misconfiguration of libstdc= ++: ;; . - ("libstdc++" ,libstdc++-headers) + ("libstdc++" ,(make-libstdc++-headers this-package)) =20 ,@(package-inputs gcc-4.7))))) =20 @@ -1055,31 +1056,28 @@ (define-public (make-libstdc++ gcc) (propagated-inputs '()) (synopsis "GNU C++ standard library"))) =20 -(define libstdc++ - ;; Libstdc++ matching the default GCC. - (make-libstdc++ gcc)) - -(define libstdc++-headers +(define (make-libstdc++-headers gcc) ;; XXX: This package is for internal use to work around ;; (see above). The main difference compar= ed ;; to the libstdc++ headers that come with 'gcc' is that ;; is right under include/c++ and not under ;; include/c++/x86_64-unknown-linux-gnu (aka. GPLUSPLUS_TOOL_INCLUDE_DIR= ). - (package - (inherit libstdc++) - (name "libstdc++-headers") - (outputs '("out")) - (build-system trivial-build-system) - (arguments - '(#:builder (let* ((out (assoc-ref %outputs "out")) - (libstdc++ (assoc-ref %build-inputs "libstdc++"))) - (mkdir out) - (mkdir (string-append out "/include")) - (symlink (string-append libstdc++ "/include") - (string-append out "/include/c++"))))) - (inputs `(("libstdc++" ,libstdc++))) - (synopsis "Headers of GNU libstdc++"))) + (let ((libstdc++ (make-libstdc++ gcc))) + (package + (inherit libstdc++) + (name "libstdc++-headers") + (outputs '("out")) + (build-system trivial-build-system) + (arguments + '(#:builder (let* ((out (assoc-ref %outputs "out")) + (libstdc++ (assoc-ref %build-inputs "libstdc++")= )) + (mkdir out) + (mkdir (string-append out "/include")) + (symlink (string-append libstdc++ "/include") + (string-append out "/include/c++"))))) + (inputs `(("libstdc++" ,libstdc++))) + (synopsis "Headers of GNU libstdc++")))) =20 (define-public libstdc++-4.9 (make-libstdc++ gcc-4.9)) --=20 2.47.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 11 05:49:33 2025 Received: (at 75620-done) by debbugs.gnu.org; 11 Apr 2025 09:49:33 +0000 Received: from localhost ([127.0.0.1]:48780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3B0u-0006BQ-WE for submit@debbugs.gnu.org; Fri, 11 Apr 2025 05:49:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54818) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3B0s-0006B4-BX for 75620-done@debbugs.gnu.org; Fri, 11 Apr 2025 05:49:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3B0l-000142-4Q; Fri, 11 Apr 2025 05:49:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=fMATifkL+9kcqetE96wGnzttSPvaGKPvOQvOzlUdBQc=; b=UR3zSSvN1J9DnbyTTWOt ki28Eu9e8IAjGboG6/rQHQ+HY10tgtJyHRawxwdWORLQ7RaJHtWephQGU9k/M0gptE+5/OfsVCkc7 yLHaaJqRIjO3uKwv0BXHWCWAOOEjSUxQNsLMCxuBesS1OaYQS6pnYzzm9d5R996oNLF44t0EMPVIv WW3uzdivysmB1JULaFoPrxzLmdi+RVjPzb6t5TJcF4FPMZ9Lit3Z5/o/3k0Gqdg1TN8bXQP8kItuO 7GleEmCoXxez/KTXcHgCHHUtCE7zxZHwtJtH3WdSBJWDwqg9c/ceMpyBbfF9HWaQf4c9UZxwL2D+A eXLPLXIxgiGGEw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Leo =?utf-8?Q?Nikkil=C3=A4?= Subject: Re: bug#75620: [PATCH core-packages-team] gnu: gcc-6: Use libstdc++ headers appropriate for each GCC. In-Reply-To: <20250117030954.2640-1-hello@lnikki.la> ("Leo =?utf-8?Q?Nikki?= =?utf-8?Q?l=C3=A4=22's?= message of "Fri, 17 Jan 2025 05:08:49 +0200") References: <20250117030954.2640-1-hello@lnikki.la> Date: Fri, 11 Apr 2025 11:49:08 +0200 Message-ID: <878qo7ni3v.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75620-done Cc: 75620-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Leo, Leo Nikkil=C3=A4 skribis: > After the "hack" introduced for , all = GCCs > are built with the current GCC's libstdc++ headers. This results in subtly > broken C++ headers in older versions, which aren't necessarily compatible= with > libstdc++s from other versions. [...] > * gnu/packages/gcc.scm (libstdc++, libstdc++-headers): Remove variables. > (make-libstdc++-headers): New procedure. > (gcc-6)[native-inputs]: Use it with `this-package'. > --- > gnu/packages/gcc.scm | 38 ++++++++++++++++++-------------------- > 1 file changed, 18 insertions(+), 20 deletions(-) Somehow this patch fell into the cracks. I=E2=80=99ve now applied it with the change below (using =E2=80=98mlambdaq= =E2=80=99 for =E2=80=98make-libstdc++-headers=E2=80=99); I also shortened the commit log. Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 0eec6452f6..5273aa2ce3 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -52,6 +52,7 @@ (define-module (gnu packages gcc) #:use-module (gnu packages perl) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix memoization) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (guix gexp) @@ -1081,27 +1082,28 @@ (define-public (make-libstdc++ gcc) (propagated-inputs '()) (synopsis "GNU C++ standard library"))) -(define (make-libstdc++-headers gcc) - ;; XXX: This package is for internal use to work around - ;; (see above). The main difference compared - ;; to the libstdc++ headers that come with 'gcc' is that - ;; is right under include/c++ and not under - ;; include/c++/x86_64-unknown-linux-gnu (aka. GPLUSPLUS_TOOL_INCLUDE_DIR). - (let ((libstdc++ (make-libstdc++ gcc))) - (package - (inherit libstdc++) - (name "libstdc++-headers") - (outputs '("out")) - (build-system trivial-build-system) - (arguments - '(#:builder (let* ((out (assoc-ref %outputs "out")) - (libstdc++ (assoc-ref %build-inputs "libstdc++"))) - (mkdir out) - (mkdir (string-append out "/include")) - (symlink (string-append libstdc++ "/include") - (string-append out "/include/c++"))))) - (inputs `(("libstdc++" ,libstdc++))) - (synopsis "Headers of GNU libstdc++")))) +(define make-libstdc++-headers + (mlambdaq (gcc) ;memoize to play well with the object cache + ;; XXX: This package is for internal use to work around + ;; (see above). The main difference compared + ;; to the libstdc++ headers that come with 'gcc' is that + ;; is right under include/c++ and not under + ;; include/c++/x86_64-unknown-linux-gnu (aka. GPLUSPLUS_TOOL_INCLUDE_DIR). + (let ((libstdc++ (make-libstdc++ gcc))) + (package + (inherit libstdc++) + (name "libstdc++-headers") + (outputs '("out")) + (build-system trivial-build-system) + (arguments + '(#:builder (let* ((out (assoc-ref %outputs "out")) + (libstdc++ (assoc-ref %build-inputs "libstdc++"))) + (mkdir out) + (mkdir (string-append out "/include")) + (symlink (string-append libstdc++ "/include") + (string-append out "/include/c++"))))) + (inputs `(("libstdc++" ,libstdc++))) + (synopsis "Headers of GNU libstdc++"))))) (define-public libstdc++-4.9 (make-libstdc++ gcc-4.9)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 15 09:39:23 2025 Received: (at 75620) by debbugs.gnu.org; 15 Apr 2025 13:39:23 +0000 Received: from localhost ([127.0.0.1]:51264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4gVW-0003TP-UZ for submit@debbugs.gnu.org; Tue, 15 Apr 2025 09:39:23 -0400 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]:55538) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u4gVT-0003T4-Ir for 75620@debbugs.gnu.org; Tue, 15 Apr 2025 09:39:20 -0400 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-72bb9725de1so1413283a34.2 for <75620@debbugs.gnu.org>; Tue, 15 Apr 2025 06:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greghogan-com.20230601.gappssmtp.com; s=20230601; t=1744724353; x=1745329153; darn=debbugs.gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=H+pOgnS/fu2v11PZEiMGlTjdG8537U0yYYavDnuwPbg=; b=rK03ma4AOxvj4ChHdwEc40fVnaFGKDVupGd4oyhi5GIHFsjo96IvUSpcCXHwTsURSK fn4aGEgFlJ1nUvyzfbSmd10WOOGEO/nyiJR31ZGoNbIlGwadm55XKO/Qzb9G0tjkfofq GOa3NYQEoB2xXISQl+3nsRjC5G8wGxp1FH5YRuc3Avq8kYXTBlGmS6ddpxlU/kVtIGrq UhOtsDsVFIiT7Vn22BIX94/qEBOK/TImTQwJXcFBMSwfU0BpCmCSIfa6DM50PBRdEON0 VmdJEuvG+dkBLbw4NrAqnnbldRGSC07r9CCynIZGcPV6YfYk36qZt1od/cTw5lcHE6rR BbwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744724353; x=1745329153; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H+pOgnS/fu2v11PZEiMGlTjdG8537U0yYYavDnuwPbg=; b=JOHD0Wz1CufW7ZGbiVcLqc80AFJSa4+BNON4Pdha+CDcofo+99FO026MGBak7UpcQy iFGZmx16ZMX3RKE168RAbTFXW8XcTQIGB5bsIn5ki3rdYsL3EEgc+M2hbsKII8mr83zd f9uQNGAkmIdGAXQAHarlFarzylsrZi5lZASFEUxuT5z9dATM5l2QBxnXnCHjwVMAHu6X RFS92SmhtananANGujyY8KAIr+KEet70AfAA6Naa7JQ2pBqpv9FDeXTRIWTkWrZ2Kgt4 I+vpXTnNPPWEM0I925/r2fttaV+OzyhVmRO00BcMkBSe0E1JecHREMOQCESrGhjyyE4y CyNw== X-Gm-Message-State: AOJu0Yyw8AzcQbcdrehP0LW7FvjtAidiZIPSEa/l/I2cdHuXeceqtV0D 6H4rq92kns2GVd0oiueKvXBaw0AJ7W/y6pitW2mRKJ4A0jRdrkV47PGiCPvj8GNqDSJf4e2Px0o +PWcHj5lf7nR11j8QWnKGIddasUXaW35RcU9zAkeupVoqMUiZGzw= X-Gm-Gg: ASbGnctNY+G1e0VoQB+XA6/UycIuoiGk9SStWM7Yi13IDn7ZOk5+x0yI5SzLjn6MY+u nG1hn05zpQH6UH/6qh74pdHlW6dl+75pUelJheF1kaZG5BU7hu7uJjMgSds+KDzkVXiNOS3cvjE d1XZDXN1lFiLjHOUQOk1y9Zg== X-Google-Smtp-Source: AGHT+IEX3dZcOqiwjNAlx5K1D4YqnBv5eCgAXxtT7zULlQF3k6biN8AyONeErf87ACRoa6x6F0cijwnJtv6ydPFFrSk= X-Received: by 2002:a05:6830:6112:b0:72c:10dc:65a8 with SMTP id 46e09a7af769-72e863bfe0fmr10514453a34.18.1744724352479; Tue, 15 Apr 2025 06:39:12 -0700 (PDT) MIME-Version: 1.0 References: <20250117030954.2640-1-hello@lnikki.la> <878qo7ni3v.fsf@gnu.org> In-Reply-To: <878qo7ni3v.fsf@gnu.org> From: Greg Hogan Date: Tue, 15 Apr 2025 09:39:01 -0400 X-Gm-Features: ATxdqUHvi-onXEgQADoFsiT_86-vaQRvvD0Dy7X1xNfZz084FyVAIued5aRTehY Message-ID: Subject: Re: bug#75620: [PATCH core-packages-team] gnu: gcc-6: Use libstdc++ headers appropriate for each GCC. To: 75620@debbugs.gnu.org, ludo@gnu.org, hello@lnikki.la Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75620 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Fri, Apr 11, 2025 at 5:50=E2=80=AFAM Ludovic Court=C3=A8s = wrote: > > Hi Leo, > > Leo Nikkil=C3=A4 skribis: > > > After the "hack" introduced for , al= l GCCs > > are built with the current GCC's libstdc++ headers. This results in sub= tly > > broken C++ headers in older versions, which aren't necessarily compatib= le with > > libstdc++s from other versions. > > [...] > > > * gnu/packages/gcc.scm (libstdc++, libstdc++-headers): Remove variables= . > > (make-libstdc++-headers): New procedure. > > (gcc-6)[native-inputs]: Use it with `this-package'. > > --- > > gnu/packages/gcc.scm | 38 ++++++++++++++++++-------------------- > > 1 file changed, 18 insertions(+), 20 deletions(-) > > Somehow this patch fell into the cracks. > > I=E2=80=99ve now applied it with the change below (using =E2=80=98mlambda= q=E2=80=99 for > =E2=80=98make-libstdc++-headers=E2=80=99); I also shortened the commit lo= g. > > Thanks! > > Ludo=E2=80=99. With this patch I now get build errors on gcc older than 14. CI is returning 504 when viewing evaluations, but I am getting: libtool: compile: g++ -I/tmp/guix-build-libstdc++-13.3.0.drv-0/gcc-13.3.0/libstdc++-v3/../libgcc -I/tmp/guix-build-libstdc++-13.3.0.drv-0/gcc-13.3.0/build/include/ -I/tmp/guix-build-libstdc++-13.3.0.drv-0/gcc-13.3.0/build/include -I/tmp/guix-build-libstdc++-13.3.0.drv-0/gcc-13.3.0/libstdc++-v3/libsupc++ -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=3D2 -fdiagnostics-show-location=3Donce -ffunction-sections -fdata-sections -frandom-seed=3Deh_call.lo -fcf-protection -mshstk -c ../../libstdc++-v3/libsupc++/eh_call.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o eh_call.o ../../libstdc++-v3/libsupc++/eh_call.cc:39:1: warning: new declaration =E2=80=98void __cxa_call_terminate(_Unwind_Exception*)=E2=80=99 ambiguates = built-in declaration =E2=80=98void __cxa_call_terminate(void*)=E2=80=99 [-Wbuiltin-declaration-mismatch] 39 | __cxa_call_terminate(_Unwind_Exception* ue_header) throw () | ^~~~~~~~~~~~~~~~~~~~ ../../libstdc++-v3/libsupc++/eh_call.cc: In function =E2=80=98void __cxa_call_terminate(_Unwind_Exception*)=E2=80=99: ../../libstdc++-v3/libsupc++/eh_call.cc:39:1: internal compiler error: in gimple_build_eh_must_not_throw, at gimple.cc:730 0x7ffff7ced956 __libc_start_call_main ???:0 0x7ffff7ceda14 __libc_start_main_alias_1 ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. make[2]: *** [Makefile:777: eh_call.lo] Error 1 make[2]: Leaving directory '/tmp/guix-build-libstdc++-13.3.0.drv-0/gcc-13.3.0/build/libsupc++' make[1]: *** [Makefile:576: all-recursive] Error 1 make[1]: Leaving directory '/tmp/guix-build-libstdc++-13.3.0.drv-0/gcc-13.3.0/build' make: *** [Makefile:501: all] Error 2 From unknown Wed Aug 20 06:40:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 14 May 2025 11:24:50 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator