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

No such file or directory (os error 2) #11

Closed
TriplEight opened this issue Oct 30, 2020 · 6 comments · Fixed by LukeMathWalker/cargo-manifest#2
Closed

No such file or directory (os error 2) #11

TriplEight opened this issue Oct 30, 2020 · 6 comments · Fixed by LukeMathWalker/cargo-manifest#2

Comments

@TriplEight
Copy link

TriplEight commented Oct 30, 2020

Hello, thanks for the great tool!

I'm trying to make it work in CI. And I can give a lot of feedback in future.

Tried with many images and repositories, manually for starters.

cargo-chef v0.1.6

Error:
root@e893dc1d44bf:/builds/cargo-contract# cargo chef prepare  --recipe-path recipe.json
Error: Failed to compute recipe

Caused by:
    0: No such file or directory (os error 2)
    1: No such file or directory (os error 2)

Stack backtrace:
   0: chef::skeleton::Skeleton::derive
   1: chef::recipe::Recipe::prepare
   2: cargo_chef::main
   3: std::sys_common::backtrace::__rust_begin_short_backtrace
   4: std::rt::lang_start::{{closure}}
   5: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/ef663a8a48ea6b98b43cbfaefd99316b36b16825/library/core/src/ops/function.rs:259
      std::panicking::try::do_call
             at /rustc/ef663a8a48ea6b98b43cbfaefd99316b36b16825/library/std/src/panicking.rs:381
      std::panicking::try
             at /rustc/ef663a8a48ea6b98b43cbfaefd99316b36b16825/library/std/src/panicking.rs:345
      std::panic::catch_unwind
             at /rustc/ef663a8a48ea6b98b43cbfaefd99316b36b16825/library/std/src/panic.rs:382
      std::rt::lang_start_internal
             at /rustc/ef663a8a48ea6b98b43cbfaefd99316b36b16825/library/std/src/rt.rs:51
   6: main
   7: __libc_start_main
   8: _start
Repro:

run an image

docker run -it paritytech/contracts-ci-linux:4e476221-20201029

and there

git clone https://github.com/paritytech/cargo-contract .
cargo install cargo-chef
cargo chef prepare  --recipe-path recipe.json

The similar stuff happened to the paritytech/ink-ci-linux:65ef4994-20201008 image with https://github.com/paritytech/ink repo
and paritytech/ci-linux:2773c6ea-20201028 with https://github.com/paritytech/substrate. Except the latter is on stable toolchain and didn't show the unwind in the error.

Tried both with docker and podman.

@hcrohland
Copy link

I had the same error when not having set a WORKDIR. Setting it solved it for me.

@TriplEight
Copy link
Author

Just tried and it didn't help :/

@LukeMathWalker
Copy link
Owner

Bit busy these days, I'll try to have a look before next week 👍

@NathanHowell
Copy link
Contributor

@TriplEight can you try this one cargo install --git https://github.com/NathanHowell/cargo-chef --branch with-manifest-fixes? I hit a few issues with my workspace project including this one.

@TriplEight
Copy link
Author

@NathanHowell this works, and it is a huge improvement!
Tested with 3 workspace repositories I've mentioned here.

I've faced some other problems, will file them in the other issues.

@LukeMathWalker
Copy link
Owner

The fix for this is in master - thanks @NathanHowell!

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

Successfully merging a pull request may close this issue.

4 participants