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

required to be available in rlib format, but was not found in this form #17

Open gladius-opensort opened 1 year ago

gladius-opensort commented 1 year ago

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.2 LTS Release: 22.04 Codename: jammy

$ cargo clean && cargo +nightly install --path . Installing tor-v3-vanity v0.1.0 (/home/john/bench/tor-v3-vanity) Updating crates.io index Compiling libc v0.2.142 Compiling proc-macro2 v1.0.56 Compiling quote v1.0.26 Compiling unicode-ident v1.0.8 Compiling memchr v2.5.0 Compiling syn v1.0.109 Compiling autocfg v1.1.0 Compiling cc v1.0.79 Compiling cfg-if v1.0.0 Compiling serde v1.0.160 Compiling version_check v0.9.4 Compiling typenum v1.16.0 Compiling unicode-xid v0.2.4 Compiling getrandom v0.1.16 Compiling failure_derive v0.1.8 Compiling adler v1.0.2 Compiling generic-array v0.14.7 Compiling lazy_static v1.4.0 Compiling gimli v0.27.2 Compiling miniz_oxide v0.6.2 Compiling ucd-util v0.1.10 Compiling rustc-demangle v0.1.23 Compiling regex v0.2.11 Compiling glob v0.3.1 Compiling regex-syntax v0.5.6 Compiling object v0.30.3 Compiling cuda-config v0.1.0 Compiling aho-corasick v0.6.10 Compiling backtrace v0.3.67 Compiling atty v0.2.14 Compiling syn v2.0.15 Compiling thread_local v0.3.6 Compiling num-traits v0.2.15 Compiling block-padding v0.2.1 Compiling rand_core v0.5.1 Compiling utf8-ranges v1.0.5 Compiling semver-parser v0.7.0 Compiling semver v0.9.0 Compiling colored v1.9.3 Compiling digest v0.9.0 Compiling block-buffer v0.9.0 Compiling cuda-driver-sys v0.3.0 Compiling num-integer v0.1.45 Compiling crossbeam-utils v0.7.2 Compiling maybe-uninit v2.0.0 Compiling byteorder v1.4.3 Compiling ppv-lite86 v0.2.17 Compiling opaque-debug v0.3.0 Compiling rand_chacha v0.2.2 Compiling addr2line v0.19.0 Compiling rustacuda_core v0.1.2 Compiling cpufeatures v0.2.7 Compiling signature v1.6.4 Compiling bitflags v1.3.2 Compiling unicode-width v0.1.10 Compiling cfg-if v0.1.10 Compiling subtle v2.5.0 Compiling textwrap v0.11.0 Compiling ed25519 v1.5.3 Compiling sha2 v0.9.9 Compiling toml v0.4.10 Compiling rand v0.7.3 Compiling synstructure v0.12.6 Compiling time v0.1.45 Compiling iana-time-zone v0.1.56 Compiling vec_map v0.8.2 Compiling keccak v0.1.3 Compiling ansi_term v0.12.1 Compiling ed25519-compact v0.1.11 Compiling strsim v0.8.0 Compiling sha3 v0.9.1 Compiling clap v2.34.0 Compiling chrono v0.4.24 Compiling crossbeam-channel v0.4.4 Compiling num_cpus v1.15.0 Compiling base32 v0.4.0 Compiling zeroize_derive v1.4.2 Compiling rustacuda_derive v0.1.2 Compiling zeroize v1.3.0 Compiling curve25519-dalek v3.2.1 Compiling rustacuda v0.1.3 Compiling tor-v3-vanity-core v0.1.0 (/home/john/bench/tor-v3-vanity/core) Compiling failure v0.1.8 Compiling ptx-builder v0.5.3 Compiling tor-v3-vanity v0.1.0 (/home/john/bench/tor-v3-vanity) Compiling ed25519-dalek v1.0.1 error: failed to run custom build command for tor-v3-vanity v0.1.0 (/home/john/bench/tor-v3-vanity)

Caused by: process didn't exit successfully: /home/john/bench/tor-v3-vanity/target/release/build/tor-v3-vanity-e1a922c76200ac51/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 tor-v3-vanity-core v0.1.0 (/home/john/bench/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 (lib) due to 3 previous errors [PTX] warning: build failed, waiting for other jobs to finish... error: failed to compile tor-v3-vanity v0.1.0 (/home/john/bench/tor-v3-vanity), intermediate artifacts can be found at /home/john/bench/tor-v3-vanity/target

parkan commented 6 months ago

I was able to get this built, you need to use an old rust (1.55.0), old cargo nightly (I used 2020-12-09, the date of the last commit), add the target again, and use cargo build instead of install (install disregards Cargo.lock and will try to add incompatible crates from the "future")

parkan commented 6 months ago

FWIW the performance I am seeing from this tool is not much better on an NVIDIA A40 than a Xeon Gold 6326 CPU, so unclear if it's worth bothering with the build process. I may try to modernize it and look for any easy performance wins if I have some spare time though.