Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: unknown print request split-debuginfo #14

Closed
maximelianos opened this issue Mar 26, 2023 · 5 comments
Closed

error: unknown print request split-debuginfo #14

maximelianos opened this issue Mar 26, 2023 · 5 comments

Comments

@maximelianos
Copy link

I installed enzyme with cargo package, but trying to build my project with cargo enzyme immediately fails with

Running: `RUSTFLAGS="--emit=llvm-bc" "cargo" "+enzyme" "-Zbuild-std" "rustc" "--target" "x86_64-unknown-linux-gnu" "--" "--emit=llvm-bc" "-g" "-Copt-level=3" "-Zno-link"`
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
  --- stderr
  error: unknown print request `split-debuginfo`

thread 'main' panicked at 'Failed: `RUSTFLAGS="--emit=llvm-bc" "cargo" "+enzyme" "-Zbuild-std" "rustc" "--target" "x86_64-unknown-linux-gnu" "--" "--emit=llvm-bc" "-g" "-Copt-level=3" "-Zno-link"` (exit status: 101)', /home/iternal/.cargo/registry/src/index.crates.io-6f17d22bba15001f/enzyme-0.4.0/src/bin/run.rs:8:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

OS ubuntu 22.04, rustc 1.70.0-nightly (0c61c7a 2023-03-25)

I then invoked similar command for my version of Rust: rustc --print=split-debuginfo
Output:

off
packed
unpacked

While enzyme downloaded another Rust version, 1.57.0, which doesn't support this cmd argument.
cmd: ~/.cache/enzyme/rustc-1.57.0-src/build/x86_64-unknown-linux-gnu/stage2/bin/rustc --print=split-debuginfo
output: error: unknown print request split-debuginfo

@maximelianos
Copy link
Author

Now I tried installing rust version rustc 1.59.0-nightly and compiling enzyme. After compilation, running cargo enzyme outputs error: 'cargo' is not installed for the toolchain 'enzyme'

@maximelianos
Copy link
Author

It's a shame that in all cases enzyme compiles and tests are passed, but I can't invoke it. Can I manually invoke it?

@ZuseZ4
Copy link
Member

ZuseZ4 commented Mar 30, 2023

Hi @maximelianos, quick note since I saw "-Zbuild-std" in your flags.
That was only required as part of oxide-enzyme, because I wrote that as a cargo wrapper which didn't had access to
rust(c) internals. Now that we work as a part of the rust compiler it's not required to build-std anymore.

@ZuseZ4
Copy link
Member

ZuseZ4 commented Mar 30, 2023

Also, the crates.io approach is generally deprecated. I should probably push a commit to make this clear on crates.io,
for now I only deprecated the related oxide-enzyme repository.
The correct way to build and use rust+enzyme nowadays is described here: https://github.com/EnzymeAD/rust#the-rust-programming-language-enzyme
You probably also want to delete the enzyme which you installed from crates.io, just to make sure.

You generally need to build rustc from scratch and use rustup to make it available.
After that it is mostly just a matter of calling cargo +enzyme run ...,
Not that it is now cargo +enzyme and not cargo enzyme anymore.
Does that solve your bugs for now?

@bytesnake
Copy link

Currently mitigated by #9 and fixed once we are upstream #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants