Building a Rust application on GitHub Actions gives me "error: UnknownOperatingSystem"

64 Views Asked by At

I'm building a Rust application with Cargo Lambda that will be deployed on AWS. The application is built using GitHub Actions for x86 architecture and doing the deployment as well in the workflow.

However I encounter a strange issue when building the Rust application on GitHub Actions.

Locally it builds for ARM64 and it works without any issue. Only on GitHub Actions it throws me an exit status.

Cargo.toml:

[package]
name = "lambda-api"
version = "0.1.0"
edition = "2021"
rust-version = "1.76"

[dependencies]
lambda_http = "0.10.0"
lambda_runtime = "0.10.0"
tokio = { version = "1", features = ["full"] }
tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.3", default-features = false, features = ["env-filter", "fmt"] }
serde = { version = "1.0.196", features = ["derive"] }
reqwest = { version = "0.11", features = ["json"] }
openssl-sys = "0.9"
openssl = { version = "0.10", features = ["vendored"], resolver = "1" }
serde_json = "1.0.113"
base64 = "0.22.0"
log = "0.4.20"
chrono = "0.4"

CI workflow file:

name: AWS Lambda Deployment

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@stable
      - uses: goto-bus-stop/setup-zig@v1
        with:
          version: 0.9.1
      - uses: zerj9/[email protected]

      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable

      - name: Install dependencies
        run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config

      - name: Cache Cargo Dependencies
        uses: actions/cache@v2
        with:
          path: |
            ~/.cargo
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

      - name: Run Clippy
        run: cargo clippy --all-targets --all-features
        working-directory: lambda-api

      - name: Build Lambda Function
        run: |
          cargo lambda build --release --target x86_64-unknown-linux-gnu --output-format zip
        working-directory: lambda-api

      - name: Save Artifact
        uses: actions/upload-artifact@v2
        with:
          name: lambda-artifact
          path: ./lambda-api/target/lambda/lambda-api/bootstrap.zip

  deploy:
    needs: build
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3

    - name: Download Artifact
      uses: actions/download-artifact@v2
      with:
        name: lambda-artifact

    - name: Set Up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'

    - name: Install Dependencies
      run: pip install boto3

    - name: Deploy to AWS
      run: python cdk/setup_infrastructure.py
      env:
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        AWS_DEFAULT_REGION: 'eu-north-1'

This is the main error:

error: failed to run custom build command for openssl-sys v0.9.101

--- stderr
  error: UnknownOperatingSystem
  make[1]: *** [Makefile:3016: apps/lib/libapps-lib-app_libctx.o] Error 1
  make: *** [Makefile:1521: build_libs] Error 2
  thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-300.2.3+3.2.1/src/lib.rs:611:9:

  Error building OpenSSL:
      Command: cd "/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/build/src" && MAKEFLAGS="-j --jobserver-fds=7,8 --jobserver-auth=7,8" "make" "build_libs"
      Exit status: exit status: 2

I tried running the build using the environment variable RUST_BACKTRACE=full and it gives me back this output:

Run RUST_BACKTRACE=full cargo lambda build --release --target x86_64-unknown-linux-gnu --output-format zip
warning: unused manifest key: dependencies.openssl.resolver
   Compiling proc-macro2 v1.0.79
   Compiling unicode-ident v1.0.12
   Compiling serde v1.0.197
   Compiling autocfg v1.1.0
   Compiling libc v0.2.153
   Compiling quote v1.0.35
   Compiling syn v2.0.53
   Compiling pin-project-lite v0.2.13
   Compiling cfg-if v1.0.0
   Compiling itoa v1.0.10
   Compiling once_cell v1.19.0
   Compiling futures-core v0.3.30
   Compiling lock_api v0.4.11
   Compiling parking_lot_core v0.9.9
   Compiling fnv v1.0.7
   Compiling scopeguard v1.2.0
   Compiling smallvec v1.13.1
   Compiling slab v0.4.9
   Compiling futures-sink v0.3.30
   Compiling parking_lot v0.12.1
   Compiling serde_derive v1.0.197
   Compiling tokio-macros v2.2.0
   Compiling num_cpus v1.16.0
   Compiling mio v0.8.11
   Compiling socket2 v0.5.6
   Compiling signal-hook-registry v1.4.1
   Compiling log v0.4.21
   Compiling futures-macro v0.3.30
   Compiling bytes v1.5.0
   Compiling tokio v1.36.0
   Compiling futures-channel v0.3.30
   Compiling tracing-core v0.1.32
   Compiling pin-utils v0.1.0
   Compiling futures-task v0.3.30
   Compiling memchr v2.7.1
   Compiling futures-io v0.3.30
   Compiling futures-util v0.3.30
   Compiling tracing-attributes v0.1.27
   Compiling tracing v0.1.40
   Compiling cc v1.0.90
   Compiling openssl-src v300.2.3+3.2.1
   Compiling httparse v1.8.0
   Compiling vcpkg v0.2.15
   Compiling pkg-config v0.3.30
   Compiling openssl-sys v0.9.101
   Compiling http v1.1.0
   Compiling try-lock v0.2.5
   Compiling want v0.3.1
   Compiling tower-service v0.3.2
   Compiling serde_json v1.0.114
   Compiling ryu v1.0.17
   Compiling http-body v1.0.0
   Compiling percent-encoding v2.3.1
   Compiling form_urlencoded v1.2.1
   Compiling pin-project-internal v1.1.5
   Compiling tinyvec_macros v0.1.1
   Compiling regex-syntax v0.6.29
   Compiling regex-syntax v0.8.2
error: failed to run custom build command for `openssl-sys v0.9.101`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/home/runner/work/rustapp/rustapp/lambda-api/target/release/build/openssl-sys-32858c1fa237fd84/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = Some("/home/runner/.cache/cargo-zigbuild/0.11.1/zigcc-x86_64-unknown-linux-gnu.sh")
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
  AR_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
  AR_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_AR
  HOST_AR = None
  cargo:rerun-if-env-changed=AR
  AR = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
  ARFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
  ARFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_ARFLAGS
  HOST_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  cargo:rerun-if-env-changed=RANLIB_x86_64-unknown-linux-gnu
  RANLIB_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=RANLIB_x86_64_unknown_linux_gnu
  RANLIB_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_RANLIB
  HOST_RANLIB = None
  cargo:rerun-if-env-changed=RANLIB
  RANLIB = None
  cargo:rerun-if-env-changed=RANLIBFLAGS_x86_64-unknown-linux-gnu
  RANLIBFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=RANLIBFLAGS_x86_64_unknown_linux_gnu
  RANLIBFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_RANLIBFLAGS
  HOST_RANLIBFLAGS = None
  cargo:rerun-if-env-changed=RANLIBFLAGS
  RANLIBFLAGS = None
  running cd "/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/build/src" && env -u CROSS_COMPILE AR="ar" CC="/home/runner/.cache/cargo-zigbuild/0.11.1/zigcc-x86_64-unknown-linux-gnu.sh" RANLIB="ranlib" "perl" "./Configure" "--prefix=/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "--target=x86_64-unknown-linux-gnu"
  Configuring OpenSSL version 3.2.1 for target linux-x86_64
  Using os-specific seed configuration
  Created configdata.pm
  Running configdata.pm
  Created Makefile.in
  Created Makefile
  Created include/openssl/configuration.h

  **********************************************************************
  ***                                                                ***
  ***   OpenSSL has been successfully configured                     ***
  ***                                                                ***
  ***   If you encounter a problem while building, please open an    ***
  ***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
  ***   and include the output from the following command:           ***
  ***                                                                ***
  ***       perl configdata.pm --dump                                ***
  ***                                                                ***
  ***   (If you are new to OpenSSL, you might want to consult the    ***
  ***   'Troubleshooting' section in the INSTALL.md file first)      ***
  ***                                                                ***
  **********************************************************************
  running cd "/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/build/src" && "make" "depend"
  running cd "/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/build/src" && MAKEFLAGS="-j --jobserver-fds=7,8 --jobserver-auth=7,8" "make" "build_libs"
  /usr/bin/perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" crypto/params_idx.c.in > crypto/params_idx.c
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
  /usr/bin/perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" include/internal/param_names.h.in > include/internal/param_names.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/asn1.h.in > include/openssl/asn1.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/asn1t.h.in > include/openssl/asn1t.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/bio.h.in > include/openssl/bio.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/cmp.h.in > include/openssl/cmp.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/cms.h.in > include/openssl/cms.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/conf.h.in > include/openssl/conf.h
  /usr/bin/perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" include/openssl/core_names.h.in > include/openssl/core_names.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/crmf.h.in > include/openssl/crmf.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/crypto.h.in > include/openssl/crypto.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ct.h.in > include/openssl/ct.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/err.h.in > include/openssl/err.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ess.h.in > include/openssl/ess.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/fipskey.h.in > include/openssl/fipskey.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/lhash.h.in > include/openssl/lhash.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ocsp.h.in > include/openssl/ocsp.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/opensslv.h.in > include/openssl/opensslv.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/pkcs12.h.in > include/openssl/pkcs12.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/pkcs7.h.in > include/openssl/pkcs7.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/safestack.h.in > include/openssl/safestack.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/srp.h.in > include/openssl/srp.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ssl.h.in > include/openssl/ssl.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ui.h.in > include/openssl/ui.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509.h.in > include/openssl/x509.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509_vfy.h.in > include/openssl/x509_vfy.h
  /usr/bin/perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509v3.h.in > include/openssl/x509v3.h
  make depend && make _build_libs
  make[1]: Entering directory '/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/build/src'
  make[1]: Leaving directory '/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/build/src'
  make[1]: Entering directory '/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/build/src'
  /home/runner/.cache/cargo-zigbuild/0.11.1/zigcc-x86_64-unknown-linux-gnu.sh  -I. -Iinclude -Iapps/include  -fPIC -pthread -m64 -Wall -O3 -O2 -ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-unknown-linux-gnu -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/install/lib/engines-3\"" -DMODULESDIR="\"/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/install/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG   -c -o apps/lib/libapps-lib-app_libctx.o apps/lib/app_libctx.c
  make[1]: Leaving directory '/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/build/src'

  --- stderr
  error: UnknownOperatingSystem
  make[1]: *** [Makefile:3016: apps/lib/libapps-lib-app_libctx.o] Error 1
  make: *** [Makefile:1521: build_libs] Error 2
  thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-300.2.3+3.2.1/src/lib.rs:611:9:



  Error building OpenSSL:
      Command: cd "/home/runner/work/rustapp/rustapp/lambda-api/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-a9c6117dea150d0c/out/openssl-build/build/src" && MAKEFLAGS="-j --jobserver-fds=7,8 --jobserver-auth=7,8" "make" "build_libs"
      Exit status: exit status: 2


      
  stack backtrace:
     0:     0x5623be3f5716 - std::backtrace_rs::backtrace::libunwind::trace::hbee8a7973eeb6c93
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
     1:     0x5623be3f5716 - std::backtrace_rs::backtrace::trace_unsynchronized::hc8ac75eea3aa6899
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x5623be3f5716 - std::sys_common::backtrace::_print_fmt::hc7f3e3b5298b1083
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:68:5
     3:     0x5623be3f5716 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbb235daedd7c6190
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:44:22
     4:     0x5623be41c780 - core::fmt::rt::Argument::fmt::h76c38a80d925a410
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/rt.rs:142:9
     5:     0x5623be41c780 - core::fmt::write::h3ed6aeaa977c8e45
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/mod.rs:1120:17
     6:     0x5623be3f23cf - std::io::Write::write_fmt::h78b18af5775fedb5
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/io/mod.rs:1810:15
     7:     0x5623be3f54f4 - std::sys_common::backtrace::_print::h5d645a07e0fcfdbb
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:47:5
     8:     0x5623be3f54f4 - std::sys_common::backtrace::print::h85035a511aafe7a8
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:34:9
     9:     0x5623be3f72b7 - std::panicking::default_hook::{{closure}}::hcce8cea212785a25
    10:     0x5623be3f7019 - std::panicking::default_hook::hf5fcb0f213fe709a
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:292:9
    11:     0x5623be3f7748 - std::panicking::rust_panic_with_hook::h095fccf1dc9379ee
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:779:13
    12:     0x5623be3f7622 - std::panicking::begin_panic_handler::{{closure}}::h032ba12139b353db
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:657:13
    13:     0x5623be3f5c16 - std::sys_common::backtrace::__rust_end_short_backtrace::h9259bc2ff8fd0f76
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:171:18
    14:     0x5623be3f7380 - rust_begin_unwind
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
    15:     0x5623be2e5c45 - core::panicking::panic_fmt::h784f20a50eaab275
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
    16:     0x5623be36fb98 - openssl_src::Build::run_command::hc2e8452ea3d2c4af
    17:     0x5623be36eb99 - openssl_src::Build::build::h0917e3117ecea922
    18:     0x5623be2e8e26 - build_script_main::find_vendored::get_openssl::h95837699f0d575c8
    19:     0x5623be2ea458 - build_script_main::find_openssl::h1ba4cbdd764cdbda
    20:     0x5623be2ea961 - build_script_main::main::hc6b0a0d33fec1238
    21:     0x5623be2e6d73 - core::ops::function::FnOnce::call_once::h0aa9e4573663ba7d
    22:     0x5623be2e6586 - std::sys_common::backtrace::__rust_begin_short_backtrace::h480fcc5addbf7a49
    23:     0x5623be2f1009 - std::rt::lang_start::{{closure}}::hf542b722c99849c3
    24:     0x5623be3edec1 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h37600b1e5eea4ecd
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:284:13
    25:     0x5623be3edec1 - std::panicking::try::do_call::hb4bda49fa13a0c2b
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
    26:     0x5623be3edec1 - std::panicking::try::h8bbf75149211aaaa
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
    27:     0x5623be3edec1 - std::panic::catch_unwind::h8c78ec68ebea34cb
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
    28:     0x5623be3edec1 - std::rt::lang_start_internal::{{closure}}::hffdf44a19fd9e220
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:48
    29:     0x5623be3edec1 - std::panicking::try::do_call::hcb3194972c74716d
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
    30:     0x5623be3edec1 - std::panicking::try::hcdc6892c5f0dba4c
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
    31:     0x5623be3edec1 - std::panic::catch_unwind::h4910beb4573f4776
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
    32:     0x5623be3edec1 - std::rt::lang_start_internal::h6939038e2873596b
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:20
    33:     0x5623be2f0fe7 - std::rt::lang_start::h0c4e3db237890200
    34:     0x5623be2ee6c5 - main
    35:     0x7dc08b229d90 - <unknown>
    36:     0x7dc08b229e40 - __libc_start_main
    37:     0x5623be2e63b5 - _start
    38:                0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

What I have tried (and didn't help):

  • Adding features = ["vendored"] in the openssl dependency definition in Cargo.toml
  • Installing dependencies manually in the workflow for libssl-dev and pkg-config using sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
  • Changed ubuntu-latest to ubuntu-20.04
  • Manually added the --target flag in the build process for x86_64-unknown-linux-gnu
  • Added the dependency openssl-sys = "0.9" in Cargo.toml
  • Added:
[target.x86_64-unknown-linux-gnu]
linker = "x86_64-linux-gnu-gcc"

Nothing seems to work. I have exhausted everything I possibly can think of testing to make this work. Any ideas?

0

There are 0 best solutions below