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

Cannot build NVVM using LLVM_CONFIG #178

Open
gastrodon opened this issue Mar 26, 2025 · 4 comments
Open

Cannot build NVVM using LLVM_CONFIG #178

gastrodon opened this issue Mar 26, 2025 · 4 comments

Comments

@gastrodon
Copy link

I'm trying to build the add example, using llvm70 on x86_64-unknown-linux-gnu. I'm unable to get NVVM to build, it looks like a some kind of version mismatch? Lots of incorrect usage, and unresolved imports.

I've included the entire cargo build out: https://pastebin.com/rzggDiNU

@jorge-ortega
Copy link
Collaborator

jorge-ortega commented Mar 26, 2025

The codegen backend requires you to use the same nightly rust version as in our repo, currently nightly-2025-03-02. Add a rust-toolchain file to your workspace like ours and include the components listed as well.

Edit: just realized your using the version 0.3 from crates IO, which is currently on a much older nightly, and may not build properly with its current dependencies. Try using what’s currently in main branch.

@adamcavendish
Copy link
Contributor

adamcavendish commented Mar 27, 2025

I'm trying to build the add example, using llvm70 on x86_64-unknown-linux-gnu. I'm unable to get NVVM to build, it looks like a some kind of version mismatch? Lots of incorrect usage, and unresolved imports.

I've included the entire cargo build out: https://pastebin.com/rzggDiNU

Hi @gastrodon , I would suggest use the current main branch's container support to try the add example.

https://github.com/Rust-GPU/Rust-CUDA/tree/main/container

Quote the README here:

Use Rust-CUDA in Container Environments

# The distribution related Dockerfile are located in `container` folder.
# Taking ubuntu 24.04 as an example, run the following command in repository root:
docker build -f ./container/ubuntu24/Dockerfile -t rust-cuda-ubuntu24 .
docker run --rm --runtime=nvidia --gpus all -it rust-cuda-ubuntu24

@LegNeato
Copy link
Contributor

LegNeato commented Apr 1, 2025

@gastrodon did main work for you?

@gastrodon
Copy link
Author

Hey thanks for the reply. The thing about the rustc-toolchain file makes sense, I'm currently indisposed, and will see what a build looks like when I'm back on my computer with a cuda-compatible GPU.

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

4 participants