Skip to content

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

Closed
rust-lang/rust
#109163
@0xPoe

Description

@0xPoe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions