From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UAh/MsZDomH/awAAgWs5BA (envelope-from ) for ; Sat, 27 Nov 2021 15:42:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +MkKLsZDomHlFQAAbx9fmQ (envelope-from ) for ; Sat, 27 Nov 2021 14:42:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5350718F5F for ; Sat, 27 Nov 2021 15:42:14 +0100 (CET) Received: from localhost ([::1]:46582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqyu5-0000ZG-18 for larch@yhetil.org; Sat, 27 Nov 2021 09:42:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqytx-0000YG-JF for guix-patches@gnu.org; Sat, 27 Nov 2021 09:42:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50040) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mqytv-00009c-9B for guix-patches@gnu.org; Sat, 27 Nov 2021 09:42:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mqytu-0005v4-Sd for guix-patches@gnu.org; Sat, 27 Nov 2021 09:42:02 -0500 Subject: bug#52066: [PATCH, core-updates-frozen, RFC] Fix static guile on aarch64 Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Sat, 27 Nov 2021 14:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 52066 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 52066-done@debbugs.gnu.org, Pierre Langlois Mail-Followup-To: 52066@debbugs.gnu.org, pierre.langlois@gmx.com, pierre.langlois@gmx.com Received: via spool by 52066-done@debbugs.gnu.org id=D52066.163802412122738 (code D ref 52066); Sat, 27 Nov 2021 14:42:02 +0000 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 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-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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638024134; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-to:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=KZJ8TUdusW7BMKPofDK2iDRdI6tZspkrkILi2YNMcM8=; b=sIx/sSFvtNA82Yo9zy5IdaMUiXxtimASVLfSZqZoTXxpHiaoIICxUtXlqUIAGCu/raL+kI xn/t67KNGQ3g3pepdKEhBOL6KThgaAEunk4gV1R9stqIDNT+aMCNianbdhAZkC+xWrGd6a 4mumwn48A9EUWaeJK0buKwmpaxc4hcwjnWW8KDWvss1whdAW1jqeUf+43ZgxCFtlnPNc22 NesBJminfiEF2M6g4b5KMvyHSF3/Lu+PusP0Zprhw9ug7yhLCdPlDYwwfefa6ctvsSDIzQ 49I4zFA02K5gMVGpKdlCT9MXN5hzaO5t+tcYICiI8hDaO79KONx6XjvxGpxsZA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638024134; a=rsa-sha256; cv=none; b=q5nB7Bdlutv+HnYdf2hG+yH2j9mPrISlgwCUplrMnjj1ECaGsLfUJZBbcbhzX4D/37fBUu Cv4Xlv3e5hyiRBogCD+CK3PjJjlHEew44Ue/Nx3tubMM9vRlVWm4RAtdo/xtEHbTQzJKAm lJSf7tYJlz6k+xtYd63RitRjPwKBPFQO1CZvPsxXQf27JHTAC108S4o0r4sIyOGRMkR5LE k7HFQc9XrVHeKGrQsoIyh8GtCKWKFwhCrFYZCM9U2hKmZoVFLOJC3TraBYw2hetPndFuxI 6nLRcby3jXdVAUMoiyAluMXgbHsOAk7yom6UxdtDiZOZjXdhhqJZ3rarQqn/OA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=EkQY8i2g; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.91 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=EkQY8i2g; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5350718F5F X-Spam-Score: -3.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: AgeHBUe58X/n --=-=-= 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----- --=-=-=--