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

Question on Using cargo-zigbuild on Github Actions #48

Closed
Alexhuszagh opened this issue Jul 16, 2022 · 11 comments
Closed

Question on Using cargo-zigbuild on Github Actions #48

Alexhuszagh opened this issue Jul 16, 2022 · 11 comments

Comments

@Alexhuszagh
Copy link

Alexhuszagh commented Jul 16, 2022

We're currently integrating cargo-zigbuild into cross so users can use Zig as a build option. However, we're having issues with our tests on Github Actions only, and not on other platforms. You can see the branch here, and the Dockerfile, install script and the unit test.

This all works locally, however, remotely we get the following error:

 linking with `/target/.zig-cache/cargo-zigbuild/0.11.0/zigcc-aarch64-unknown-linux-gnu.sh` failed: exit status: 1
  |
  = note: "/target/.zig-cache/cargo-zigbuild/0.11.0/zigcc-aarch64-unknown-linux-gnu.sh" "/tmp/rustcnFDA50/symbols.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.0.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.1.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.2.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.3.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.4.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.5.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.6.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.10fzz8b4ho7iorr3.rcgu.o" "-Wl,--as-needed" "-L" "/target/aarch64-unknown-linux-gnu/debug/deps" "-L" "/target/debug/deps" "-L" "/target/aarch64-unknown-linux-gnu/debug/build/hellopp-b4a65d93ae4b90e2/out" "-L" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-lhellopp" "-Wl,-Bdynamic" "-lstdc++" "-Wl,-Bstatic" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libprofiler_builtins-b4bb8a40a3bce56c.rlib" "-Wl,--start-group" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-b812d6379bd75baf.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libpanic_unwind-c5cf7d82d7a597a0.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libobject-ce2a5d924aa49c24.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libmemchr-bdbdcabccd4adfad.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libaddr2line-32067fbbacfe8083.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libgimli-d82d17b787655934.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_demangle-705e8d6262b6eeab.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd_detect-8aea905fd8ff2140.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libhashbrown-b7ecbbe7cf3e6987.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libminiz_oxide-1e24b50adc3afbb8.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libadler-370397c4344bd6c7.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-88481b0ef653f36e.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libunwind-e1d352ef10278be8.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-c683666299058001.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-858c77b132af81a4.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-09564a414b1e3dc2.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_core-29986b3e66a93e59.rlib" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-3f2c37f52ad5a7db.rlib" "-Wl,--end-group" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-722618853e6812fb.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/rust/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs" "-u" "__llvm_profile_runtime"
  = note: warning: unsupported linker arg: -znoexecstack
          warning: unsupported linker arg: -zrelro
          warning: unsupported linker arg: -znow
          error: FileNotFound

Specifically, it seems /target/.zig-cache/cargo-zigbuild/0.11.0/zigcc-aarch64-unknown-linux-gnu.sh isn't created, for some weird reason. Everything works locally, so I'm very confused on how this works. Here's a link to the failing action. I was wondering if you had any experience with this.

The specific PR is cross-rs/cross#880, in case if the context helps. The only special things cross does here is it mounts CARGO_HOME to /cargo, and the target directory to /target. Github Actions doesn't have a Docker-in-Docker situation, so this is quite unexpected. The other is we invoke cargo-zigbuild directly, rather than use cargo zigbuild, since we download it for a specific architecture rather than build from source.

@Alexhuszagh Alexhuszagh changed the title Question on Using cargo-zigbuils on Github Actions Question on Using cargo-zigbuild on Github Actions Jul 16, 2022
@messense
Copy link
Member

Specifically, it seems /target/.zig-cache/cargo-zigbuild/0.11.0/zigcc-aarch64-unknown-linux-gnu.sh isn't created, for some weird reason

I don't think it's not created because the unsupported linker arg: -znoexecstack warning should have came from zig cc. And in Rust error: FileNotFound usually comes with OS error code for example Os { code: 2, kind: NotFound, message: "No such file or directory" }.

I've had some issue with cache handling in zig cc, for example https://github.com/messense/cargo-zigbuild/runs/7355457726?check_suite_focus=true, the FileNotFound error message is similar.

The other is we invoke cargo-zigbuild directly, rather than use cargo zigbuild

This should be fine, cargo-zigbuild build is the same as cargo zigbuild under the hood.

@messense
Copy link
Member

You could try set ZIG_GLOBAL_CACHE_DIR to a writable place.

See ziglang/zig#11394

@Alexhuszagh
Copy link
Author

I think it's specifically this isn't being crated: zigcc-aarch64-unknown-linux-gnu.sh, which would in the cache, or it isn't being found. So this might be on the zig cc end. I wonder if exporting ZIG_GLOBAL_CACHE_DIR would help. We could try to same directory, since /target/.zig-cache will always be writable.

@messense
Copy link
Member

I think it's specifically this isn't being crated: zigcc-aarch64-unknown-linux-gnu.sh, which would in the cache, or it isn't being found.

To test this, I tried comment out these two lines and run cargo-zigbuild build

https://github.com/messense/cargo-zigbuild/blob/ece6782d6da40f7980222836674d6b7a5bd46968/src/zig.rs#L527-L528

$ cargo-zigbuild build --manifest-path tests/hello-rustls/Cargo.toml --target aarch64-unknown-linux-gnu
   Compiling ring v0.16.20
   Compiling unicode-normalization v0.1.19
   Compiling num_cpus v1.13.1
   Compiling socket2 v0.4.4
error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `/root/code/cargo-zigbuild/tests/hello-rustls/target/debug/build/ring-5a5041ae08ab4353/build-script-build` (exit status: 101)
  --- stdout
  OPT_LEVEL = Some("0")
  TARGET = Some("aarch64-unknown-linux-gnu")
  HOST = Some("x86_64-unknown-linux-gnu")
  CC_aarch64-unknown-linux-gnu = None
  CC_aarch64_unknown_linux_gnu = Some("/root/.cache/cargo-zigbuild/0.11.1/zigcc-aarch64-unknown-linux-gnu.sh")
  CFLAGS_aarch64-unknown-linux-gnu = None
  CFLAGS_aarch64_unknown_linux_gnu = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("neon,pmuv3")

  --- stderr
  running "/root/.cache/cargo-zigbuild/0.11.1/zigcc-aarch64-unknown-linux-gnu.sh" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/root/code/cargo-zigbuild/tests/hello-rustls/target/aarch64-unknown-linux-gnu/debug/build/ring-6c69e656904de07c/out/aesv8-armx-linux64.o" "/root/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"
  thread 'main' panicked at 'failed to execute ["/root/.cache/cargo-zigbuild/0.11.1/zigcc-aarch64-unknown-linux-gnu.sh" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/root/code/cargo-zigbuild/tests/hello-rustls/target/aarch64-unknown-linux-gnu/debug/build/ring-6c69e656904de07c/out/aesv8-armx-linux64.o" "/root/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"]: No such file or directory (os error 2)', /root/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.20/build.rs:653:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

@messense
Copy link
Member

A simpler one without rustls dependency

$ cargo-zigbuild build --manifest-path tests/libhello/Cargo.toml --target aarch64-unknown-linux-gnu
   Compiling hello v0.1.0 (/root/code/cargo-zigbuild/tests/libhello)
error: linker `/root/.cache/cargo-zigbuild/0.11.1/zigcc-aarch64-unknown-linux-gnu.sh` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `hello` due to previous error

@Alexhuszagh
Copy link
Author

Alexhuszagh commented Jul 17, 2022

So that looks identical, which means that it seems it's either not being written or zig cc isn't finding it. If the cache dir doesn't work, I'll just check using CI to look inside that directory by just using find and dumping every file name. Also, thanks.

Update: Setting the global cache didn't seem to work. I'll just intercept stuff internally and run a check on the directory using find when the command fails.

@sigmaSd
Copy link

sigmaSd commented Jul 17, 2022

Just to add some info I tried zigbuild with GitHub action and it seems to just work https://github.com/sigmaSd/reedline-deno/blob/master/.github/workflows/rust.yml

@Alexhuszagh
Copy link
Author

Alexhuszagh commented Jul 17, 2022

Interesting, because it's currently working for me on (all containers are x86_64 Linux, the documented items below are the hosts):

  • x86_64 Linux GNU (Fedora 36, local machine)
    • Docker
    • Podman
  • x86_64 Windows MSVC (Windows 10)
    • Docker
  • x86_64 Windows WSL2 (Windows 10, Ubuntu 22.04)
    • Podman

I have an x86_64 Apple Darwin computer I could test, but it doesn't seem the host is the issue. I believe WSL2 will also work, but it hasn't finished running. In short, it doesn't seem the host or the container engine matters, which is what makes this even more unexpected. I'll try a docker-in-docker scenario and see if that does anything (which isn't expected, since I don't believe Github Actions runs in a container).

I'll try to get more information, but this is very perplexing and thanks for all your help so far.

@messense
Copy link
Member

Yeah, some of the CI failures (without using containers) also works for me locally. It's very confusing.

@Alexhuszagh
Copy link
Author

Alexhuszagh commented Jul 17, 2022

It might be a cross-related issue: it seems like that it might be the minimal toolchains we install, although this might not be related to the issue at hand. Here's the log.

The lines of interest are (for all but aarch64-unknown-linux-gnu):

2022-07-17T04:51:18.5780808Z + /usr/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/home/runner/.xargo' -e 'CARGO_HOME=/home/runner/.cargo' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e 'XDG_CACHE_HOME=/target/.zig-cache' -e CARGO_HTTP_CHECK_REVOKE -e CARGO_TMP_DIR -e RUSTFLAGS -e CARGO_NET_RETRY -e CARGO_INCREMENTAL -e 'USER=runner' --rm --user 1001:121 -v /home/runner/.xargo:/home/runner/.xargo:Z -v /home/runner/.cargo:/home/runner/.cargo:Z -v /home/runner/.cargo/bin -v /tmp/tmp.sVolQwobL5:/tmp/tmp.sVolQwobL5:Z -v /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:Z,ro -v /tmp/tmp.sVolQwobL5/target:/target:Z -w /tmp/tmp.sVolQwobL5 ghcr.io/cross-rs/zig:trying sh -c 'PATH="$PATH":"/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin" cargo-zigbuild build --target i586-unknown-linux-gnu --verbose; find /target/.zig-cache'
2022-07-17T04:51:19.3500036Z    Compiling cc v1.0.73
2022-07-17T04:51:19.3501854Z      Running `rustc --crate-name cc --edition=2018 /home/runner/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/cc-1.0.73/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=c21c7a106c7d7735 -C extra-filename=-c21c7a106c7d7735 --out-dir /target/debug/deps -L dependency=/target/debug/deps --cap-lints allow`
2022-07-17T04:51:20.4067922Z    Compiling hellopp v0.1.0 (/tmp/tmp.sVolQwobL5)
2022-07-17T04:51:20.4071585Z      Running `rustc --crate-name build_script_build build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=a3da4c8b0c9fd52e -C extra-filename=-a3da4c8b0c9fd52e --out-dir /target/debug/build/hellopp-a3da4c8b0c9fd52e -L dependency=/target/debug/deps --extern cc=/target/debug/deps/libcc-c21c7a106c7d7735.rlib`
2022-07-17T04:51:20.6931274Z      Running `/target/debug/build/hellopp-a3da4c8b0c9fd52e/build-script-build`
2022-07-17T04:51:21.3790324Z      Running `rustc --crate-name hellopp src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=1fe2fb8b2ebe6247 -C extra-filename=-1fe2fb8b2ebe6247 --out-dir /target/i586-unknown-linux-gnu/debug/deps --target i586-unknown-linux-gnu -C linker=/target/.zig-cache/cargo-zigbuild/0.11.0/zigcc-i586-unknown-linux-gnu.sh -L dependency=/target/i586-unknown-linux-gnu/debug/deps -L dependency=/target/debug/deps -C instrument-coverage --remap-path-prefix /home/runner/work/cross/cross= -L native=/target/i586-unknown-linux-gnu/debug/build/hellopp-a038f8c52124dde9/out -l static=hellopp -l stdc++`
2022-07-17T04:51:21.4018767Z error[E0463]: can't find crate for `profiler_builtins`
2022-07-17T04:51:21.4019196Z   |
2022-07-17T04:51:21.4019503Z   = note: the compiler may have been built without the profiler runtime
2022-07-17T04:51:21.4019809Z 
2022-07-17T04:51:21.4039105Z For more information about this error, try `rustc --explain E0463`.
2022-07-17T04:51:21.4066051Z error: could not compile `hellopp` due to previous error
2022-07-17T04:51:21.4066261Z 

For aarch64-unknown-linux-gnu, it seems the linker itself is present, so it's failing in something that the linker wrapper is calling (which might be due to the minimal Rust profile we use):

