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

build failure of openssl-sys on illumos within rustup project #798

Closed
Rustin170506 opened this issue Mar 15, 2023 · 1 comment · Fixed by rust-lang/rust#109163
Closed

Comments

@Rustin170506
Copy link
Member

For more context - rust-lang/rustup#3263 and sfackler/rust-openssl#1839

In https://github.com/rust-lang/rustup/actions/runs/4398020553/jobs/7701559253 (which will get deleted at some point) we see

install libcrypto.a -> /checkout/target/x86_64-unknown-illumos/release/build/openssl-sys-6ea040a0afa3c9d0/out/openssl-build/install/lib/libcrypto.a
  Makefile:320: recipe for target 'install_dev' failed

  --- stderr
  crypto/init.c: In function 'OPENSSL_atexit':
  crypto/init.c:763:11: warning: variable 'handlersym' set but not used [-Wunused-but-set-variable]
           } handlersym;
             ^~~~~~~~~~
  x86_64-illumos-ar: creating apps/libapps.a
  /bin/sh: 1: granlib: not found
  x86_64-illumos-ar: creating libssl.a
  /bin/sh: 1: granlib: not found
  x86_64-illumos-ar: creating libcrypto.a
  /bin/sh: 1: granlib: not found
  /bin/sh: 5: granlib: not found
  make: *** [install_dev] Error 127
  thread 'main' panicked at '


  Error installing OpenSSL:
      Command: cd "/checkout/target/x86_64-unknown-illumos/release/build/openssl-sys-6ea040a0afa3c9d0/out/openssl-build/build/src" && "make" "install_dev"
      Exit status: exit status: 2


      ', /cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.25.1+1.1.1t/src/lib.rs:509:13
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:575:5
     1: core::panicking::panic_fmt
               at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:64:14
     2: openssl_src::Build::run_command
     3: openssl_src::Build::build
     4: build_script_main::find_vendored::get_openssl
     5: build_script_main::find_openssl
     6: build_script_main::main
     7: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

In rustup, we fetch the docker from rust CI cache. The dockerfile for illumos job from https://github.com/rust-lang/rust/blob/master/src/ci/docker/host-x86_64/dist-x86_64-illumos/Dockerfile.

We use it in https://github.com/rust-lang/rustup/blob/master/ci/docker/x86_64-unknown-illumos/Dockerfile

FROM rust-x86_64-unknown-illumos

ENV \
    AR_x86_64_unknown_illumos=x86_64-illumos-ar \
    CC_x86_64_unknown_illumos=x86_64-illumos-gcc \
    CXX_x86_64_unknown_illumos=x86_64-illumos-g++ \
    CARGO_TARGET_X86_64_UNKNOWN_ILLUMOS_LINKER=x86_64-illumos-gcc

It seems we already set the AR environment. But it didn't work.

@jonhoo
Copy link
Contributor

jonhoo commented Mar 15, 2023

To quote myself from one of those issues:

Oh now that's interesting. The way that's supposed to get picked up is:

  1. get_base_archiver_variant calls env_tool
  2. env_tool calls get_var
  3. get_var checks AR_{target}

Clearly something in that path doesn't work, but it's hard to tell exactly what without access to an illumos system. Any chance you could try adding some debug prints to the above and run the CI to see where the envvar does/does not get picked up?

RalfJung pushed a commit to RalfJung/miri that referenced this issue Mar 22, 2023
…ulacrum

Add RANLIB_x86_64_unknown_illumos env for dist-x86_64-illumos dockerfile

close rust-lang/cc-rs#798

We already set `AR_x86_64_unknown_illumos` in the dockerfile. So it is reasonable to set the `RANLIB_x86_64_unknown_illumos`.
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 20, 2024
…ulacrum

Add RANLIB_x86_64_unknown_illumos env for dist-x86_64-illumos dockerfile

close rust-lang/cc-rs#798

We already set `AR_x86_64_unknown_illumos` in the dockerfile. So it is reasonable to set the `RANLIB_x86_64_unknown_illumos`.
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 27, 2024
…ulacrum

Add RANLIB_x86_64_unknown_illumos env for dist-x86_64-illumos dockerfile

close rust-lang/cc-rs#798

We already set `AR_x86_64_unknown_illumos` in the dockerfile. So it is reasonable to set the `RANLIB_x86_64_unknown_illumos`.
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

Successfully merging a pull request may close this issue.

2 participants