From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iGmdGzxOt2DK5QAAgWs5BA (envelope-from ) for ; Wed, 02 Jun 2021 11:24:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 0EnoFjxOt2CWZgAA1q6Kng (envelope-from ) for ; Wed, 02 Jun 2021 09:24:12 +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 D8D75B030 for ; Wed, 2 Jun 2021 11:24:10 +0200 (CEST) Received: from localhost ([::1]:58280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loN6f-0000nD-Gf for larch@yhetil.org; Wed, 02 Jun 2021 05:24:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loN60-0007k8-KP for help-guix@gnu.org; Wed, 02 Jun 2021 05:23:28 -0400 Received: from flashner.co.il ([178.62.234.194]:33210) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loN5y-00068y-AP for help-guix@gnu.org; Wed, 02 Jun 2021 05:23:28 -0400 Received: from localhost (unknown [31.210.177.125]) by flashner.co.il (Postfix) with ESMTPSA id 11AF240336; Wed, 2 Jun 2021 09:23:24 +0000 (UTC) Date: Wed, 2 Jun 2021 12:22:48 +0300 From: Efraim Flashner To: Thiago Jung Bauermann Subject: Re: Build Mesa with a different toolchain version Message-ID: Mail-Followup-To: Thiago Jung Bauermann , help-guix@gnu.org References: <3126247.iAZJFXckTJ@popigai> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="j0RN92pKAcGhZ379" Content-Disposition: inline In-Reply-To: <3126247.iAZJFXckTJ@popigai> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622625851; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=GdNDIFx/P/CfA0Z3FwkzD7VY+Gf0+XLbGw5AAfOlCXE=; b=hkB/t8+NqVT8LK6ymUD7xlspE0ve9eBW+9iuUVnCftp1L3efjYyU4bpppZrfpQCGoT9bLf XyVjo9UUTSiESeCdWoSMClXK2EzMPPrXjKwRv+/SYJJGWtY2EoWirw7XyyiPXXeq/3IcLK dm8poWKrahpzCtOOOR/cvECz2r6V8q7JwOCyPRef1Q4whYEurFHn0+R3IDb8nj9E4sdrP7 g6kkXiIwQ0q0Ss3/6gvGClE6r34Ji+AAQGwAS7GOvorQPxKQw92kwY4XDwfhu9lTSDSuLu TrD/AVZEvrnKk/nMBKYQfi4jsmMzW8M6cj2g8FxYAmCr9TpUeEdi6NfzaTS4Hw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622625851; a=rsa-sha256; cv=none; b=WKJDHTIr/KY2ZIVuuHMdPIA+A/4LpwDiMF8bWfwih1yRypkLGamy/erW179OVAseiwcpc+ RwSQ/hQJ6foW1NrRVbQlGobdAjp/SrNq3NrgSpQksqqmEv+S96pi2NPXv6oxaxOss5I1qH ubrPlLSXFjJF/tXwKc36qI34Y54rqFJYPpePHKgPknVsbeXHCDMXteBkxzoknjaQSOCSvs WBqHCw+EozMtatYhekf0KuNbJN/BPPhXVEf78+wztb6ewR5mmj6XkawxniYzgwO/eUyxt8 UVxwQrMGiFMp9fPTkI2o1evPRKJx11V0XXmzO8GvIVeclQ9qhSS7epHBJAiFbQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -4.03 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: D8D75B030 X-Spam-Score: -4.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: Z0q+m08NX1IM --j0RN92pKAcGhZ379 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 01, 2021 at 09:46:56PM -0300, Thiago Jung Bauermann wrote: > Hello, >=20 > I'm having and issue with Mesa on i686-linux which I suspect is caused by > the version of GCC used to build it (i.e. 7.5.0). >=20 > To test my theory, I'm trying to build Mesa with a newer version of the > compiler. I tried a few different things, but none worked. I would be > grateful if someone could help me figure out how to do this: >=20 > Try #1: >=20 > $ guix build --system=3Di686-linux \ > --with-input=3Dgcc-toolchain=3Dgcc-toolchain@10.3.0 mesa I believe you have the wrong command here. What you want is $ guix build --system=3Di686-linux \ --with-c-toolchain=3Dmesa=3Dgcc-toolchain@10 mesa $ guix gc --references /gnu/store/8klhnfd8a5syhfl3bj2zqc06fvxiqdwa-mesa-20.= 2.4 | grep gcc /gnu/store/nyxr5cb88x18mnhj88zkd9yisdlnxhl2-gcc-toolchain-10.3.0 /gnu/store/rgj02zlyqrg7ygcynwv8w35nc5czxi9l-gcc-10.3.0-lib $ guix environment --ad-hoc gcc-toolchain -- ldd /gnu/store/8klhnfd8a5syhfl= 3bj2zqc06fvxiqdwa-mesa-20.2.4/lib/libOSMesa.so.8.0.0 | grep gcc libstdc++.so.6 =3D> /gnu/store/rgj02zlyqrg7ygcynwv8w35nc5czxi9l-gcc= -10.3.0-lib/lib/libstdc++.so.6 (0x00007ff4c0b28000) libgcc_s.so.1 =3D> /gnu/store/rgj02zlyqrg7ygcynwv8w35nc5czxi9l-gcc-= 10.3.0-lib/lib/libgcc_s.so.1 (0x00007ff4c09cb000) > [=E2=80=A6] > successfully built /gnu/store/bg01dw0178yb7v9xr4zmq5f05200f2ql-mesa-20.2.= 4.drv > /gnu/store/mvy7pl73yqrd9pi3k3xq14i6dmnfbl8s-mesa-20.2.4-bin > /gnu/store/ii8fbly1s19qwpnwv002fd2pxk2h96ba-mesa-20.2.4 >=20 > So aparently it worked. But when checking the libraries, they still > link to GCC 7.5.0. >=20 > $ ldd /gnu/store/ii8fbly1s19qwpnwv002fd2pxk2h96ba-mesa-20.2.4/lib/libOSMe= sa.so.8.0.0 | grep gcc=20 > libstdc++.so.6 =3D> /gnu/store/1527570cy2g7ld4wppmh3skvi27kvm43-g= cc-7.5.0-lib/lib/libstdc++.so.6 (0xf51d9000) > libgcc_s.so.1 =3D> /gnu/store/1527570cy2g7ld4wppmh3skvi27kvm43-gc= c-7.5.0-lib/lib/libgcc_s.so.1 (0xf50b9000) >=20 > And surprisingly, when changing the requested gcc-toolchain version, > guix doesn't attempt to build anything and just returns the same > store items from the =E2=80=9C10.3.0=E2=80=9D build: >=20 > $ guix build --system=3Di686-linux --with-input=3Dgcc-toolchain=3Dgcc-too= lchain@11.1.0 mesa > /gnu/store/mvy7pl73yqrd9pi3k3xq14i6dmnfbl8s-mesa-20.2.4-bin > /gnu/store/ii8fbly1s19qwpnwv002fd2pxk2h96ba-mesa-20.2.4 >=20 > Try #2: >=20 > Next, I tried using =E2=80=98package-input-rewriting=E2=80=99 by putting = the following > package definition in a channel I created locally (with the appropriate > =E2=80=98#:use-module=E2=80=99 directives at the top): >=20 > ``` > (define gcc->gcc-10 > (package-input-rewriting `((,gcc . ,gcc-10) > (,(make-libstdc++ gcc) . ,(make-libstdc++ gc= c-10))))) >=20 > (define-public mesa-10 > (package > (inherit (gcc->gcc-10 mesa)) > (name "mesa-10"))) > ``` >=20 > And then: >=20 > $ guix pull && guix build --system=3Di686-linux mesa-10 > [=E2=80=A6] > successfully built /gnu/store/g4j9kmxgp6lashyipcydn7i6vh2v4s3c-mesa-10-20= =2E2.4.drv > /gnu/store/8iiwn9cnjlfxfi7m1fmdavzgr7y38vv7-mesa-10-20.2.4-bin > /gnu/store/hjci6cqw76hvdawdl04kjmbajklsdwx2-mesa-10-20.2.4 >=20 > And unfortunately I saw many GCC 7.5.0 processes in the build, for example > (command line abridged because it's too big): >=20 > $ pgrep -u guixbuilder01 -a -f cc1 > 119240 /gnu/store/=E2=80=A6-gcc-7.5.0/libexec/gcc/i686-unknown-linux-gnu/= 7.5.0/cc1 [=E2=80=A6] >=20 > And indeed, still linked to GCC 7.5.0 libraries: >=20 > $ ldd /gnu/store/hjci6cqw76hvdawdl04kjmbajklsdwx2-mesa-10-20.2.4/lib/libO= SMesa.so.8.0.0 | grep gcc > libstdc++.so.6 =3D> /gnu/store/1527570cy2g7ld4wppmh3skvi27kvm43-g= cc-7.5.0-lib/lib/libstdc++.so.6 (0xf51ff000) > libgcc_s.so.1 =3D> /gnu/store/1527570cy2g7ld4wppmh3skvi27kvm43-gc= c-7.5.0-lib/lib/libgcc_s.so.1 (0xf50df000) >=20 > Also tried using GCC 11 by doing `s/-10/-11/g` in the code I quoted above > and building again: >=20 > $ guix build --system=3Di686-linux mesa-11 > [=E2=80=A6] > successfully built /gnu/store/vnmwibfpsw3fkm7q7y6z4r5273ri4qra-mesa-11-20= =2E2.4.drv > /gnu/store/w5l307c1vnsik5h1zd9bcjzld2yp6xyl-mesa-11-20.2.4-bin > /gnu/store/l98bxwa5psb3yx56hhb78zr043s10p7q-mesa-11-20.2.4 >=20 > At least this time it redoes the build instead of just returning the same > store items, but I still see the GCC 7.5.0 processes during the build: >=20 > $ pgrep -u guixbuilder01 -a -f cc1 > 127514 /gnu/store/=E2=80=A6-gcc-7.5.0/libexec/gcc/i686-unknown-linux-gnu/= 7.5.0/cc1 [=E2=80=A6] >=20 > And again, linked with GCC 7.5.0 libraries: >=20 > $ ldd /gnu/store/l98bxwa5psb3yx56hhb78zr043s10p7q-mesa-11-20.2.4/lib/libO= SMesa.so.8.0.0 | grep gcc > libstdc++.so.6 =3D> /gnu/store/1527570cy2g7ld4wppmh3skvi27kvm43-g= cc-7.5.0-lib/lib/libstdc++.so.6 (0xf51e4000) > libgcc_s.so.1 =3D> /gnu/store/1527570cy2g7ld4wppmh3skvi27kvm43-gc= c-7.5.0-lib/lib/libgcc_s.so.1 (0xf50c4000) >=20 > --=20 > Thanks, > Thiago >=20 >=20 >=20 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --j0RN92pKAcGhZ379 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmC3TeUACgkQQarn3Mo9 g1Gq/g/+PVJ0f652pqgx+bVlVLVQaFzpZR780iqvs7u40U3UPwDwYBfhxZzD/Tsf 3lK2Am3wPhTFq1vOAvwsWOcnxEHDlgOhQz6as9Ba6QTavW5gvXuRAJTn9ok0EN1W btShriHURKnqbLsGzae+Py+EFgNCLldKTUrkEKxekxWUBJ85Sv7SsD2MEZMtw5BV r3IIC/SihC+8Dh+8n0QodVoUa7jpY7+1cipFAsF7PbMvXqNgQadlNip/3uzs/OoT GP5viAJs8gi0s+NGsRp8AkWLPcJMo/yOCqLM+1q1B9pcyBy4L9eczI669hVDNqva 9cJRoh944TxI5j92iQbvErJ036lp72zBSPZPlvSqH/mPwQb8f2Zdw3AMLfcOd3cD n6UeOItlt6hflwcNHtVS1GXrLevFhi0cEvBYcSpAihceC+d+tfNCbHl1e6tEijqB hUnwLW3PlEKUSJ9vLCGRNVMLRX4YvzNHuRxnmhyO+bMTaVXOC89Y0m13yBsca3wj IovBau61DqxbYR99d3sBQ9XKFmuGzn0aOJEiF7k8f3OMoghiyFU8T9U9/3uljWYJ 1UeaNJvrCAQH6cTXE60UKNpgOypaWNhbFyCIL/+/pCAR7LaTamXCEGThC0K7kX00 dBl5mqSSGpn38WVl3rpT8kYLZNqQKPfWE7QK7kLqMG9Palob19k= =MQKo -----END PGP SIGNATURE----- --j0RN92pKAcGhZ379--