-
Notifications
You must be signed in to change notification settings - Fork 128
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
is cmake
not installed?
#118
Comments
A clue: If I replace the dependency on my published crate in the test app from:
to
Everything works, compiling my crate will no longer complain about a missing cmake. If this didn't work at all it would make more sense, but somehow pulling a crate and building it is different than building the original local copy? |
Are you sure |
Also encountered this. |
It turns out some files in the cmake argument are missing. The "is cmake not installed?" error message is actually misleading in this case. |
Same problem here. And I found that if comment out |
So I have found that using out_dir works, if the directory passed to So for the OP, in the build script change "target", passed to Oh, rereading what #118 (comment) this comment says, I am echoing @NOBLES5E, but providing more information. |
Providing more information, and a fix. Line 498 in 00e6b22
Line 524 in 00e6b22
Command current_dir , which finally errors in run Line 1019 in 00e6b22
I think the thing to do is use |
I just got this error in GitHub Actions on Windows:
The strange thing is that according to https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md official Windows server 2022 runners do have CMake installed on them. UPD: My apologies, it was a custom GitHub Actions runner. |
|
Yes, with both official GitHub runner and self-hosted |
Encountered the same issue. My workaround is: // build.rs
use std::env;
// irrelevant - for better error message
extern crate miette;
fn main() -> miette::Result<()> {
env::set_var("CMAKE_aarch64_apple_darwin", "/opt/homebrew/bin/cmake"); // <-- add this line
// ...
} Basically, this workaround allows # see-also: https://wiki.archlinux.org/title/Rust_package_guidelines
echo CMAKE_$(rustc -vV | sed -n 's/host: //p' | sed -e 's/-/_/g') Side note:
|
I still encounter this issue on macOS 14.5 aarch64 with
sudo ln -s /Applications/CMake.app/Contents/bin/cmake /usr/local/bin/cmake |
Hello, I've tried to use the cmake crate as a dependency in my crate and while it works locally it fails when I add my crate as a dependency (pulled from crates.io) in a test program:
With
RUST_BACKTRACE=full
:My crate's
build.rs
:Any advice on how I should proceed?
The text was updated successfully, but these errors were encountered: