cackle-rs / cackle

A code ACL checker for Rust
Other
206 stars 7 forks source link

cargo acl fails to build #10

Closed sigmaSd closed 1 year ago

sigmaSd commented 1 year ago

Hello, I tried cargo acn but it fails compiling with:

error: extern location for autocfg does not exist: /home/mrcool/dev/rust/cargo_target_dir/cackle/deps/libautocfg-95fddeba77b8019b.rlib
 --> /home/mrcool/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.10/build.rs:2:15
  |
2 |     let cfg = autocfg::new();
  |               ^^^^^^^

error: could not compile `lock_api` (build script) due to previous error
warning: build failed, waiting for other jobs to finish...

Error: `cargo` exited with non-zero exit status
davidlattimore commented 1 year ago

Thanks, I'll see if I can reproduce. My guess would be the custom target directory you're using "cargo_target_dir"

davidlattimore commented 1 year ago

So running with CARGO_TARGET_DIR set was indeed broken. I've pushed a fix to github. That said, I didn't get the same error as you when I had CARGO_TARGET_DIR set. In fact, I didn't get any error - things just didn't work properly. So it's possible there's something else going on when you run it. But if that's the case, I'd probably need some more details like what code you're running it on.

sigmaSd commented 1 year ago

thanks that fixed it.