Skip to content
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

Latest versions break rust-lang bootstrap #228

Open
lasiotus opened this issue Dec 17, 2024 · 4 comments
Open

Latest versions break rust-lang bootstrap #228

lasiotus opened this issue Dec 17, 2024 · 4 comments

Comments

@lasiotus
Copy link

PR rust-lang/rust#134344 that only bumps cc and cmake versions fails due to a cmake error (it seems).

@clubby789
Copy link

Specifically d668808#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R458

This may be a bootstrap bug, I'll try and look into it

@jieyouxu
Copy link
Member

jieyouxu commented Dec 21, 2024

Bisection was done at rust-lang/rust#134558.

2024-12-16T08:24:34.9104890Z could not determine CMAKE_SYSTEM_NAME from the target `aarch64-apple-ios`, build may fail
2024-12-16T08:24:34.9107480Z CMAKE_TOOLCHAIN_FILE_aarch64-apple-ios = None
2024-12-16T08:24:34.9109170Z CMAKE_TOOLCHAIN_FILE_aarch64_apple_ios = None
2024-12-16T08:24:34.9111250Z TARGET_CMAKE_TOOLCHAIN_FILE = None
2024-12-16T08:24:34.9116590Z CMAKE_TOOLCHAIN_FILE = None
2024-12-16T08:24:34.9120130Z thread 'main' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.52/src/lib.rs:1115:5:
2024-12-16T08:24:34.9121100Z 
2024-12-16T08:24:34.9121380Z environment variable `CARGO_CFG_TARGET_OS` not defined
2024-12-16T08:24:34.9121820Z 
2024-12-16T08:24:34.9122030Z build script failed, must exit now

It seems that somehow CARGO_CFG_TARGET_OS isn't available.

@jieyouxu

This comment has been minimized.

@clubby789
Copy link

clubby789 commented Dec 21, 2024

cmake-rs/src/lib.rs

Lines 459 to 462 in 94da9de

} else if target != host && !self.defined("CMAKE_SYSTEM_NAME") {
// Set CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_PROCESSOR when cross compiling
let os = getenv_unwrap("CARGO_CFG_TARGET_OS");
let arch = getenv_unwrap("CARGO_CFG_TARGET_ARCH");

These lines expect cmake to be used from a build script, but bootstrap uses it as a runtime library. Feel free to close if this isn't a supported use case - we can fix this from our end by defining the correct CMAKE_SYSTEM_NAME.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants