Skip to content

[Bug] #3044

@debendraoli

Description

@debendraoli

🐛 Bug Report

Cannot compile with CUDA feature.

Steps to Reproduce

  1. Run AWS g4dn instance
  2. Try to build with cuda feature flag

Expected Behavior

I'm getting following error:

error: linking with `cc` failed: exit status: 1
  |
  = note:  "cc" "-m64" "/tmp/rustcrzQIBq/symbols.o" "<291 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/tmp/rustcrzQIBq/{libsppark-f458497e468a2927.rlib,libblst-1839619d0fd777bd.rlib,libcurl_sys-d82414a6f6e37887.rlib,liblibz_sys-a42636b1871f2e42.rlib,libring-4b87eb26f8ea4f92.rlib}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lstdc++" "-lcudart_static" "-lssl" "-lcrypto" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/tmp/rustcrzQIBq/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/ubuntu/aleo-remote-prover/target/release/build/ring-e6ec3e02e507e298/out" "-L" "/home/ubuntu/aleo-remote-prover/target/release/build/blst-81716e8c56162e9d/out" "-L" "/home/ubuntu/aleo-remote-prover/target/release/build/sppark-1b81fb802fcab02d/out" "-L" "/home/ubuntu/aleo-remote-prover/target/release/build/curl-sys-175235fa36ca2e8e/out/build" "-L" "/home/ubuntu/aleo-remote-prover/target/release/build/libz-sys-526d18939d705664/out/lib" "-L" "/home/ubuntu/aleo-remote-prover/target/release/build/libz-sys-526d18939d705664/out/lib" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/ubuntu/aleo-remote-prover/target/release/deps/remote_prover-4ad4f9a4e03cb9e8" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-all" "-nodefaultlibs"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: /usr/bin/ld: /home/ubuntu/aleo-remote-prover/target/release/deps/remote_prover-4ad4f9a4e03cb9e8.remote_prover.4e861be585097a8a-cgu.0.rcgu.o: in function `snarkvm_algorithms::fft::domain::EvaluationDomain<F>::ifft_in_place::{{closure}}':
          remote_prover.4e861be585097a8a-cgu.0:(.text._ZN18snarkvm_algorithms3fft6domain25EvaluationDomain$LT$F$GT$13ifft_in_place28_$u7b$$u7b$closure$u7d$$u7d$17h13ace05be568d992E+0x1bd): undefined reference to `snarkvm_ntt'
          /usr/bin/ld: /home/ubuntu/aleo-remote-prover/target/release/deps/remote_prover-4ad4f9a4e03cb9e8.remote_prover.4e861be585097a8a-cgu.0.rcgu.o: in function `snarkvm_algorithms::msm::variable_base::VariableBase::msm':
          remote_prover.4e861be585097a8a-cgu.0:(.text._ZN18snarkvm_algorithms3msm13variable_base12VariableBase3msm17h1248042d6ae0e917E+0x4e): undefined reference to `snarkvm_msm'
          collect2: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

It builds without cuda feature flag.

Cargo toml:

...
[dependencies.snarkvm]
version = "4.0.0"
features = ["cuda"]
...

Your Environment

snarvm version: 4.0.0

rust: 1.88.0

OS Details:

• Distribution: Ubuntu 24.04.3 LTS (Noble Numbat)
• Kernel: 6.14.0-1017-aws
• Architecture: x86_64
• Platform: AWS EC2 instance

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions