dr-bonez / tor-v3-vanity

A TOR v3 vanity url generator designed to run on an NVIDIA GPU.
https://crates.io/crates/tor-v3-vanity
MIT License
133 stars 22 forks source link

crate `rustacuda_core` required to be available in rlib format, but was not found in this form #15

Open mooleshacat opened 2 years ago

mooleshacat commented 2 years ago

Errors:

root@A0X:~/tor-v3-vanity# cargo +nightly install --path .
  Installing tor-v3-vanity v0.1.0 (/root/tor-v3-vanity)
    Updating crates.io index
   Compiling tor-v3-vanity v0.1.0 (/root/tor-v3-vanity)
error: failed to run custom build command for `tor-v3-vanity v0.1.0 (/root/tor-v3-vanity)`

Caused by:
  process didn't exit successfully: `/root/tor-v3-vanity/target/release/build/tor-v3-vanity-06667efea9a1b81d/build-script-build` (exit status: 1)
  --- stdout
  cargo:rustc-link-search=native=/usr/local/cuda/lib64/

  --- stderr
  [PTX] Unable to build a PTX crate!
  [PTX] warning: unused manifest key: build
  [PTX]    Compiling proc-macro2 v1.0.19
  [PTX]    Compiling unicode-xid v0.2.1
  [PTX]    Compiling syn v1.0.36
  [PTX]    Compiling byteorder v1.3.4
  [PTX]    Compiling rustacuda_core v0.1.2
  [PTX]    Compiling ed25519-compact v0.1.6
  [PTX]    Compiling quote v1.0.7
  [PTX]    Compiling rustacuda_derive v0.1.2
  [PTX]    Compiling tor-v3-vanity-core v0.1.0 (/root/tor-v3-vanity/core)
  [PTX] error: crate `rustacuda_core` required to be available in rlib format, but was not found in this form
  [PTX]
  [PTX] error: crate `byteorder` required to be available in rlib format, but was not found in this form
  [PTX]
  [PTX] error: crate `ed25519_compact` required to be available in rlib format, but was not found in this form
  [PTX]
  [PTX] error: could not compile `tor-v3-vanity-core` due to 3 previous errors
  [PTX]
error: failed to compile `tor-v3-vanity v0.1.0 (/root/tor-v3-vanity)`, intermediate artifacts can be found at `/root/tor-v3-vanity/target`
root@A0X:~/tor-v3-vanity# cargo +nightly install rustcuda_core
    Updating crates.io index
error: could not find `rustcuda_core` in registry `crates-io` with version `*`
root@A0X:~/tor-v3-vanity#
lt3stus3el commented 2 years ago

Same error here (Ubuntu 20.04)

lt3stus3el commented 2 years ago

Good resources, but no solution:

https://www.reddit.com/r/rust/comments/tfod1g/newbie_question/

https://users.rust-lang.org/t/forcing-rlib-with-cargo/73070/10

lt3stus3el commented 2 years ago

Use this:

export PTX_CRATE_BUILDING=1

i.e.:

rustup install nightly
rustup target add nvptx64-nvidia-cuda
cargo install ptx-linker
git clone https://github.com/dr-bonez/tor-v3-vanity
cd tor-v3-vanity
export PTX_CRATE_BUILDING=1
cargo +nightly install --path .

Now it will compile!

ShevonKuan commented 1 year ago
Installing tor-v3-vanity v0.1.0 (/root/onion/tor-v3-vanity)
    Updating crates.io index
   Compiling tor-v3-vanity v0.1.0 (/root/onion/tor-v3-vanity)
    Finished release [optimized] target(s) in 3.57s
  Installing /root/.cargo/bin/t3v
   Installed package `tor-v3-vanity v0.1.0 (/root/onion/tor-v3-vanity)` (executable `t3v`)

It works. thanks