-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bootstrap is broken for all custom targets on rust-1.85.0_beta #137064
Comments
Can you check if setting |
like this?
|
You should use bootstrap scripts ( |
ok, so here is the result of
so that doesn't make any difference, I'm afraid. |
I'm seeing this too on the now released rust-1.85.0, with (longstanding) (To preempt worries that A bit of
of Explicitly specifying |
This seems to be related to the cc-rs mistake discussed in rust-lang/cc-rs#1317 - this introduced a hard-coded list of targets (!!) which broke custom rust packaging on Alpine Linux, Chimera Linux and others, though it hadn't made it all the way out to break a 'stable' rust release at the point they all reported it. The bootstrap build works fine if you bodge the hard-coded list in the vendored cc crate: diff --git a/vendor/cc-1.2.0/src/target/generated.rs b/vendor/cc-1.2.0/src/target/generated.rs
index 0c9b0ae1..23d18039 100644
--- a/vendor/cc-1.2.0/src/target/generated.rs
+++ b/vendor/cc-1.2.0/src/target/generated.rs
@@ -124,6 +124,18 @@ pub(crate) const LIST: &[(&str, TargetInfo<'static>)] = &[
unversioned_llvm_target: "arm64-apple-watchos-simulator",
},
),
+ (
+ "aarch64-arachsys-linux-musl",
+ TargetInfo {
+ full_arch: "aarch64",
+ arch: "aarch64",
+ vendor: "arachsys",
+ os: "linux",
+ env: "musl",
+ abi: "",
+ unversioned_llvm_target: "aarch64-arachsys-linux-musl",
+ },
+ ),
(
"aarch64-fuchsia",
TargetInfo {
@@ -2848,6 +2860,18 @@ pub(crate) const LIST: &[(&str, TargetInfo<'static>)] = &[
unversioned_llvm_target: "x86_64-apple-watchos-simulator",
},
),
+ (
+ "x86_64-arachsys-linux-musl",
+ TargetInfo {
+ full_arch: "x86_64",
+ arch: "x86_64",
+ vendor: "arachsys",
+ os: "linux",
+ env: "musl",
+ abi: "",
+ unversioned_llvm_target: "x86_64-arachsys-linux-musl",
+ },
+ ),
(
"x86_64-fortanix-unknown-sgx",
TargetInfo { |
I tried to copy your approach:
sadly it didn't work for me, and failed with the same error as before. |
Ah, sorry to hear that - possibly something about the way I build rust allows this to work for me and not for you? My build recipe is at https://github.com/arachsys/packages/tree/master/rust and you can see the diff I needed to get the 1.85.0 release tarball building (with both 1.84.1 and itself) at arachsys/packages@7596f3fac1. (The only relevant bit of that diff for you is probably the change to target.diff, and I can't see anything that might make me too 'unusual' in the build script itself.) One thing I didn't think of last night: you'll definitely have to work around the ridiculous file checksums if you patch vendor/cc-* in the source tree with upstream cargo. You can just remove the entire "files" key from them with sed:
or disable this (deliberately user-hostile) behaviour altogether with something like arachsys/packages@bdc6635b5e. |
How are we progressing with a fix for this build issue? |
Can you downgrade bootstrap cc to |
@stefson the generated list is searched via binary search:
So any new entries you add need to be in sorted order - your I did the same thing when adding my (Thanks @arachsys for the patch!) |
I can confirm that this patch does allow the build of bootstrap to complete. diff -Nu rustc-1.85.0-src/src/bootstrap/Cargo.toml rust-1.85.0/src/bootstrap/Cargo.toml
--- rustc-1.85.0-src/src/bootstrap/Cargo.toml 2025-02-17 18:17:27.000000000 +0000
+++ rust-1.85.0/src/bootstrap/Cargo.toml 2025-02-22 22:29:29.083321273 +0000
@@ -36,7 +36,7 @@
# Most of the time updating these dependencies requires modifications to the
# bootstrap codebase(e.g., https://github.com/rust-lang/rust/issues/124565);
# otherwise, some targets will fail. That's why these dependencies are explicitly pinned.
-cc = "=1.2.0"
+cc = "=1.1.22"
cmake = "=0.1.48"
build_helper = { path = "../build_helper" }
diff -Nu rustc-1.85.0-src/src/bootstrap/bootstrap.py rust-1.85.0/src/bootstrap/bootstrap.py
--- rustc-1.85.0-src/src/bootstrap/bootstrap.py 2025-02-17 18:17:27.000000000 +0000
+++ rust-1.85.0/src/bootstrap/bootstrap.py 2025-02-22 22:31:44.312261598 +0000
@@ -1131,8 +1131,6 @@
args.extend("--verbose" for _ in range(self.verbose))
if self.use_locked_deps:
args.append("--locked")
- if self.use_vendored_sources:
- args.append("--frozen")
if self.get_toml("metrics", "build"):
args.append("--features")
args.append("build-metrics")
diff -Nu rustc-1.85.0-src/src/bootstrap/Cargo.lock rust-1.85.0/src/bootstrap/Cargo.lock
--- rustc-1.85.0-src/src/bootstrap/Cargo.lock 2025-02-17 18:17:27.000000000 +0000
+++ rust-1.85.0/src/bootstrap/Cargo.lock 2025-02-22 22:31:50.301318838 +0000
@@ -65,9 +65,9 @@
[[package]]
name = "bstr"
-version = "1.10.0"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c"
+checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8"
dependencies = [
"memchr",
"regex-automata",
@@ -84,9 +84,9 @@
[[package]]
name = "cc"
-version = "1.2.0"
+version = "1.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8"
+checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0"
dependencies = [
"shlex",
]
@@ -99,9 +99,9 @@
[[package]]
name = "clap"
-version = "4.5.20"
+version = "4.5.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
+checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84"
dependencies = [
"clap_builder",
"clap_derive",
@@ -109,9 +109,9 @@
[[package]]
name = "clap_builder"
-version = "4.5.20"
+version = "4.5.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
+checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838"
dependencies = [
"anstyle",
"clap_lex",
@@ -119,9 +119,9 @@
[[package]]
name = "clap_complete"
-version = "4.5.37"
+version = "4.5.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11611dca53440593f38e6b25ec629de50b14cdfa63adc0fb856115a2c6d97595"
+checksum = "ac2e663e3e3bed2d32d065a8404024dad306e699a04263ec59919529f803aee9"
dependencies = [
"clap",
]
@@ -140,9 +140,9 @@
[[package]]
name = "clap_lex"
-version = "0.7.2"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
+checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "cmake"
@@ -161,18 +161,18 @@
[[package]]
name = "cpufeatures"
-version = "0.2.15"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6"
+checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
dependencies = [
"libc",
]
[[package]]
name = "crossbeam-deque"
-version = "0.8.5"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
+checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
@@ -189,9 +189,9 @@
[[package]]
name = "crossbeam-utils"
-version = "0.8.20"
+version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
+checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crypto-common"
@@ -221,12 +221,12 @@
[[package]]
name = "errno"
-version = "0.3.9"
+version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
+checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
dependencies = [
"libc",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -283,11 +283,11 @@
[[package]]
name = "home"
-version = "0.5.9"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
+checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
dependencies = [
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -308,9 +308,9 @@
[[package]]
name = "itoa"
-version = "1.0.11"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
+checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
[[package]]
name = "junction"
@@ -324,9 +324,9 @@
[[package]]
name = "libc"
-version = "0.2.167"
+version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc"
+checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "libredox"
@@ -379,9 +379,9 @@
[[package]]
name = "object"
-version = "0.36.5"
+version = "0.36.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
+checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
dependencies = [
"memchr",
]
@@ -414,27 +414,27 @@
[[package]]
name = "proc-macro2"
-version = "1.0.89"
+version = "1.0.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
+checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.37"
+version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
[[package]]
name = "redox_syscall"
-version = "0.5.7"
+version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
+checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
dependencies = [
"bitflags",
]
@@ -458,15 +458,15 @@
[[package]]
name = "rustix"
-version = "0.38.40"
+version = "0.38.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0"
+checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
dependencies = [
"bitflags",
"errno",
"libc",
"linux-raw-sys",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -492,24 +492,24 @@
[[package]]
name = "semver"
-version = "1.0.23"
+version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
+checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba"
[[package]]
name = "serde"
-version = "1.0.215"
+version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
+checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.215"
+version = "1.0.217"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
+checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
dependencies = [
"proc-macro2",
"quote",
@@ -518,9 +518,9 @@
[[package]]
name = "serde_json"
-version = "1.0.132"
+version = "1.0.134"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03"
+checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d"
dependencies = [
"itoa",
"memchr",
@@ -547,9 +547,9 @@
[[package]]
name = "syn"
-version = "2.0.87"
+version = "2.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
+checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058"
dependencies = [
"proc-macro2",
"quote",
@@ -606,9 +606,9 @@
[[package]]
name = "unicode-ident"
-version = "1.0.13"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
+checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "version_check"
|
Simplified diff -Nu rustc-1.85.0-src/src/bootstrap/Cargo.toml rust-1.85.0/src/bootstrap/Cargo.toml
--- rustc-1.85.0-src/src/bootstrap/Cargo.toml 2025-02-17 18:17:27.000000000 +0000
+++ rust-1.85.0/src/bootstrap/Cargo.toml 2025-02-22 22:29:29.083321273 +0000
@@ -36,7 +36,7 @@
# Most of the time updating these dependencies requires modifications to the
# bootstrap codebase(e.g., https://github.com/rust-lang/rust/issues/124565);
# otherwise, some targets will fail. That's why these dependencies are explicitly pinned.
-cc = "=1.2.0"
+cc = "=1.1.22"
cmake = "=0.1.48"
build_helper = { path = "../build_helper" }
diff -Nu rustc-1.85.0-src/src/bootstrap/Cargo.lock rust-1.85.0/src/bootstrap/Cargo.lock
--- rustc-1.85.0-src/src/bootstrap/Cargo.lock 2025-02-17 18:17:27.000000000 +0000
+++ rust-1.85.0/src/bootstrap/Cargo.lock 2025-02-22 22:31:50.301318838 +0000
@@ -84,9 +84,9 @@
[[package]]
name = "cc"
-version = "1.2.0"
+version = "1.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8"
+checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0"
dependencies = [
"shlex",
] |
downgrade bootstrap `cc` Current `cc` version causing bootstrap to fail on custom targets. See rust-lang/cc-rs#1317 for more context. Fixes (after beta and stable backports): rust-lang#137064 and rust-lang#135271
downgrade bootstrap `cc` Current `cc` version causing bootstrap to fail on custom targets. See rust-lang/cc-rs#1317 for more context. Fixes (after beta and stable backports): rust-lang#137064 and rust-lang#135271
Rollup merge of rust-lang#137460 - onur-ozkan:downgrade-cc, r=jieyouxu downgrade bootstrap `cc` Current `cc` version causing bootstrap to fail on custom targets. See rust-lang/cc-rs#1317 for more context. Fixes (after beta and stable backports): rust-lang#137064 and rust-lang#135271
hello everyone,
I've been using a custom target for my locally built rustc toolchain for many years now, the target is added with a custom patch and everything has been working just fine:
with the branching of the 1.85.0_beta branch, the already built-in target of the local rustc-1.84.0 binary cannot be found anymore by the bootstrap process:
the full build.log: build.log.gz
this is my config.toml:
operating system is gentoo, both armv7a and amd64
here are the backtraces:
The text was updated successfully, but these errors were encountered: