[INFO] cloning repository https://github.com/peakchen90/rust-ffi-demo [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/peakchen90/rust-ffi-demo" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpeakchen90%2Frust-ffi-demo", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpeakchen90%2Frust-ffi-demo'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5ad35c0bf2c24db97e49c5a7f0373243a0ab1ba4 [INFO] testing peakchen90/rust-ffi-demo against beta-2022-04-10 for beta-1.61-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpeakchen90%2Frust-ffi-demo" "/workspace/builds/worker-40/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-40/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/peakchen90/rust-ffi-demo on toolchain beta-2022-04-10 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+beta-2022-04-10" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] removed /workspace/builds/worker-40/source/.cargo/config [INFO] started tweaking git repo https://github.com/peakchen90/rust-ffi-demo [INFO] finished tweaking git repo https://github.com/peakchen90/rust-ffi-demo [INFO] tweaked toml for git repo https://github.com/peakchen90/rust-ffi-demo written to /workspace/builds/worker-40/source/Cargo.toml [INFO] crate git repo https://github.com/peakchen90/rust-ffi-demo already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+beta-2022-04-10" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-40/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-40/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2022-04-10" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] cedf2e521977fec4e80d6d290f43fee6e10edb19c90a3d2cb0d93b5349ce2d20 [INFO] running `Command { std: "docker" "start" "-a" "cedf2e521977fec4e80d6d290f43fee6e10edb19c90a3d2cb0d93b5349ce2d20", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "cedf2e521977fec4e80d6d290f43fee6e10edb19c90a3d2cb0d93b5349ce2d20", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cedf2e521977fec4e80d6d290f43fee6e10edb19c90a3d2cb0d93b5349ce2d20", kill_on_drop: false }` [INFO] [stdout] cedf2e521977fec4e80d6d290f43fee6e10edb19c90a3d2cb0d93b5349ce2d20 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-40/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-40/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2022-04-10" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 7684a6b14c14d9f23528fe0d889c3522fdf1f58062281334e8d438809790f34e [INFO] running `Command { std: "docker" "start" "-a" "7684a6b14c14d9f23528fe0d889c3522fdf1f58062281334e8d438809790f34e", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.106 [INFO] [stderr] Compiling cc v1.0.71 [INFO] [stderr] Compiling dunce v0.1.1 [INFO] [stderr] Compiling rust-ffi-demo v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `CStr` [INFO] [stdout] --> src/main.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | use std::ffi::{CStr, CString}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:23:47 [INFO] [stdout] | [INFO] [stdout] 23 | CString::new("abc.json").unwrap().as_ptr(), [INFO] [stdout] | --------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(temporary_cstring_as_ptr)]` on by default [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: linking with `cc` failed: exit status: 1 [INFO] [stdout] | [INFO] [stdout] = note: "cc" "-m64" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.0.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.1.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.10.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.11.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.12.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.13.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.14.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.15.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.2.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.3.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.4.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.5.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.6.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.7.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.8.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.rust_ffi_demo.eecfbb2d-cgu.9.rcgu.o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0.2bg32py4rlwq8twc.rcgu.o" "-Wl,--as-needed" "-L" "/opt/rustwide/target/debug/deps" "-L" "/opt/rustwide/workdir/lib" "-L" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-ljson" "-Wl,-Bdynamic" "-lc++" "-Wl,-Bstatic" "/opt/rustwide/target/debug/deps/liblibc-5060282b06eda91a.rlib" "-Wl,--start-group" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-5534b29ea7b2d8f5.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-8bfbb13072fc2761.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-d6d1fa92fa620f17.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-7cfd201521727d95.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-0e8010e8fce8e5a7.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-19093fec3c6dd913.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-89c4cbe9256c1890.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-73e4507673363945.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-3fe98c0f46f27964.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-a76787f08d45e37d.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-8cea480e62c5b261.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-1fb939608cd05a1c.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-842e67e3ab562f66.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-0c1c8fec3b1a54cc.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-689faa634b72af17.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6c2c561a8181be5e.rlib" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-88c4d85fe493b0a6.rlib" "-Wl,--end-group" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-f5394bdb1df5df01.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/opt/rustwide/rustup-home/toolchains/beta-2022-04-10-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/opt/rustwide/target/debug/deps/rust_ffi_demo-51f647bfc9f43be0" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs" [INFO] [stdout] = note: /usr/bin/ld: cannot find -lc++ [INFO] [stdout] collect2: error: ld returned 1 exit status [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to previous error; 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-ffi-demo` due to 2 previous errors; 2 warnings emitted [INFO] running `Command { std: "docker" "inspect" "7684a6b14c14d9f23528fe0d889c3522fdf1f58062281334e8d438809790f34e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7684a6b14c14d9f23528fe0d889c3522fdf1f58062281334e8d438809790f34e", kill_on_drop: false }` [INFO] [stdout] 7684a6b14c14d9f23528fe0d889c3522fdf1f58062281334e8d438809790f34e