Cannot run even example from the documentation
Pigrenok opened this issue · 2 comments
Hello!
I may be doing something horribly wrong, but I do not see where I may be wrong as I am just follows the documentation:
I am running the following command:
c2w ubuntu:22.04 out.wasm
and get the following error quite far in the process.
#68 [bochs-dev-common 8/25] RUN git clone https://github.com/bytecodealliance/wizer && cd wizer && git checkout "04e49c989542f2bf3a112d60fbf88a62cce2d0d0" && cargo build --bin wizer --all-features && mkdir -p /tools/wizer/ && mv include target/debug/wizer /tools/wizer/ && cargo clean
...
#68 23.86 Compiling fs-set-times v0.15.0
#68 24.38 Compiling is-terminal v0.1.0
#68 24.40 Compiling wat v1.0.40
#68 24.59 error[E0061]: this method takes 1 argument but 2 arguments were supplied
#68 24.59 --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cap-primitives-0.24.1/src/rustix/linux/fs/set_times_impl.rs:20:25
#68 24.59 |
#68 24.59 20 | return file.set_times(
#68 24.59 | ^^^^^^^^^
#68 24.59 21 | atime.map(SystemTimeSpec::into_std),
#68 24.59 22 | mtime.map(SystemTimeSpec::into_std),
#68 24.59 | ----------------------------------- unexpected argument of type `Option<fs_set_times::SystemTimeSpec>`
#68 24.59 |
#68 24.59 note: expected `FileTimes`, found `Option<SystemTimeSpec>`
#68 24.59 --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cap-primitives-0.24.1/src/rustix/linux/fs/set_times_impl.rs:21:17
#68 24.59 |
#68 24.59 21 | atime.map(SystemTimeSpec::into_std),
#68 24.59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#68 24.59 = note: expected struct `FileTimes`
#68 24.59 found enum `Option<fs_set_times::SystemTimeSpec>`
#68 24.59 note: method defined here
#68 24.59 --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/fs.rs:695:12
#68 24.59 help: remove the extra argument
#68 24.59 |
#68 24.59 21 - atime.map(SystemTimeSpec::into_std),
#68 24.59 21 + /* FileTimes */,
#68 24.59 |
#68 24.59
#68 24.59 error[E0061]: this method takes 1 argument but 2 arguments were supplied
#68 24.59 --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cap-primitives-0.24.1/src/rustix/linux/fs/set_times_impl.rs:34:25
#68 24.59 |
#68 24.59 34 | return file.set_times(
#68 24.59 | ^^^^^^^^^
#68 24.59 35 | atime.map(SystemTimeSpec::into_std),
#68 24.59 36 | mtime.map(SystemTimeSpec::into_std),
#68 24.59 | ----------------------------------- unexpected argument of type `Option<fs_set_times::SystemTimeSpec>`
#68 24.59 |
#68 24.59 note: expected `FileTimes`, found `Option<SystemTimeSpec>`
#68 24.59 --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cap-primitives-0.24.1/src/rustix/linux/fs/set_times_impl.rs:35:17
#68 24.59 |
#68 24.59 35 | atime.map(SystemTimeSpec::into_std),
#68 24.59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#68 24.59 = note: expected struct `FileTimes`
#68 24.60 found enum `Option<fs_set_times::SystemTimeSpec>`
#68 24.60 note: method defined here
#68 24.60 --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/fs.rs:695:12
#68 24.60 help: remove the extra argument
#68 24.60 |
#68 24.60 35 - atime.map(SystemTimeSpec::into_std),
#68 24.60 35 + /* FileTimes */,
#68 24.60 |
#68 24.60
#68 24.66 For more information about this error, try `rustc --explain E0061`.
#68 24.67 error: could not compile `cap-primitives` (lib) due to 2 previous errors
#68 24.67 warning: build failed, waiting for other jobs to finish...
I run it on Ubuntu 22.04 machine (x64) with c2w v0.5.2.
I understand that it cannot build Wizer inside a docker environment. I can also see that a function is expected 2 arguments, but get one. I suspect that it is because of some kind of version mismatch somewhere, but where and what to do with it, I am not sure.
Can you, please, help me here.
Thanks.
It seems to be related to #184 . Could you use the latest version of container2wasm?
Yes, it helped. I did not realise, it was reported before. I could not find this issue. It seems to be working just fine. Thank you for your help.