cross-rs / cross

“Zero setup” cross compilation and “cross testing” of Rust crates
Apache License 2.0
6.53k stars 365 forks source link

cross test failed with error: test failed, to rerun pass --lib #1308

Open thoongnv opened 1 year ago

thoongnv commented 1 year ago

Checklist

Failed to run cross test --verbose --target aarch64-apple-darwin

Cross.toml

[target.aarch64-apple-darwin]
image = "ghcr.io/thoongnv/aarch64-apple-darwin-cross:latest"

Error output

+ cargo metadata --format-version 1 --filter-platform aarch64-apple-darwin
+ rustc --print sysroot
+ /usr/local/bin/docker
+ /usr/local/bin/docker version -f '{{ .Server.Os }},,,{{ .Server.Arch }}'
[cross] warning: using newer rustc `1.71.1 (eb26296b5 2023-08-03)` for the target. Current active rustc on the host is `rustc 1.71.0 (8ede3aae2 2023-07-12)`.
 > Update with `rustup update`
+ rustup toolchain list
+ rustup target list --toolchain stable-x86_64-unknown-linux-gnu
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu
+ /usr/local/bin/docker run --userns host --platform linux/amd64 -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/Users/thoongnv/.xargo' -e 'CARGO_HOME=/Users/thoongnv/.cargo' -e 'CROSS_RUST_SYSROOT=/Users/thoongnv/.rustup/toolchains/stable-x86_64-unknown-linux-gnu' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e TERM -e 'USER=thoongnv' -e 'CROSS_RUSTC_MAJOR_VERSION=1' -e 'CROSS_RUSTC_MINOR_VERSION=71' -e 'CROSS_RUSTC_PATCH_VERSION=1' --name cross-stable-x86_64-unknown-linux-gnu-a6502-eb26296b5-aarch64-apple-darwin-b55f4-1691759247525 --rm --user 501:20 -v /Users/thoongnv/.xargo:/Users/thoongnv/.xargo:z -v /Users/thoongnv/.cargo:/Users/thoongnv/.cargo:z -v /Users/thoongnv/.cargo/bin -v /Users/thoongnv/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/Users/thoongnv/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:z,ro -t ghcr.io/thoongnv/aarch64-apple-darwin-cross:latest sh -c 'PATH="$PATH":"/Users/thoongnv/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin" cargo test --target aarch64-apple-darwin --verbose'
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
       Fresh human-repr v1.1.0
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
     Running `rustc --crate-name strend --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=180 --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 --test -C metadata=b91c325e75007657 -C extra-filename=-b91c325e75007657 --out-dir /target/aarch64-apple-darwin/debug/deps --target aarch64-apple-darwin -C linker=aarch64-apple-darwin20.4-clang -C incremental=/target/aarch64-apple-darwin/debug/incremental -L dependency=/target/aarch64-apple-darwin/debug/deps -L dependency=/target/debug/deps --extern clap=/target/aarch64-apple-darwin/debug/deps/libclap-c2d62f25938da708.rlib --extern crossterm=/target/aarch64-apple-darwin/debug/deps/libcrossterm-91d4168481bdaf6d.rlib --extern dirs=/target/aarch64-apple-darwin/debug/deps/libdirs-8d1b2790d65d47ee.rlib --extern human_repr=/target/aarch64-apple-darwin/debug/deps/libhuman_repr-85a02160e93561bc.rlib --extern ratatui=/target/aarch64-apple-darwin/debug/deps/libratatui-4354c79e1aa25367.rlib --extern serde=/target/aarch64-apple-darwin/debug/deps/libserde-8fce8b1965933109.rlib --extern serde_json=/target/aarch64-apple-darwin/debug/deps/libserde_json-096651e19a62d9f0.rlib --extern ureq=/target/aarch64-apple-darwin/debug/deps/libureq-eb75b6735bae05f5.rlib --extern url=/target/aarch64-apple-darwin/debug/deps/liburl-d7ab53f126cdcfc9.rlib -L native=/target/aarch64-apple-darwin/debug/build/ring-6de4ddb6e9947e19/out`
     Running `rustc --crate-name strend --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=180 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C metadata=8c8c4ab32cbb9d78 -C extra-filename=-8c8c4ab32cbb9d78 --out-dir /target/aarch64-apple-darwin/debug/deps --target aarch64-apple-darwin -C linker=aarch64-apple-darwin20.4-clang -C incremental=/target/aarch64-apple-darwin/debug/incremental -L dependency=/target/aarch64-apple-darwin/debug/deps -L dependency=/target/debug/deps --extern clap=/target/aarch64-apple-darwin/debug/deps/libclap-c2d62f25938da708.rmeta --extern crossterm=/target/aarch64-apple-darwin/debug/deps/libcrossterm-91d4168481bdaf6d.rmeta --extern dirs=/target/aarch64-apple-darwin/debug/deps/libdirs-8d1b2790d65d47ee.rmeta --extern human_repr=/target/aarch64-apple-darwin/debug/deps/libhuman_repr-85a02160e93561bc.rmeta --extern ratatui=/target/aarch64-apple-darwin/debug/deps/libratatui-4354c79e1aa25367.rmeta --extern serde=/target/aarch64-apple-darwin/debug/deps/libserde-8fce8b1965933109.rmeta --extern serde_json=/target/aarch64-apple-darwin/debug/deps/libserde_json-096651e19a62d9f0.rmeta --extern ureq=/target/aarch64-apple-darwin/debug/deps/libureq-eb75b6735bae05f5.rmeta --extern url=/target/aarch64-apple-darwin/debug/deps/liburl-d7ab53f126cdcfc9.rmeta -L native=/target/aarch64-apple-darwin/debug/build/ring-6de4ddb6e9947e19/out`
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)

