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

rustavailable error is not helpful when clang isn't installed #960

Closed
wedsonaf opened this issue Feb 10, 2023 · 3 comments
Closed

rustavailable error is not helpful when clang isn't installed #960

wedsonaf opened this issue Feb 10, 2023 · 3 comments
Labels
• kbuild Related to building the kernel, `make`, `Kbuild`, `Kconfig` options...

Comments

@wedsonaf
Copy link

I ran make LLVM=1 rustavailable on a new system and got a hepful (as expected) message complaining about by my rustc version, but after fixing that, it failed as follows:

$ make LLVM=1 rustavailable
./scripts/rust_is_available.sh: 21: arithmetic expression: expecting primary: "100000 *  + 100 *  + "

The problem turned out to be that I didn't have a clang installed. After installing it, the message became helpful again (having to do with missing source code for core).

@wedsonaf wedsonaf added the • bug Related to runtime bugs, panics, warnings... label Feb 10, 2023
@wedsonaf wedsonaf changed the title rustavailable error in not helpful when clang isn't install rustavailable error is not helpful when clang isn't installed Feb 10, 2023
@ojeda
Copy link
Member

ojeda commented Feb 10, 2023

https://lore.kernel.org/rust-for-linux/20230109204520.539080-3-ojeda@kernel.org/ should fix that (the patch series will have a v2)

@ojeda ojeda added • kbuild Related to building the kernel, `make`, `Kbuild`, `Kconfig` options... and removed • bug Related to runtime bugs, panics, warnings... labels Feb 17, 2023
@ojeda
Copy link
Member

ojeda commented Aug 14, 2023

This is #934, so closing too.

@ojeda ojeda closed this as completed Aug 14, 2023
@ojeda
Copy link
Member

ojeda commented Aug 14, 2023

For reference, without Clang installed, this now gives:

***
*** Running 'bindgen' to check the libclang version (used by the Rust
*** bindings generator) failed with code 101. This may be caused by
*** a failure to locate libclang. See output and docs below for details:
***
thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.56.0/src/lib.rs:1922:31
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
***
***
*** Please see Documentation/rust/quick-start.rst for details
*** on how to set up the Rust support.
***

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
• kbuild Related to building the kernel, `make`, `Kbuild`, `Kconfig` options...
Development

No branches or pull requests

2 participants