From unknown Sat Jun 14 08:57:44 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#31645 <31645@debbugs.gnu.org> To: bug#31645 <31645@debbugs.gnu.org> Subject: Status: [PATCH] gnu: rust: Add support for building 32-bit packages on 64-bit hosts. Reply-To: bug#31645 <31645@debbugs.gnu.org> Date: Sat, 14 Jun 2025 15:57:44 +0000 retitle 31645 [PATCH] gnu: rust: Add support for building 32-bit packages o= n 64-bit hosts. reassign 31645 guix-patches submitter 31645 Robin Templeton severity 31645 normal tag 31645 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue May 29 12:40:05 2018 Received: (at submit) by debbugs.gnu.org; 29 May 2018 16:40:05 +0000 Received: from localhost ([127.0.0.1]:54233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNhfI-0001Is-7F for submit@debbugs.gnu.org; Tue, 29 May 2018 12:40:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNh6A-0000P4-Ej for submit@debbugs.gnu.org; Tue, 29 May 2018 12:03:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNh64-0000Rb-09 for submit@debbugs.gnu.org; Tue, 29 May 2018 12:03:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42528) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fNh63-0000RN-SY for submit@debbugs.gnu.org; Tue, 29 May 2018 12:03:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNh62-0001wF-3d for guix-patches@gnu.org; Tue, 29 May 2018 12:03:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNh5y-0000LT-W5 for guix-patches@gnu.org; Tue, 29 May 2018 12:03:38 -0400 Received: from fanzine.igalia.com ([91.117.99.155]:38647) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNh5y-0008Dm-Ku for guix-patches@gnu.org; Tue, 29 May 2018 12:03:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=dHu5/lsipCOTmOy+3ZQ/bgQKwM5YFluUJHbu2gtKqOo=; b=TCNIT/szVRHAUkHoSXAgRDPQ71qyddqLxtbbHbkIkBVK2ErghH23B71hFjhjVGAWUdra0WXHw+857CjC9nBPwsDzJl1lT1OBuhwukE6V/Yg2fmh44Kt3yXs+WVkWPGWuhFCNcFcR72fitDKVwc+LJTA14c4TJ8tYgoaZ8cCYHNESiLEtsOaBXxbqr6/ugWDpaMkbLi571o8docXLWioq5cEZuiGgH0hT9UuwHnX88qOI+ETmnZY0Bn/zc79/ndC2TmIdX6YvROivb+gNLqQHdZf3Yb9K4B8me3azTG8BEnVmIR/g8+Jq6XZy8cpsuLV3b2guGuO6pYaQKfIGMqkCqw==; Received: from cpe-98-26-108-142.nc.res.rr.com ([98.26.108.142] helo=panthera) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1fNh5M-0001t0-JM for ; Tue, 29 May 2018 18:02:57 +0200 From: Robin Templeton To: guix-patches@gnu.org Subject: [PATCH] gnu: rust: Add support for building 32-bit packages on 64-bit hosts. Date: Tue, 29 May 2018 12:02:41 -0400 Message-ID: <87lgc2qwke.fsf@panthera.terpri.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 29 May 2018 12:40:02 -0400 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: -5.4 (-----) * (rust-bootstrap, rust-1.23): Use nix-system->gnu-triplet to determine the system type. * (rust-1.19): Use readelf instead of nm in the atomic-lock-free test. * (rust-1.23): Disable the cargo_test_env test. Disable parallel execution of tests. --- gnu/packages/rust.scm | 62 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 51d4f6c04..62b5ee5ff 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -63,32 +63,34 @@ (package (name "rust-bootstrap") (version "1.22.1") - (source (origin - (method url-fetch) - (uri (string-append - "https://static.rust-lang.org/dist/" - "rust-" version "-" %host-type ".tar.gz")) - (sha256 - (base32 - (match %host-type - ("i686-unknown-linux-gnu" - "15zqbx86nm13d5vq2gm69b7av4vg479f74b5by64hs3bcwwm08pr") - ("x86_64-unknown-linux-gnu" - "1yll78x6b3abnvgjf2b66gvp6mmcb9y9jdiqcwhmgc0z0i0fix4c") - ("armv7-unknown-linux-gnueabihf" - "138a8l528kzp5wyk1mgjaxs304ac5ms8vlpq0ggjaznm6bn2j7a5") - ("aarch64-unknown-linux-gnu" - "0z6m9m1rx4d96nvybbfmpscq4dv616m615ijy16d5wh2vx0p4na8") - ("mips64el-unknown-linux-gnuabi64" - "07k4pcv7jvfa48cscdj8752lby7m7xdl88v3a6na1vs675lhgja2") - (_ "")))))) + (source #f) (build-system gnu-build-system) (native-inputs `(("patchelf" ,patchelf))) (inputs `(("gcc" ,(canonical-package gcc)) ("gcc:lib" ,(canonical-package gcc) "lib") - ("zlib" ,zlib))) + ("zlib" ,zlib) + ("source" + ,(origin + (method url-fetch) + (uri (string-append + "https://static.rust-lang.org/dist/" + "rust-" version "-" (nix-system->gnu-triplet) ".tar.gz")) + (sha256 + (base32 + (match (nix-system->gnu-triplet) + ("i686-unknown-linux-gnu" + "15zqbx86nm13d5vq2gm69b7av4vg479f74b5by64hs3bcwwm08pr") + ("x86_64-unknown-linux-gnu" + "1yll78x6b3abnvgjf2b66gvp6mmcb9y9jdiqcwhmgc0z0i0fix4c") + ("armv7-unknown-linux-gnueabihf" + "138a8l528kzp5wyk1mgjaxs304ac5ms8vlpq0ggjaznm6bn2j7a5") + ("aarch64-unknown-linux-gnu" + "0z6m9m1rx4d96nvybbfmpscq4dv616m615ijy16d5wh2vx0p4na8") + ("mips64el-unknown-linux-gnuabi64" + "07k4pcv7jvfa48cscdj8752lby7m7xdl88v3a6na1vs675lhgja2") + (_ "")))))))) (outputs '("out" "cargo")) (arguments `(#:tests? #f @@ -117,7 +119,7 @@ (invoke "bash" "install.sh" (string-append "--prefix=" out) (string-append "--components=rustc," - "rust-std-" %host-type)) + "rust-std-" ,(nix-system->gnu-triplet))) ;; Instal cargo (invoke "bash" "install.sh" (string-append "--prefix=" cargo-out) @@ -196,6 +198,12 @@ in turn be used to build the final Rust.") ;; This test is known to fail on aarch64 and powerpc64le: ;; https://github.com/rust-lang/rust/issues/45410 (("fn test_loading_cosine") "#[ignore]\nfn test_loading_cosine")) + ;; nm doesn't recognize the file format because of the + ;; nonstandard sections used by the Rust compiler, but readelf + ;; ignores them. + (substitute* "src/test/run-make/atomic-lock-free/Makefile" + (("\tnm ") + "\treadelf -c ")) #t))) (add-after 'patch-source-shebangs 'patch-cargo-checksums (lambda* _ @@ -386,6 +394,10 @@ safety and thread safety guarantees.") (substitute* "src/tools/cargo/tests/death.rs" ;; This is stuck when built in container. (("fn ctrl_c_kills_everyone") "#[ignore]\nfn ctrl_c_kills_everyone")) + ;; Prints test output in the wrong order when built on + ;; i686-linux. + (substitute* "src/tools/cargo/tests/test.rs" + (("fn cargo_test_env") "#[ignore]\nfn cargo_test_env")) #t)) (add-after 'patch-cargo-tests 'fix-mtime-bug (lambda* _ @@ -433,7 +445,7 @@ rpath = true # codegen/mainsubprogram.rs and codegen/mainsubprogramstart.rs # This tests required patched LLVM codegen-tests = false -[target." %host-type "] +[target." ,(nix-system->gnu-triplet) "] llvm-config = \"" llvm "/bin/llvm-config" "\" cc = \"" gcc "/bin/gcc" "\" cxx = \"" gcc "/bin/g++" "\" @@ -456,8 +468,10 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" (invoke "./x.py" "build" "src/tools/cargo"))) (replace 'check (lambda* _ - (invoke "./x.py" "test") - (invoke "./x.py" "test" "src/tools/cargo"))) + ;; Disable parallel execution to prevent EAGAIN errors when + ;; running tests. + (invoke "./x.py" "-j1" "test") + (invoke "./x.py" "-j1" "test" "src/tools/cargo"))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (invoke "./x.py" "install") -- 2.16.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 01 07:54:59 2018 Received: (at 31645-done) by debbugs.gnu.org; 1 Jun 2018 11:54:59 +0000 Received: from localhost ([127.0.0.1]:56894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOie1-0006B2-S8 for submit@debbugs.gnu.org; Fri, 01 Jun 2018 07:54:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOie0-0006Aq-Dy for 31645-done@debbugs.gnu.org; Fri, 01 Jun 2018 07:54:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOidq-0007s2-3Y for 31645-done@debbugs.gnu.org; Fri, 01 Jun 2018 07:54:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOidq-0007rr-07; Fri, 01 Jun 2018 07:54:46 -0400 Received: from [193.50.110.154] (port=42972 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fOidp-0004WT-Gf; Fri, 01 Jun 2018 07:54:45 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Robin Templeton Subject: Re: [bug#31645] [PATCH] gnu: rust: Add support for building 32-bit packages on 64-bit hosts. References: <87lgc2qwke.fsf@panthera.terpri.org> Date: Fri, 01 Jun 2018 13:54:43 +0200 In-Reply-To: <87lgc2qwke.fsf@panthera.terpri.org> (Robin Templeton's message of "Tue, 29 May 2018 12:02:41 -0400") Message-ID: <87lgbybu2k.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 31645-done Cc: 31645-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: -6.0 (------) Hi Robin, Good to see you here! :-) Robin Templeton skribis: > * (rust-bootstrap, rust-1.23): Use nix-system->gnu-triplet to determine t= he system type. > * (rust-1.19): Use readelf instead of nm in the atomic-lock-free test. > * (rust-1.23): Disable the cargo_test_env test. Disable parallel executio= n of > tests. I tweaked the commit log to match our conventions and pushed as a47537831c12f599cbffc37f822c5ccfa669d555. Thank you! Ludo=E2=80=99. PS: Building Rust really takes ages=E2=80=A6 From unknown Sat Jun 14 08:57:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 30 Jun 2018 11:24:05 +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