warning: `strend` (lib test) generated 5 warnings (5 duplicates)
warning: `strend` (lib) generated 5 warnings (run `cargo fix --lib -p strend` to apply 3 suggestions)
     Running `rustc --crate-name strend --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=180 --emit=dep-info,link -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 --test -C metadata=e5f1a6f4b82c791f -C extra-filename=-e5f1a6f4b82c791f --out-dir /target/aarch64-apple-darwin/debug/deps --target aarch64-apple-darwin -C linker=aarch64-apple-darwin20.4-clang -C incremental=/target/aarch64-apple-darwin/debug/incremental -L dependency=/target/aarch64-apple-darwin/debug/deps -L dependency=/target/debug/deps --extern clap=/target/aarch64-apple-darwin/debug/deps/libclap-c2d62f25938da708.rlib --extern crossterm=/target/aarch64-apple-darwin/debug/deps/libcrossterm-91d4168481bdaf6d.rlib --extern dirs=/target/aarch64-apple-darwin/debug/deps/libdirs-8d1b2790d65d47ee.rlib --extern human_repr=/target/aarch64-apple-darwin/debug/deps/libhuman_repr-85a02160e93561bc.rlib --extern ratatui=/target/aarch64-apple-darwin/debug/deps/libratatui-4354c79e1aa25367.rlib --extern serde=/target/aarch64-apple-darwin/debug/deps/libserde-8fce8b1965933109.rlib --extern serde_json=/target/aarch64-apple-darwin/debug/deps/libserde_json-096651e19a62d9f0.rlib --extern strend=/target/aarch64-apple-darwin/debug/deps/libstrend-8c8c4ab32cbb9d78.rlib --extern ureq=/target/aarch64-apple-darwin/debug/deps/libureq-eb75b6735bae05f5.rlib --extern url=/target/aarch64-apple-darwin/debug/deps/liburl-d7ab53f126cdcfc9.rlib -L native=/target/aarch64-apple-darwin/debug/build/ring-6de4ddb6e9947e19/out`
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)
    Finished test [unoptimized + debuginfo] target(s) in 11.03s
     Running `/target/aarch64-apple-darwin/debug/deps/strend-b91c325e75007657`
error: test failed, to rerun pass `--lib`

Caused by:
  process didn't exit successfully: `/target/aarch64-apple-darwin/debug/deps/strend-b91c325e75007657` (exit status: 127)
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu

What target(s) are you cross-compiling for?

aarch64-apple-darwin

Which operating system is the host (e.g computer cross is on) running?

What architecture is the host?

What container engine is cross using?

cross version

0.2.5