ktock / container2wasm

Container to WASM converter

Home Page:https://ktock.github.io/container2wasm-demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cap-primitives failing to build when using c2w

progrium opened this issue · comments

Using v0.5.2 works fine until a rust package seems to fail to compile. Logs starting at error:

#44 46.10 error[E0061]: this method takes 1 argument but 2 arguments were supplied
#44 46.10   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cap-primitives-0.24.1/src/rustix/linux/fs/set_times_impl.rs:20:25
#44 46.10    |
#44 46.10 20 |             return file.set_times(
#44 46.10    |                         ^^^^^^^^^
#44 46.10 21 |                 atime.map(SystemTimeSpec::into_std),
#44 46.10 22 |                 mtime.map(SystemTimeSpec::into_std),
#44 46.10    |                 ----------------------------------- unexpected argument of type `Option<fs_set_times::SystemTimeSpec>`
#44 46.10    |
#44 46.10 note: expected `FileTimes`, found `Option<SystemTimeSpec>`
#44 46.10   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cap-primitives-0.24.1/src/rustix/linux/fs/set_times_impl.rs:21:17
#44 46.10    |
#44 46.10 21 |                 atime.map(SystemTimeSpec::into_std),
#44 46.10    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#44 46.10    = note: expected struct `FileTimes`
#44 46.10                 found enum `Option<fs_set_times::SystemTimeSpec>`
#44 46.10 note: method defined here
#44 46.10   --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/fs.rs:695:12
#44 46.10 help: remove the extra argument
#44 46.10    |
#44 46.10 21 -                 atime.map(SystemTimeSpec::into_std),
#44 46.10 21 +                 /* FileTimes */,
#44 46.10    |
#44 46.10 
#44 46.10 error[E0061]: this method takes 1 argument but 2 arguments were supplied
#44 46.10   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cap-primitives-0.24.1/src/rustix/linux/fs/set_times_impl.rs:34:25
#44 46.10    |
#44 46.10 34 |             return file.set_times(
#44 46.10    |                         ^^^^^^^^^
#44 46.10 35 |                 atime.map(SystemTimeSpec::into_std),
#44 46.10 36 |                 mtime.map(SystemTimeSpec::into_std),
#44 46.10    |                 ----------------------------------- unexpected argument of type `Option<fs_set_times::SystemTimeSpec>`
#44 46.10    |
#44 46.10 note: expected `FileTimes`, found `Option<SystemTimeSpec>`
#44 46.10   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cap-primitives-0.24.1/src/rustix/linux/fs/set_times_impl.rs:35:17
#44 46.10    |
#44 46.10 35 |                 atime.map(SystemTimeSpec::into_std),
#44 46.10    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#44 46.10    = note: expected struct `FileTimes`
#44 46.10                 found enum `Option<fs_set_times::SystemTimeSpec>`
#44 46.10 note: method defined here
#44 46.10   --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/fs.rs:695:12
#44 46.10 help: remove the extra argument
#44 46.10    |
#44 46.10 35 -                 atime.map(SystemTimeSpec::into_std),
#44 46.10 35 +                 /* FileTimes */,
#44 46.10    |
#44 46.10 
#44 46.16    Compiling sha2 v0.9.8
#44 46.21 For more information about this error, try `rustc --explain E0061`.
#44 46.22 error: could not compile `cap-primitives` (lib) due to 2 previous errors
#44 46.22 warning: build failed, waiting for other jobs to finish...
#44 ...

#20 [assets-base 2/3] RUN apt-get update && apt-get install -y git
#20 49.06 Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1624 kB]
#20 53.49 Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [50.4 kB]
#20 53.56 Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1635 kB]
#20 ...

#49 [runc-amd64-dev 2/2] RUN --mount=type=cache,target=/root/.cache/go-build     --mount=type=cache,target=/go/pkg/mod     git clone https://github.com/opencontainers/runc.git /go/src/github.com/opencontainers/runc &&     cd /go/src/github.com/opencontainers/runc &&     git checkout "v1.1.10" &&     make static GOARCH=amd64 CC=gcc EXTRA_LDFLAGS='-s -w' BUILDTAGS="" EXTRA_LDFLAGS='-s -w' BUILDTAGS="" &&     mkdir -p /out/ && mv runc /out/runc
#49 26.70 Note: switching to 'v1.1.10'.
#49 26.70 
#49 26.70 You are in 'detached HEAD' state. You can look around, make experimental
#49 26.70 changes and commit them, and you can discard any commits you make in this
#49 26.70 state without impacting any branches by switching back to a branch.
#49 26.70 
#49 26.70 If you want to create a new branch to retain commits you create, you may
#49 26.70 do so (now or later) by using -c with the switch command. Example:
#49 26.70 
#49 26.70   git switch -c <new-branch-name>
#49 26.70 
#49 26.70 Or undo this operation with:
#49 26.70 
#49 26.70   git switch -
#49 26.70 
#49 26.70 Turn off this advice by setting config variable advice.detachedHead to false
#49 26.70 
#49 26.70 HEAD is now at 18a0cb0f VERSION: release 1.1.10
#49 26.76 go build -trimpath -buildmode=pie  -tags " netgo osusergo" -ldflags "-X main.gitCommit=v1.1.10-0-g18a0cb0f -X main.version=1.1.10 -linkmode external -extldflags --static-pie -s -w" -o runc .
#49 DONE 27.9s

#20 [assets-base 2/3] RUN apt-get update && apt-get install -y git
#20 55.99 Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [50.4 kB]
#20 56.24 Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [28.1 kB]
#20 56.26 Fetched 29.1 MB in 56s (520 kB/s)
#20 56.26 Reading package lists...
#20 CANCELED

#44 [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
#44 ERROR: process "/bin/sh -c git clone https://github.com/bytecodealliance/wizer &&     cd wizer &&     git checkout \"${WIZER_VERSION}\" &&     cargo build --bin wizer --all-features &&     mkdir -p /tools/wizer/ &&     mv include target/debug/wizer /tools/wizer/ &&     cargo clean" did not complete successfully: exit code: 101

#37 [tini-amd64-dev 1/5] RUN apt-get update -y && apt-get install -y cmake
#37 CANCELED
------
 > [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:
46.10 help: remove the extra argument
46.10    |
46.10 35 -                 atime.map(SystemTimeSpec::into_std),
46.10 35 +                 /* FileTimes */,
46.10    |
46.10 
46.16    Compiling sha2 v0.9.8
46.21 For more information about this error, try `rustc --explain E0061`.
46.22 error: could not compile `cap-primitives` (lib) due to 2 previous errors
46.22 warning: build failed, waiting for other jobs to finish...
------
Dockerfile:435
--------------------
 434 |     WORKDIR /work/
 435 | >>> RUN git clone https://github.com/bytecodealliance/wizer && \
 436 | >>>     cd wizer && \
 437 | >>>     git checkout "${WIZER_VERSION}" && \
 438 | >>>     cargo build --bin wizer --all-features && \
 439 | >>>     mkdir -p /tools/wizer/ && \
 440 | >>>     mv include target/debug/wizer /tools/wizer/ && \
 441 | >>>     cargo clean
 442 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c git clone https://github.com/bytecodealliance/wizer &&     cd wizer &&     git checkout \"${WIZER_VERSION}\" &&     cargo build --bin wizer --all-features &&     mkdir -p /tools/wizer/ &&     mv include target/debug/wizer /tools/wizer/ &&     cargo clean" did not complete successfully: exit code: 101
exit status 1

Sorry I see there is a newer version, will try it and close if fixed.