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

Running examples: Dependency problems, Linux target, errors in codegen_nvvm #129

Open
welahi opened this issue Jan 19, 2025 · 0 comments
Open

Comments

@welahi
Copy link

welahi commented Jan 19, 2025

System: Alma Linux 8.10
CUDA: 12.6.3

I cloned the Rust-CUDA and tried to compile examples/cuda/cpu/add using cargo run, having Rust nightly installed. The rust-toolchain file makes rustup install 1.59.0-nightly. However, the log-crate, which is required in version 0.4.25, needs Rust 1.60.0 or higher.

Changing the toolchain nightly-2022-04-07 leads to a similar error, where openssl-sys v0.9.104 needs 1.63.0 or higher.

Then, I removed the toolchain-file to just use the newest version of the rustc. The problem with the dependencies was solved, but the buildscript of rustc_codegen_nvvm nags about the target. In the buildscript I found this uncommented match arm

// NOTE(RDambrosio016): currently disabled because of weird issues with segfaults and building the C++ shim
// "x86_64-unknown-linux-gnu" => "linux-x86_64",

Is Linux basically not supported?

I removed the comment and tried again, this time getting a bunch of errors while trying to compile codegen_nvvm. Some of them where solved running rustup component add rust-src rustc-dev llvm-tools-preview. However, I'm stuck here now:

  1. I still get the error that the extern crate rustc_attr could not be found, and the suggested solution is again to install the llvm tools, which I already did.
  2. More importantly, I get 104 other errors like use rustc_codegen_ssa::traits::BaseTypeMethods;: no BaseTypeMethods in traits in crates/rustc_codegen_nvvm/src/abi.rs:9:5, which I have no idea how to solve.

Does anyone know how to resolve the issues?

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

1 participant