2022-07-17T04:51:06.8705619Z error: linking with `/target/.zig-cache/cargo-zigbuild/0.11.0/zigcc-aarch64-unknown-linux-gnu.sh` failed: exit status: 1
2022-07-17T04:51:06.8706091Z   |
2022-07-17T04:51:06.8719103Z   = note: "/target/.zig-cache/cargo-zigbuild/0.11.0/zigcc-aarch64-unknown-linux-gnu.sh" "/tmp/rustcwx4w3C/symbols.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.0.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.1.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.2.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.3.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.4.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.5.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.hellopp.b314e6c4-cgu.6.rcgu.o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b.10fzz8b4ho7iorr3.rcgu.o" "-Wl,--as-needed" "-L" "/target/aarch64-unknown-linux-gnu/debug/deps" "-L" "/target/debug/deps" "-L" "/target/aarch64-unknown-linux-gnu/debug/build/hellopp-b4a65d93ae4b90e2/out" "-L" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-lhellopp" "-Wl,-Bdynamic" "-lstdc++" "-Wl,-Bstatic" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libprofiler_builtins-b4bb8a40a3bce56c.rlib" "-Wl,--start-group" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-b812d6379bd75baf.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libpanic_unwind-c5cf7d82d7a597a0.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libobject-ce2a5d924aa49c24.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libmemchr-bdbdcabccd4adfad.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libaddr2line-32067fbbacfe8083.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libgimli-d82d17b787655934.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_demangle-705e8d6262b6eeab.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd_detect-8aea905fd8ff2140.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libhashbrown-b7ecbbe7cf3e6987.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libminiz_oxide-1e24b50adc3afbb8.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libadler-370397c4344bd6c7.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-88481b0ef653f36e.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libunwind-e1d352ef10278be8.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-c683666299058001.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-858c77b132af81a4.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-09564a414b1e3dc2.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_core-29986b3e66a93e59.rlib" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-3f2c37f52ad5a7db.rlib" "-Wl,--end-group" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-722618853e6812fb.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/target/aarch64-unknown-linux-gnu/debug/deps/hellopp-7138865ce567f34b" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs" "-u" "__llvm_profile_runtime"
2022-07-17T04:51:06.8727349Z   = note: warning: unsupported linker arg: -znoexecstack
2022-07-17T04:51:06.8728189Z           warning: unsupported linker arg: -zrelro
2022-07-17T04:51:06.8728618Z           warning: unsupported linker arg: -znow
2022-07-17T04:51:06.8728909Z           error: FileNotFound
2022-07-17T04:51:06.8729212Z           
2022-07-17T04:51:06.8729350Z 
2022-07-17T04:51:06.9460160Z error: could not compile `hellopp` due to previous error
2022-07-17T04:51:06.9460385Z 
2022-07-17T04:51:06.9460455Z Caused by:
2022-07-17T04:51:06.9462729Z   process didn't exit successfully: `rustc --crate-name hellopp src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=7138865ce567f34b -C extra-filename=-7138865ce567f34b --out-dir /target/aarch64-unknown-linux-gnu/debug/deps --target aarch64-unknown-linux-gnu -C linker=/target/.zig-cache/cargo-zigbuild/0.11.0/zigcc-aarch64-unknown-linux-gnu.sh -L dependency=/target/aarch64-unknown-linux-gnu/debug/deps -L dependency=/target/debug/deps -C instrument-coverage --remap-path-prefix /home/runner/work/cross/cross= -L native=/target/aarch64-unknown-linux-gnu/debug/build/hellopp-b4a65d93ae4b90e2/out -l static=hellopp -l stdc++` (exit status: 1)
2022-07-17T04:51:07.0131991Z /target/.zig-cache
2022-07-17T04:51:07.0132408Z /target/.zig-cache/cargo-zigbuild
2022-07-17T04:51:07.0132811Z /target/.zig-cache/cargo-zigbuild/0.11.0
2022-07-17T04:51:07.0133343Z /target/.zig-cache/cargo-zigbuild/0.11.0/zigcxx-aarch64-unknown-linux-gnu.sh
2022-07-17T04:51:07.0133921Z /target/.zig-cache/cargo-zigbuild/0.11.0/zigcc-aarch64-unknown-linux-gnu.sh

@Alexhuszagh
Copy link
Author

Wait, this has to be due to the instrument coverage we use in the setup. Thanks for all the help, this was a "me" mistake it seems. Not failing fast helped a lot. I'll re-open this if there's another issue.

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

No branches or pull requests

3 participants