From unknown Fri Aug 08 15:17:55 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#52066] [PATCH, core-updates-frozen, RFC] Fix static guile on aarch64 Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Nov 2021 22:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52066@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16377076341484 (code B ref -1); Tue, 23 Nov 2021 22:48:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Nov 2021 22:47:14 +0000 Received: from localhost ([127.0.0.1]:52436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpeZG-0000Ns-0l for submit@debbugs.gnu.org; Tue, 23 Nov 2021 17:47:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:35494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpeZB-0000Nh-Ip for submit@debbugs.gnu.org; Tue, 23 Nov 2021 17:47:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpeZB-0004Kc-9f for guix-patches@gnu.org; Tue, 23 Nov 2021 17:47:09 -0500 Received: from mout.gmx.net ([212.227.17.20]:46577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpeZ8-0003ZE-Qf for guix-patches@gnu.org; Tue, 23 Nov 2021 17:47:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1637707623; bh=P3XNZtcTEzjpFZjlAiCWNkYwmaD5Bc0VlU0C8vicMWM=; h=X-UI-Sender-Class:From:To:Subject:Date; b=IMuVUoNi+JN8V5Dl1Ryp6pmTyoOH+72r8slGMlhus3Fhz1dKA9B788Vi8P0i6Soxw B0jFWnJoFz1QjVx7zLz/58kCs0Zc2NUooLsZTs1aT8ubgx/ULnoxFoDqQ3NJoXC+Wm Rozh0MgkZ484TUL41MwzYYiufyO3tAhiAojVoPoE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MyKHc-1mQQcE3lc4-00yenu for ; Tue, 23 Nov 2021 23:47:03 +0100 User-agent: mu4e 1.6.10; emacs 27.2 From: Pierre Langlois Date: Tue, 23 Nov 2021 21:22:31 +0000 Message-ID: <878rxeebh6.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:kJyZaaKbtMQ8oWXrfb2wRpp0sJjb7EKXp9eF6QgLD4kBK3AyEjZ SshzooRSocLtM1JybesaWu6TvRd/Vr7ZxM3P0WErnm4qWTPBC62CSpSeR6i5vRtO2ZXCBqX Y3lLFeIJxup/+53Yy9TNDBeZN3hXNgaMDzOHua1QjN39AKc83yRP/huI6DwBoExDffSF93y QhtH+mFYJ8z8A9Uig6TQA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ID7vJ/sa7Y0=:ZznK03hwXFiNfZ5c8rBta6 5JylDDCVqTk5IG4GThLQI3vQn7p8t8H4xEzxidCC97PLTQvnmiWUJNEqHDosbRru7UM7lmLMe UfZmEwsGMTAbwkED/sDwNVsNoQsTVVdbZRwvhY95pR4n3ERnCLGPzq5ajQK3JH4sCWRaWVYiT MBIexX7d6TCEhTGlE38yVm0D+hiw13zJXAi1vz58w0wv4z5HtOyVxi+sPFDp1NwSv6+Yw0f8p dPMZ7G87LQ9YUr6lHSMep7CE7GPJuwoD8Md/h6CXiib5PhrGdPtncLjZTqVDqu2G4jpxBX74Y j7A1VeHFC8nDvS8ePwHRXMf5n6ZgAT1WeDj6ZMlnasK0iz/7UXjPY7/rlP3o4b7ln8ZXTlDO7 7Naf7fd6nSloEILWZPHfpGj45Qp59QGtUOG9Nb6SB+7dAPFlZ7m+VuRujnRM9ihDi8qvj3Kzm prwqcmxJpttlEv2rncXxeoX/hLYmw9fUo0OtHNOgXhTJLaR88sd6yyFM6KGOxA6aUBAY9yD/e pQTaZAm4KYjrxRy5y8VMjXDQU/1Tkkr+YI25Rj9MNjl13LjfU0Gabstxoa2kxJwHrc8wPXlQB cU+Z64qDWslt4bTbfzzOb+ETfyhgtNftUFQSLdEC61xAnxsP2fx03NuIRtUw+65VOrSGsqJJ8 f7uc4zN45WLHtDASe1yijDpnQedY6uIRtQg1PtohNrovI3dwQPG2dOlQn22dkskmTKxD+YbEs 46N/odpMats+5d1xtXu0Ll+03Bb5yQ4lb8adI/98Om4NTMjTE44P+iEmi1tzJXqIdJN12Vtco BW+ZLVzEKZxPWJW0sjJ7hy0SPrwi6bUx59tP2BV0ymiGPnIXt9nVW0781gKjgPIyG3CM3KZdV WCRA/um+NtDlOJ2WQQSHSJXi0pYDTshnKUAlcZsAJXrc1K5DCXFEw7HllLrQcmRlGK+MqJhBD 7HeDtgslIAGRb2FhB1JZ3AK+wCnHKrmbt8wG7CJ9kIwNE9xRUpL787SMqg5hGVJCjMzfZURHc X7ovA2mF+xRscV7YbkPmKKlBQOP2KIN2sEz99tiBnhBQ8ibFbGKxaML2pk2bv5GkIS1S8ADMZ iSSIFgYoQ3WQdc= Received-SPF: pass client-ip=212.227.17.20; envelope-from=pierre.langlois@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) 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: -2.4 (--) --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Guix! With the recent call for testing on core-updates-frozen I thought I'd test my router configuration on the RockPro64 and I saw that building the stripped static guile for initrd didn't build. I found a fix but I'm not 100% sure it's correct, so beware, here's my debugging session! %guile-static-stripped fails to build as such: =2D-8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build -e '(@ (gnu packages make-bootstrap) %guile-sta= tic-stripped)' ... Backtrace: 1 (primitive-load "/gnu/store/gz31w23fjaipnm9c9hzw6p8s619?") In guix/build/utils.scm: 761:6 0 (invoke "/gnu/store/9rwp8z98xdllih5rzf2ncq25xhnkgcvq-g?" ?) guix/build/utils.scm:761:6: In procedure invoke: ERROR: 1. &invoke-error: program: "/gnu/store/9rwp8z98xdllih5rzf2ncq25xhnkgcvq-guile-static-st= ripped-3.0.7/bin/guile" arguments: ("--version") exit-status: 127 term-signal: #f stop-signal: #f =2D-8<---------------cut here---------------end--------------->8--- The stripped guile crashes, and if we check it, it's actually not a static binary! So when stripping out store references we break it of course: =2D-8<---------------cut here---------------start------------->8--- $ file /gnu/store/9rwp8z98xdllih5rzf2ncq25xhnkgcvq-guile-static-stripped-3.= 0.7/bin/guile /gnu/store/9rwp8z98xdllih5rzf2ncq25xhnkgcvq-guile-static-stripped-3.0.7/bin= /guile: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee= -glibc-2.33/lib/ld-linux-aarch64.so.1, for GNU/Linux 2.6.32, stripped ^^^^^^^^ Oups :-) =2D-8<---------------cut here---------------end--------------->8--- The root of the issue seems to be that the make-guile-static procedure isn't actually producing a static binary on aarch64. Digging into it more, we do pass the -all-static flag to libtool, but the gcc command doesn't actually do any static linking: =2D-8<---------------cut here---------------start------------->8--- /tmp/guix-build-guile-static-3.0.7.drv-0/guile-3.0.7$ make V=3D1 ... ../libtool --tag=3DCC --mode=3Dlink gcc -std=3Dgnu11 -pthread -Wall -Wmi= ssing-prototypes -Wpointer-arith -fno-strict-aliasing -fwrapv -fvisibility= =3Dhidden -g -O2 -all-static -pthread -ldl -o guile guile-guile.o libguile-= 3.0.la -ldl -lcrypt -lm libtool: link: gcc -std=3Dgnu11 -pthread -Wall -Wmissing-prototypes -Wpoint= er-arith -fno-strict-aliasing -fwrapv -fvisibility=3Dhidden -g -O2 -pthread= -o guile guile-guile.o ./.libs/libguile-3.0.a -L/gnu/store/3539zsmc939g1r= 9g3r02bpy0m1b9v9c8-libgc-8.0.4/lib -L/gnu/store/sn95w7yk9qwxhw74l590606y53p= f5mkf-libffi-3.3/lib /gnu/store/3539zsmc939g1r9g3r02bpy0m1b9v9c8-libgc-8.0.= 4/lib/libgc.a -lpthread /gnu/store/sn95w7yk9qwxhw74l590606y53pf5mkf-libffi-= 3.3/lib/libffi.a -lunistring -ldl -lcrypt -lm -pthread =2D-8<---------------cut here---------------end--------------->8--- And if we try and do a static link anyway, it doens't work because of missing references related to atomic ops. My guess is that libtool tried to statically link, and fell back to dynamic linking when that didn't work, I'm not so sure. =2D-8<---------------cut here---------------start------------->8--- /tmp/guix-build-guile-static-3.0.7.drv-0/guile-3.0.7/libguile$ gcc -std=3Dg= nu11 -pthread -Wall -Wmissing-prototypes -Wpointer-arith -fno-strict-aliasi= ng -fwrapv -fvisibility=3Dhidden -g -O2 -pthread -o guile guile-guile.o ./= .libs/libguile-3.0.a -L/gnu/store/3539zsmc939g1 r9g3r02bpy0m1b9v9c8-libgc-8.0.4/lib -L/gnu/store/sn95w7yk9qwxhw74l590606y53= pf5mkf-libffi-3.3/lib /gnu/store/3539zsmc939g1r9g3r02bpy0m1b9v9c8-libgc-8.0= .4/lib/libgc.a -lpthread /gnu/store/sn95w7yk9qwxhw74l590606y53pf5mkf-libffi= -3.3/lib/libffi.a -lunistring -ldl -lcrypt -lm -p thread -static=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ld: ./.libs/libguile-3.0.a(libguile_3.0_la-dynl.o): in function `scm_dlopen= ':=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 /tmp/guix-build-guile-static-3.0.7.drv-0/guile-3.0.7/libguile/dynl.c:78: wa= rning: Using 'dlopen' in statically linked applications requires at runtime= the shared libraries from the glibc version used for linking=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 ld: ./.libs/libguile-3.0.a(libguile_3.0_la-posix.o): in function `scm_tmpna= m':=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 /tmp/guix-build-guile-static-3.0.7.drv-0/guile-3.0.7/libguile/posix.c:1611:= warning: the use of `tmpnam' is dangerous, better use `mkstemp'=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 ld: /gnu/store/b05hb686wamq78d5jzpisns9xdx6nkp2-glibc-2.33-static/lib/libc.= a(abort.o): in function `abort':=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 (.text.unlikely+0x34): undefined reference to `__aarch64_cas4_acq'=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 ld: (.text.unlikely+0xa0): undefined reference to `__aarch64_swp4_rel'=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 ld: (.text.unlikely+0xe4): undefined reference to `__aarch64_cas4_acq'=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 ld: /gnu/store/b05hb686wamq78d5jzpisns9xdx6nkp2-glibc-2.33-static/lib/libpt= hread.a(pthread_create.o):(.text+0x5c): undefined reference to `__aarch64_c= as4_acq'=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ld: /gnu/store/b05hb686wamq78d5jzpisns9xdx6nkp2-glibc-2.33-static/lib/libpt= hread.a(pthread_create.o):(.text+0x1fc): undefined reference to `__aarch64_= cas4_acq'=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ld: /gnu/store/b05hb686wamq78d5jzpisns9xdx6nkp2-glibc-2.33-static/lib/libpt= hread.a(pthread_create.o):(.text+0x29c): undefined reference to `__aarch64_= cas4_acq'=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ... =2D-8<---------------cut here---------------end--------------->8--- Doing more digging, I found a reference to a similar issue here: https://bugzilla.redhat.com/show_bug.cgi?id=3D1830472#c1, this looks related to the -moutline-atomics option that's enabled by default with GCC 10. But we're building guile with GCC 7 so it was a bit confusing. However, glibc here is actually built with the default GCC 10, and if we change that then it works! =2D-8<---------------cut here---------------start------------->8--- =2D-- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -85,6 +85,9 @@ (define glibc-for-bootstrap `(cons* "--disable-nscd" "--disable-build-nscd" "--enable-static-nss" ,flags)))) + (native-inputs + `(("gcc" ,gcc-7) + ,@(package-native-inputs base))) =20 ;; Remove the 'debug' output to allow bit-reproducible builds (when = the ;; 'debug' output is used, ELF files end up with a .gnu_debuglink, w= hich =2D-8<---------------cut here---------------end--------------->8--- I'm not 100% sure what's going on, there seems to be an incompatiblity between GCC 7 and 10, but I don't know if this is a bug or if it's working as intended. I have a feeling statically linking the libc with different compiler version might just not be supported, but it works in practise a lot of the time. Does this make sense? Do you think the following patch would be the right way to fix this? Thanks! Pierre --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmGdb2UYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UQGQH/iLPGyFADQ5f3fCC/A8waA2Z N0kDe1PCST69FGjwOX8QZSgL25dl+QmEduiZ2/Zz+sKQRMc7cBkfHkW/HtUvII6i KwwCUjR52Z2g3OxPosnbFo9EZkhDgXFGsg8BtmPmjmY+hHKw9rJPIWw7yUmZrk0a +YL1tAYu/eFvORZSLrEP+95wZqqS8kSNGSEN7iC6kMaGeb1xCuJOH2Cv5bA1D0He 7QidpDr9HVe47sqk6PYOhmCxm8/wrnIL6Hj0T3J7WrByhWLWFmb1hexuCrBEmz+G FB11vS38ZGPMe3RN+ojrfaDxXmUJPlT7X6ax9n4QNChw4ljBLrS3rHQQYiM+Llc= =aeET -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-glibc-for-bootstrap-Build-with-GCC-7.patch Content-Transfer-Encoding: quoted-printable =46rom c1f61c161b3f5f7e8430c4925b0785d3819e255e Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 23 Nov 2021 22:41:20 +0000 Subject: [PATCH] gnu: glibc-for-bootstrap: Build with GCC 7. * gnu/packages/make-bootstrap.scm (glibc-for-bootstrap)[native-inputs]: Add gcc-7. =2D-- gnu/packages/make-bootstrap.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap= .scm index 267adde48c..d8f1f0eb1e 100644 =2D-- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -86,6 +86,12 @@ (define glibc-for-bootstrap "--enable-static-nss" ,flags)))) + ;; Make sure to build glibc with the same compiler version with the= rest + ;; of the bootstrap. Otherwise it fails to statically link on aarc= h64. + (native-inputs + `(("gcc" ,gcc-7) + ,@(package-native-inputs base))) + ;; Remove the 'debug' output to allow bit-reproducible builds (when= the ;; 'debug' output is used, ELF files end up with a .gnu_debuglink, = which ;; includes a CRC of the corresponding debugging symbols; those sym= bols =2D- 2.34.0 --=-=-=-- From unknown Fri Aug 08 15:17:55 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#52066] [PATCH, core-updates-frozen, RFC] Fix static guile on aarch64 Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Nov 2021 10:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Pierre Langlois Cc: 52066@debbugs.gnu.org Received: via spool by 52066-submit@debbugs.gnu.org id=B52066.16379208167874 (code B ref 52066); Fri, 26 Nov 2021 10:01:01 +0000 Received: (at 52066) by debbugs.gnu.org; 26 Nov 2021 10:00:16 +0000 Received: from localhost ([127.0.0.1]:58728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqY1f-00022v-JK for submit@debbugs.gnu.org; Fri, 26 Nov 2021 05:00:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqY1d-00022d-Px for 52066@debbugs.gnu.org; Fri, 26 Nov 2021 05:00:14 -0500 Received: from [2001:470:142:3::e] (port=51644 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqY1Y-0000lv-5F; Fri, 26 Nov 2021 05:00:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=8JVPrXc1wT0yKgUHZtVMeTUJ15hINKuFEuyC6yseygo=; b=Hao4a9MyJVuuLB1y8Nm1 vWpv3ocpqSVVB6hqIwGNMtu3fYxBSJu0BLQZ/IWaaiBk7pepwCthUmMCf96DAQPVfk0oUj/pAfZwZ sXv/zeYryIZjL7DS+WNsEGcFzLgnS+CPVMQTKQp/EmwJqCM4Smmay/xwjmm5wu4typ8e38LG6LrA4 U7x/TsfTxD1fIzn72rScLDnXZdBlsTF+5c9wVqqBC8FlShpMu4m5ekD+0n9UxpKt4l0YE41yrAnJ3 BESx/oHmvFHXRwpjxk65wgHvDPtoETj4YFMh3f0Zi67JqiGVUNw7/hv5c0KR/l6zNeoliAFgR/+W+ maGDRw58HsA4eQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=49508 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqY1X-00011R-Sq; Fri, 26 Nov 2021 05:00:08 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <878rxeebh6.fsf@gmx.com> Date: Fri, 26 Nov 2021 11:00:05 +0100 In-Reply-To: <878rxeebh6.fsf@gmx.com> (Pierre Langlois's message of "Tue, 23 Nov 2021 21:22:31 +0000") Message-ID: <874k7zb5ju.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) 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 (---) Hi Pierre, Pierre Langlois skribis: > The root of the issue seems to be that the make-guile-static procedure > isn't actually producing a static binary on aarch64. Digging into it > more, we do pass the -all-static flag to libtool, but the gcc command > doesn't actually do any static linking: > > /tmp/guix-build-guile-static-3.0.7.drv-0/guile-3.0.7$ make V=3D1 > ... > ../libtool --tag=3DCC --mode=3Dlink gcc -std=3Dgnu11 -pthread -Wall -W= missing-prototypes -Wpointer-arith -fno-strict-aliasing -fwrapv -fvisibilit= y=3Dhidden -g -O2 -all-static -pthread -ldl -o guile guile-guile.o libguile= -3.0.la -ldl -lcrypt -lm > libtool: link: gcc -std=3Dgnu11 -pthread -Wall -Wmissing-prototypes -Wpoi= nter-arith -fno-strict-aliasing -fwrapv -fvisibility=3Dhidden -g -O2 -pthre= ad -o guile guile-guile.o ./.libs/libguile-3.0.a -L/gnu/store/3539zsmc939g= 1r9g3r02bpy0m1b9v9c8-libgc-8.0.4/lib -L/gnu/store/sn95w7yk9qwxhw74l590606y5= 3pf5mkf-libffi-3.3/lib /gnu/store/3539zsmc939g1r9g3r02bpy0m1b9v9c8-libgc-8.= 0.4/lib/libgc.a -lpthread /gnu/store/sn95w7yk9qwxhw74l590606y53pf5mkf-libff= i-3.3/lib/libffi.a -lunistring -ldl -lcrypt -lm -pthread So =E2=80=98libtool=E2=80=99 is not passing =E2=80=98-static=E2=80=99, righ= t? Why is that? (It does pick .a libs though.) [...] > Doing more digging, I found a reference to a similar issue here: > https://bugzilla.redhat.com/show_bug.cgi?id=3D1830472#c1, this looks > related to the -moutline-atomics option that's enabled by default with > GCC 10. But we're building guile with GCC 7 so it was a bit confusing. > > However, glibc here is actually built with the default GCC 10, and if we > change that then it works! > > --- a/gnu/packages/make-bootstrap.scm > +++ b/gnu/packages/make-bootstrap.scm > @@ -85,6 +85,9 @@ (define glibc-for-bootstrap > `(cons* "--disable-nscd" "--disable-build-nscd" > "--enable-static-nss" > ,flags)))) > + (native-inputs > + `(("gcc" ,gcc-7) > + ,@(package-native-inputs base))) >=20=20 > ;; Remove the 'debug' output to allow bit-reproducible builds (whe= n the > ;; 'debug' output is used, ELF files end up with a .gnu_debuglink,= which I think that=E2=80=99s a reasonable fix for now; you can push the patch. However, we should eventually switch to GCC 10 in make-bootstrap.scm; I don=E2=80=99t think there=E2=80=99s any good justification for sticking to = GCC 7. Thank you! Ludo=E2=80=99. From unknown Fri Aug 08 15:17:55 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Pierre Langlois Subject: bug#52066: closed (Re: bug#52066: [PATCH, core-updates-frozen, RFC] Fix static guile on aarch64) Message-ID: References: <87h7bxd5jp.fsf@gmx.com> <878rxeebh6.fsf@gmx.com> X-Gnu-PR-Message: they-closed 52066 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 52066@debbugs.gnu.org Date: Sat, 27 Nov 2021 14:42:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1638024122-22753-1" This is a multi-part message in MIME format... ------------=_1638024122-22753-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #52066: [PATCH, core-updates-frozen, RFC] Fix static guile on aarch64 which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 52066@debbugs.gnu.org. --=20 52066: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D52066 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1638024122-22753-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 52066-done) by debbugs.gnu.org; 27 Nov 2021 14:42:01 +0000 Received: from localhost ([127.0.0.1]:33350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqyts-0005uf-P9 for submit@debbugs.gnu.org; Sat, 27 Nov 2021 09:42:01 -0500 Received: from mout.gmx.net ([212.227.17.22]:49341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqytq-0005uR-DF for 52066-done@debbugs.gnu.org; Sat, 27 Nov 2021 09:41:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1638024112; bh=7CAezButj5gbHs0vPsrvWcinc8tX5pW+3b9MY+DfYL0=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:In-reply-to; b=EkQY8i2gbeK0fYLlv6zV4KSxlUA6S5Equzw+B/ahLxF99tp04CW1/4GM74mOygJR8 cTcpfDRFxqbSWWOrzolNj3effL8UWapTJxICQmXOShWZr3DZ5ZokkAmKyO4ifJetrI hCs12C4DnvVxVON6fcgYL0g2WKrWr5VwidXcDxYE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MGhyc-1mm54n2pUo-00DsLB; Sat, 27 Nov 2021 15:41:51 +0100 References: <878rxeebh6.fsf@gmx.com> <874k7zb5ju.fsf@gnu.org> User-agent: mu4e 1.6.10; emacs 27.2 From: Pierre Langlois To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#52066: [PATCH, core-updates-frozen, RFC] Fix static guile on aarch64 Date: Sat, 27 Nov 2021 14:34:14 +0000 In-reply-to: <874k7zb5ju.fsf@gnu.org> Message-ID: <87h7bxd5jp.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:VYbjUo6dTcOnhycWXeHu8edsxnKrNwKECeTOg0PgURHmNy+KxIN niFwIAS1iE8p2saAylqSkBHqCQuZQ+XhbNYAOZATA0R01R8C9VckA1QlUiFBBoPZLiyBag9 wNlcT4PNtXI/HHxuYH9Nsqv2PqCCNrX1YSnUjW8NaQFoJ8gyO4pwT/aChx+M5p/ZAWis71x /DmNnS+WBM9LBcbWKcjJw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:p5QJl87BXb0=:fXpKgSGzpUnXIq51YpcxUz nQAfqiTEzZmy1jsmN6jqMyKGwLkzgIDibc1RUycQ79Bf1kAvp1w9/Ee7VEjnn5nAUUB1NRDin qALt3aES174vSf+mt4UpQ729PVR83ZcsZYyGrLU8CGHdFNr46tAMYWDzuaBNKgTG7sBUXwZkl DSOZfD8ENCufMwrK3BcmHD3s65ks6kEaAG7/0luKGFmMbToY2KZBGcugBghPdmx5854CSaJA4 HdsiKbt+A8OgiOmJdWUihMhkj1JsuXwztyciZq/Mq3ldfNz6JuCZeybhp8eFKsZfYF5WZ3si/ PQgT38QYdcNFkStxWlnT0YeDVjqXdlgzdAvWaP0colUpvUEb62C/5IhHAHWmysM1/25WjKkki DJvK1wOvnactvnkT4Ka55KNPuRUHLqeccArrUFwVMsHjhVZlbH4reE8oRXX697I/G51K1LHbt 46Myp7Xhz53p/ZA116MoJKsJiPHvg/kZ7L1y25SUG5iklNgB9QmmsE4snNFSt+MAYtjFTIvjk LQ8CaqbEdnux45gTw7B1tVczpvhwWn8VToX0Cc7QS18YTQ6SDIA4Hm7dZLL0HsYye7AM1XJ4d VG1fTSjlUjMZzTXCHP13UkVriK4PcQ+DYhrNGmbQRcit3SFuEJ5A/VjTNAdgz9D5ZrfbUKV5I GQBVicSeY+Ktgo5olNelzJENadWQBuWsXFOIKZcGLlHrUIiVHlI/VVUHNw37zbJZpwpoAJsww tpog75IlO+5HM4v1VLOUxqsAOmg/K9OqSvES4bwTS8acwfAnTgx8OMCFy/WBSeg/H+DbanXzT WEezRddtbX5Ddgyqdohwtiq3kwZy45x7xkvfQ37ZKRIRokqtR3Zfdljoyg3qdFbgdoI6oLmhm XUvNLnFBy8Hs2dApmuDqp3hlihBFaGrXOLbn6j8+v/2DxAQrHih9vwONiIEUA+uyRbgnFM+RV PmzOFZFqfus2wxD0RtLWcPunbLkcxKrUFE6C9iEZTrfX9MrLy1MJfR1A2aFYkE4y2o5uQH8a/ nvwfHvuCdt4WNOaINqRJxXsbcUNVt8gj1bWe6YzBLzaYrUfyLLX2fGbbq1KgJP2Uzc97vJZVD FFzL4Ko78ECndI= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 52066-done Cc: 52066-done@debbugs.gnu.org, Pierre Langlois 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 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo', Ludovic Court=C3=A8s writes: > Hi Pierre, > > Pierre Langlois skribis: > >> The root of the issue seems to be that the make-guile-static procedure >> isn't actually producing a static binary on aarch64. Digging into it >> more, we do pass the -all-static flag to libtool, but the gcc command >> doesn't actually do any static linking: >> >> /tmp/guix-build-guile-static-3.0.7.drv-0/guile-3.0.7$ make V=3D1 >> ... >> ../libtool --tag=3DCC --mode=3Dlink gcc -std=3Dgnu11 -pthread -Wall -= Wmissing-prototypes -Wpointer-arith -fno-strict-aliasing -fwrapv -fvisibili= ty=3Dhidden -g -O2 -all-static -pthread -ldl -o guile guile-guile.o libguil= e-3.0.la -ldl -lcrypt -lm >> libtool: link: gcc -std=3Dgnu11 -pthread -Wall -Wmissing-prototypes >> -Wpointer-arith -fno-strict-aliasing -fwrapv -fvisibility=3Dhidden -g -O2 >> -pthread -o guile guile-guile.o ./.libs/libguile-3.0.a >> -L/gnu/store/3539zsmc939g1r9g3r02bpy0m1b9v9c8-libgc-8.0.4/lib >> -L/gnu/store/sn95w7yk9qwxhw74l590606y53pf5mkf-libffi-3.3/lib >> /gnu/store/3539zsmc939g1r9g3r02bpy0m1b9v9c8-libgc-8.0.4/lib/libgc.a -lpt= hread >> /gnu/store/sn95w7yk9qwxhw74l590606y53pf5mkf-libffi-3.3/lib/libffi.a >> -lunistring -ldl -lcrypt -lm -pthread > > So =E2=80=98libtool=E2=80=99 is not passing =E2=80=98-static=E2=80=99, ri= ght? Why is that? (It does > pick .a libs though.) Yeah, I'm also confused about that. I did take a quick look at the libtool sources but I couldn't work out what was happening. My best guess is that it tries to use the -static flag and fails, but it prefer to drop the flag rather than issue an error. It could be for backwards compatiblity reasons. > > [...] > >> Doing more digging, I found a reference to a similar issue here: >> https://bugzilla.redhat.com/show_bug.cgi?id=3D1830472#c1, this looks >> related to the -moutline-atomics option that's enabled by default with >> GCC 10. But we're building guile with GCC 7 so it was a bit confusing. >> >> However, glibc here is actually built with the default GCC 10, and if we >> change that then it works! >> >> --- a/gnu/packages/make-bootstrap.scm >> +++ b/gnu/packages/make-bootstrap.scm >> @@ -85,6 +85,9 @@ (define glibc-for-bootstrap >> `(cons* "--disable-nscd" "--disable-build-nscd" >> "--enable-static-nss" >> ,flags)))) >> + (native-inputs >> + `(("gcc" ,gcc-7) >> + ,@(package-native-inputs base))) >>=20=20 >> ;; Remove the 'debug' output to allow bit-reproducible builds (wh= en the >> ;; 'debug' output is used, ELF files end up with a .gnu_debuglink= , which > > I think that=E2=80=99s a reasonable fix for now; you can push the patch. > > However, we should eventually switch to GCC 10 in make-bootstrap.scm; I > don=E2=80=99t think there=E2=80=99s any good justification for sticking t= o GCC 7. > > Thank you! Thanks! I just pushed it with as 48b754553aeb98660fe145633616a9d965fbd60e. Pierre --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmGiQ6sYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UzoEH/A+/ulDPKetjRHYUMTXP6hNm lX/Xc8Reb1bKr1w77RUI2fuMezasuK3ctIlZT8PYQ8xG0I0cPlQPSeyufUIGe+4Z 8FJdahtt87cW0v/oE0ksbBtXNzT/RjzapzXyVICErF1fz3nDPcdTDgByD4LWAMYn XX07UU8cFdZFMArmhAdF+BHi0/MWLU8lmqrkIQHOnYKYleVP5Q4JezMJNw5H0uPS Nyu1Uu0GcSjTlOmB/+2ujWHyxwOn1pMsNpyXI6ZhVi1yeRgf4xyfjcep916M1BdC NhF7zgWq7K0ncLSmIdP0wW4BjQRsvRrEMSRULu2T6eORG6vMUKPvrMB9nJKXduA= =42hE -----END PGP SIGNATURE----- --=-=-=-- ------------=_1638024122-22753-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Nov 2021 22:47:14 +0000 Received: from localhost ([127.0.0.1]:52436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpeZG-0000Ns-0l for submit@debbugs.gnu.org; Tue, 23 Nov 2021 17:47:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:35494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpeZB-0000Nh-Ip for submit@debbugs.gnu.org; Tue, 23 Nov 2021 17:47:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpeZB-0004Kc-9f for guix-patches@gnu.org; Tue, 23 Nov 2021 17:47:09 -0500 Received: from mout.gmx.net ([212.227.17.20]:46577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpeZ8-0003ZE-Qf for guix-patches@gnu.org; Tue, 23 Nov 2021 17:47:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1637707623; bh=P3XNZtcTEzjpFZjlAiCWNkYwmaD5Bc0VlU0C8vicMWM=; h=X-UI-Sender-Class:From:To:Subject:Date; b=IMuVUoNi+JN8V5Dl1Ryp6pmTyoOH+72r8slGMlhus3Fhz1dKA9B788Vi8P0i6Soxw B0jFWnJoFz1QjVx7zLz/58kCs0Zc2NUooLsZTs1aT8ubgx/ULnoxFoDqQ3NJoXC+Wm Rozh0MgkZ484TUL41MwzYYiufyO3tAhiAojVoPoE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MyKHc-1mQQcE3lc4-00yenu for ; Tue, 23 Nov 2021 23:47:03 +0100 User-agent: mu4e 1.6.10; emacs 27.2 From: Pierre Langlois To: guix-patches@gnu.org Subject: [PATCH, core-updates-frozen, RFC] Fix static guile on aarch64 Date: Tue, 23 Nov 2021 21:22:31 +0000 Message-ID: <878rxeebh6.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:kJyZaaKbtMQ8oWXrfb2wRpp0sJjb7EKXp9eF6QgLD4kBK3AyEjZ SshzooRSocLtM1JybesaWu6TvRd/Vr7ZxM3P0WErnm4qWTPBC62CSpSeR6i5vRtO2ZXCBqX Y3lLFeIJxup/+53Yy9TNDBeZN3hXNgaMDzOHua1QjN39AKc83yRP/huI6DwBoExDffSF93y QhtH+mFYJ8z8A9Uig6TQA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ID7vJ/sa7Y0=:ZznK03hwXFiNfZ5c8rBta6 5JylDDCVqTk5IG4GThLQI3vQn7p8t8H4xEzxidCC97PLTQvnmiWUJNEqHDosbRru7UM7lmLMe UfZmEwsGMTAbwkED/sDwNVsNoQsTVVdbZRwvhY95pR4n3ERnCLGPzq5ajQK3JH4sCWRaWVYiT MBIexX7d6TCEhTGlE38yVm0D+hiw13zJXAi1vz58w0wv4z5HtOyVxi+sPFDp1NwSv6+Yw0f8p dPMZ7G87LQ9YUr6lHSMep7CE7GPJuwoD8Md/h6CXiib5PhrGdPtncLjZTqVDqu2G4jpxBX74Y j7A1VeHFC8nDvS8ePwHRXMf5n6ZgAT1WeDj6ZMlnasK0iz/7UXjPY7/rlP3o4b7ln8ZXTlDO7 7Naf7fd6nSloEILWZPHfpGj45Qp59QGtUOG9Nb6SB+7dAPFlZ7m+VuRujnRM9ihDi8qvj3Kzm prwqcmxJpttlEv2rncXxeoX/hLYmw9fUo0OtHNOgXhTJLaR88sd6yyFM6KGOxA6aUBAY9yD/e pQTaZAm4KYjrxRy5y8VMjXDQU/1Tkkr+YI25Rj9MNjl13LjfU0Gabstxoa2kxJwHrc8wPXlQB cU+Z64qDWslt4bTbfzzOb+ETfyhgtNftUFQSLdEC61xAnxsP2fx03NuIRtUw+65VOrSGsqJJ8 f7uc4zN45WLHtDASe1yijDpnQedY6uIRtQg1PtohNrovI3dwQPG2dOlQn22dkskmTKxD+YbEs 46N/odpMats+5d1xtXu0Ll+03Bb5yQ4lb8adI/98Om4NTMjTE44P+iEmi1tzJXqIdJN12Vtco BW+ZLVzEKZxPWJW0sjJ7hy0SPrwi6bUx59tP2BV0ymiGPnIXt9nVW0781gKjgPIyG3CM3KZdV WCRA/um+NtDlOJ2WQQSHSJXi0pYDTshnKUAlcZsAJXrc1K5DCXFEw7HllLrQcmRlGK+MqJhBD 7HeDtgslIAGRb2FhB1JZ3AK+wCnHKrmbt8wG7CJ9kIwNE9xRUpL787SMqg5hGVJCjMzfZURHc X7ovA2mF+xRscV7YbkPmKKlBQOP2KIN2sEz99tiBnhBQ8ibFbGKxaML2pk2bv5GkIS1S8ADMZ iSSIFgYoQ3WQdc= Received-SPF: pass client-ip=212.227.17.20; envelope-from=pierre.langlois@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit 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: -2.4 (--) --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Guix! With the recent call for testing on core-updates-frozen I thought I'd test my router configuration on the RockPro64 and I saw that building the stripped static guile for initrd didn't build. I found a fix but I'm not 100% sure it's correct, so beware, here's my debugging session! %guile-static-stripped fails to build as such: =2D-8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build -e '(@ (gnu packages make-bootstrap) %guile-sta= tic-stripped)' ... Backtrace: 1 (primitive-load "/gnu/store/gz31w23fjaipnm9c9hzw6p8s619?") In guix/build/utils.scm: 761:6 0 (invoke "/gnu/store/9rwp8z98xdllih5rzf2ncq25xhnkgcvq-g?" ?) guix/build/utils.scm:761:6: In procedure invoke: ERROR: 1. &invoke-error: program: "/gnu/store/9rwp8z98xdllih5rzf2ncq25xhnkgcvq-guile-static-st= ripped-3.0.7/bin/guile" arguments: ("--version") exit-status: 127 term-signal: #f stop-signal: #f =2D-8<---------------cut here---------------end--------------->8--- The stripped guile crashes, and if we check it, it's actually not a static binary! So when stripping out store references we break it of course: =2D-8<---------------cut here---------------start------------->8--- $ file /gnu/store/9rwp8z98xdllih5rzf2ncq25xhnkgcvq-guile-static-stripped-3.= 0.7/bin/guile /gnu/store/9rwp8z98xdllih5rzf2ncq25xhnkgcvq-guile-static-stripped-3.0.7/bin= /guile: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee= -glibc-2.33/lib/ld-linux-aarch64.so.1, for GNU/Linux 2.6.32, stripped ^^^^^^^^ Oups :-) =2D-8<---------------cut here---------------end--------------->8--- The root of the issue seems to be that the make-guile-static procedure isn't actually producing a static binary on aarch64. Digging into it more, we do pass the -all-static flag to libtool, but the gcc command doesn't actually do any static linking: =2D-8<---------------cut here---------------start------------->8--- /tmp/guix-build-guile-static-3.0.7.drv-0/guile-3.0.7$ make V=3D1 ... ../libtool --tag=3DCC --mode=3Dlink gcc -std=3Dgnu11 -pthread -Wall -Wmi= ssing-prototypes -Wpointer-arith -fno-strict-aliasing -fwrapv -fvisibility= =3Dhidden -g -O2 -all-static -pthread -ldl -o guile guile-guile.o libguile-= 3.0.la -ldl -lcrypt -lm libtool: link: gcc -std=3Dgnu11 -pthread -Wall -Wmissing-prototypes -Wpoint= er-arith -fno-strict-aliasing -fwrapv -fvisibility=3Dhidden -g -O2 -pthread= -o guile guile-guile.o ./.libs/libguile-3.0.a -L/gnu/store/3539zsmc939g1r= 9g3r02bpy0m1b9v9c8-libgc-8.0.4/lib -L/gnu/store/sn95w7yk9qwxhw74l590606y53p= f5mkf-libffi-3.3/lib /gnu/store/3539zsmc939g1r9g3r02bpy0m1b9v9c8-libgc-8.0.= 4/lib/libgc.a -lpthread /gnu/store/sn95w7yk9qwxhw74l590606y53pf5mkf-libffi-= 3.3/lib/libffi.a -lunistring -ldl -lcrypt -lm -pthread =2D-8<---------------cut here---------------end--------------->8--- And if we try and do a static link anyway, it doens't work because of missing references related to atomic ops. My guess is that libtool tried to statically link, and fell back to dynamic linking when that didn't work, I'm not so sure. =2D-8<---------------cut here---------------start------------->8--- /tmp/guix-build-guile-static-3.0.7.drv-0/guile-3.0.7/libguile$ gcc -std=3Dg= nu11 -pthread -Wall -Wmissing-prototypes -Wpointer-arith -fno-strict-aliasi= ng -fwrapv -fvisibility=3Dhidden -g -O2 -pthread -o guile guile-guile.o ./= .libs/libguile-3.0.a -L/gnu/store/3539zsmc939g1 r9g3r02bpy0m1b9v9c8-libgc-8.0.4/lib -L/gnu/store/sn95w7yk9qwxhw74l590606y53= pf5mkf-libffi-3.3/lib /gnu/store/3539zsmc939g1r9g3r02bpy0m1b9v9c8-libgc-8.0= .4/lib/libgc.a -lpthread /gnu/store/sn95w7yk9qwxhw74l590606y53pf5mkf-libffi= -3.3/lib/libffi.a -lunistring -ldl -lcrypt -lm -p thread -static=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ld: ./.libs/libguile-3.0.a(libguile_3.0_la-dynl.o): in function `scm_dlopen= ':=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 /tmp/guix-build-guile-static-3.0.7.drv-0/guile-3.0.7/libguile/dynl.c:78: wa= rning: Using 'dlopen' in statically linked applications requires at runtime= the shared libraries from the glibc version used for linking=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 ld: ./.libs/libguile-3.0.a(libguile_3.0_la-posix.o): in function `scm_tmpna= m':=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 /tmp/guix-build-guile-static-3.0.7.drv-0/guile-3.0.7/libguile/posix.c:1611:= warning: the use of `tmpnam' is dangerous, better use `mkstemp'=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 ld: /gnu/store/b05hb686wamq78d5jzpisns9xdx6nkp2-glibc-2.33-static/lib/libc.= a(abort.o): in function `abort':=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 (.text.unlikely+0x34): undefined reference to `__aarch64_cas4_acq'=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 ld: (.text.unlikely+0xa0): undefined reference to `__aarch64_swp4_rel'=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 ld: (.text.unlikely+0xe4): undefined reference to `__aarch64_cas4_acq'=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 ld: /gnu/store/b05hb686wamq78d5jzpisns9xdx6nkp2-glibc-2.33-static/lib/libpt= hread.a(pthread_create.o):(.text+0x5c): undefined reference to `__aarch64_c= as4_acq'=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ld: /gnu/store/b05hb686wamq78d5jzpisns9xdx6nkp2-glibc-2.33-static/lib/libpt= hread.a(pthread_create.o):(.text+0x1fc): undefined reference to `__aarch64_= cas4_acq'=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ld: /gnu/store/b05hb686wamq78d5jzpisns9xdx6nkp2-glibc-2.33-static/lib/libpt= hread.a(pthread_create.o):(.text+0x29c): undefined reference to `__aarch64_= cas4_acq'=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ... =2D-8<---------------cut here---------------end--------------->8--- Doing more digging, I found a reference to a similar issue here: https://bugzilla.redhat.com/show_bug.cgi?id=3D1830472#c1, this looks related to the -moutline-atomics option that's enabled by default with GCC 10. But we're building guile with GCC 7 so it was a bit confusing. However, glibc here is actually built with the default GCC 10, and if we change that then it works! =2D-8<---------------cut here---------------start------------->8--- =2D-- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -85,6 +85,9 @@ (define glibc-for-bootstrap `(cons* "--disable-nscd" "--disable-build-nscd" "--enable-static-nss" ,flags)))) + (native-inputs + `(("gcc" ,gcc-7) + ,@(package-native-inputs base))) =20 ;; Remove the 'debug' output to allow bit-reproducible builds (when = the ;; 'debug' output is used, ELF files end up with a .gnu_debuglink, w= hich =2D-8<---------------cut here---------------end--------------->8--- I'm not 100% sure what's going on, there seems to be an incompatiblity between GCC 7 and 10, but I don't know if this is a bug or if it's working as intended. I have a feeling statically linking the libc with different compiler version might just not be supported, but it works in practise a lot of the time. Does this make sense? Do you think the following patch would be the right way to fix this? Thanks! Pierre --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmGdb2UYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UQGQH/iLPGyFADQ5f3fCC/A8waA2Z N0kDe1PCST69FGjwOX8QZSgL25dl+QmEduiZ2/Zz+sKQRMc7cBkfHkW/HtUvII6i KwwCUjR52Z2g3OxPosnbFo9EZkhDgXFGsg8BtmPmjmY+hHKw9rJPIWw7yUmZrk0a +YL1tAYu/eFvORZSLrEP+95wZqqS8kSNGSEN7iC6kMaGeb1xCuJOH2Cv5bA1D0He 7QidpDr9HVe47sqk6PYOhmCxm8/wrnIL6Hj0T3J7WrByhWLWFmb1hexuCrBEmz+G FB11vS38ZGPMe3RN+ojrfaDxXmUJPlT7X6ax9n4QNChw4ljBLrS3rHQQYiM+Llc= =aeET -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-glibc-for-bootstrap-Build-with-GCC-7.patch Content-Transfer-Encoding: quoted-printable =46rom c1f61c161b3f5f7e8430c4925b0785d3819e255e Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 23 Nov 2021 22:41:20 +0000 Subject: [PATCH] gnu: glibc-for-bootstrap: Build with GCC 7. * gnu/packages/make-bootstrap.scm (glibc-for-bootstrap)[native-inputs]: Add gcc-7. =2D-- gnu/packages/make-bootstrap.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap= .scm index 267adde48c..d8f1f0eb1e 100644 =2D-- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -86,6 +86,12 @@ (define glibc-for-bootstrap "--enable-static-nss" ,flags)))) + ;; Make sure to build glibc with the same compiler version with the= rest + ;; of the bootstrap. Otherwise it fails to statically link on aarc= h64. + (native-inputs + `(("gcc" ,gcc-7) + ,@(package-native-inputs base))) + ;; Remove the 'debug' output to allow bit-reproducible builds (when= the ;; 'debug' output is used, ELF files end up with a .gnu_debuglink, = which ;; includes a CRC of the corresponding debugging symbols; those sym= bols =2D- 2.34.0 --=-=-=-- ------------=_1638024122-22753-1--