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

[PTX] error: the option `Z` is only accepted on the nightly compiler #5

Closed rustyx closed 3 years ago

rustyx commented 3 years ago

Getting the following error when running cargo install --path .

error: the optionZis only accepted on the nightly compiler

Full log:

error: failed to compile `tor-v3-vanity v0.1.0 (/home/user/tor-v3-vanity)`, intermediate artifacts can be found at `/home/user/tor-v3-vanity/target`

Caused by:
  failed to run custom build command for `tor-v3-vanity v0.1.0 (/home/user/tor-v3-vanity)`

Caused by:
  process didn't exit successfully: `/home/user/tor-v3-vanity/target/release/build/tor-v3-vanity-ffe1e29dcc00d7f6/build-script-build` (exit code: 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]  Downloading crates ...
  [PTX]   Downloaded syn v1.0.36
  [PTX]   Downloaded proc-macro2 v1.0.19
  [PTX]   Downloaded ed25519-compact v0.1.6
  [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 ed25519-compact v0.1.6
  [PTX]    Compiling rustacuda_core v0.1.2
  [PTX]    Compiling quote v1.0.7
  [PTX]    Compiling rustacuda_derive v0.1.2
  [PTX]    Compiling tor-v3-vanity-core v0.1.0 (/home/user/tor-v3-vanity/core)
  [PTX] error: the option `Z` is only accepted on the nightly compiler
  [PTX]
  [PTX] error: could not compile `tor-v3-vanity-core`
  [PTX]
dr-bonez commented 3 years ago

I am unable to reproduce. What version of rust are you running? On what system?

rustyx commented 3 years ago

rustc 1.48.0 (7eac88abb 2020-11-16) on Debian 10 x86_64

dr-bonez commented 3 years ago

My mistake, it seems I had rustup set to nightly on my nvidia box. It seems that ptx builder requires nightly for now. Go ahead and run cargo +nightly install --path . I'll update the docs.

rustyx commented 3 years ago

Thanks, I already figured I had to switch to the nightly rust version.

kvtb commented 2 years ago

It seems that the current nightly (1.60-nightly since https://github.com/rust-lang/cargo/pull/10258) ignores CARGO_BUILD_PIPELINING=false

https://github.com/dr-bonez/tor-v3-vanity/blob/609b48657923bbc33c95da5ca29e54df0ce5f6d4/build.rs#L5-L6

So we need

  1. nightly to avoid "the option Z is only accepted on the nightly compiler"
  2. quite old compiler which accepts CARGO_BUILD_PIPELINING=false.

It is sort of a deadlock: a year-old Rust-nightly is required to build the project.