Rust-GPU / Rust-CUDA

Ecosystem of libraries and tools for writing and executing fast GPU code fully in Rust.
Apache License 2.0
3.16k stars 120 forks source link

Linux not supported #77

Open jafioti opened 2 years ago

jafioti commented 2 years ago

I was trying to build the add example, and since the guide makes no mention that linux isn't supported I assumed it was. When I ran the build script, I get Unsupported target with no matching prebuilt LLVM:x86_64-unknown-linux-gnu, install LLVM and set LLVM_CONFIG.

I went through the build script and saw this:

fn target_to_llvm_prebuilt(target: &str) -> String {
    println!("Target: {}", target);
    let base = match target {
        "x86_64-pc-windows-msvc" => "windows-x86_64",
        // NOTE(RDambrosio016): currently disabled because of weird issues with segfaults and building the C++ shim
        //"x86_64-unknown-linux-gnu" => "linux-x86_64",
        _ => panic!("Unsupported target with no matching prebuilt LLVM: `{}`, install LLVM and set LLVM_CONFIG", target)
    };
    format!("{}.tar.xz", base)
}

So is there a plan to re-support linux?

nhemsley commented 1 year ago

This is only downloading the prebuilt version of LLVM, set LLVM_CONFIG to where your llvm-config binary is. Note that this should be an absolute path, not relative (like ../../path/to/llvm)