From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YK+gIm+woGHo8gAAgWs5BA (envelope-from ) for ; Fri, 26 Nov 2021 11:01:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cAReHm+woGHwFwAAB5/wlQ (envelope-from ) for ; Fri, 26 Nov 2021 10:01:19 +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 A713A36A0F for ; Fri, 26 Nov 2021 11:01:18 +0100 (CET) Received: from localhost ([::1]:50196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqY2f-00077f-Gh for larch@yhetil.org; Fri, 26 Nov 2021 05:01:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqY2Q-00077T-5S for guix-patches@gnu.org; Fri, 26 Nov 2021 05:01:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47182) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mqY2P-0000u6-T8 for guix-patches@gnu.org; Fri, 26 Nov 2021 05:01:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mqY2P-000247-QH for guix-patches@gnu.org; Fri, 26 Nov 2021 05:01:01 -0500 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-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=1637920878; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: 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=8JVPrXc1wT0yKgUHZtVMeTUJ15hINKuFEuyC6yseygo=; b=CxKPu6sXzG9LCiiQIWsh4cOr/KCqR+IdOYOiNhGyI+lbMpgFgLh8oM7f+2JSiGpzvUnGud z6orVVXosFqWZeOr/WZPmJgwUsgfnBJvvYO46iaBQZKws/uY6vaFEr+mojPsv+xRXLmBqu /syyfGmRuDdsnL7xbvdUoSZxwteP/KsSp7MG/42XWQ2EEohI0p7BGTvGDp6WjA7Es7NIrn jxvaGcn1Gj8pse5kckXnG7wG08WycwXurxju+nJ9G60vf+hnCIaroBLsZGkbcea2DsAUWa fv3OcRabS6QY3VbM6SZPRo1qmvad2WX90L/bMGiuhwMbRdGiVsilQQAWjuUg+g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637920878; a=rsa-sha256; cv=none; b=CxK69UWXjBuTTLGRfdsNtWnzu145yRjETgjJF6d+t1tVGt18ZHPtWFWO+z/3Ld7YlncBH5 7YBAlhpXw/K3UblfLGDAph27MFe+FEgVEggcaNsKY0o1MLE3R8GZn5Ji5aqJKq/BrKGw3u V71rLBrvGbi/pwpFM6lIjYWSthHYPuh7GoPp4qGMPnBbseoNheax9JJHe9U2hbj3DdQ77H FUK/NK5IMuplCEiCOu8QxvIe4fXpgvvsT/KsaKZ2wzI56AgDhPfQYIhmNdbIRKhv9097B2 0uvJvaVCzC5mVbdIvFOZooDq6wpXM8eiX96ps9nqTcK2Wizg/RSydOYJ+RTfpQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Hao4a9My; dmarc=pass (policy=none) header.from=gnu.org; 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.60 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Hao4a9My; dmarc=pass (policy=none) header.from=gnu.org; 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: A713A36A0F X-Spam-Score: -3.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0RfHhHqMJlRi 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.