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

Openssl build error by change of ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian #1985

Open
jjangga0214 opened this issue Feb 29, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@jjangga0214
Copy link

jjangga0214 commented Feb 29, 2024

Hi!

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        settings:
          - host: ubuntu-latest
            target: x86_64-unknown-linux-gnu
            docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
            build: |-
              set -e;
              apt update;
              sudo apt-get install -y pkg-config libssl-dev perl; # REF: https://github.com/napi-rs/napi-rs/issues/1359
              export OPENSSL_LIB_DIR="/usr/lib/x86_64-linux-gnu";
              export OPENSSL_INCLUDE="/usr/include/openssl";
              yarn build --target x86_64-unknown-linux-gnu;
              strip *.node;

About 2 months ago, the build worked well.

But today, it fails with the message below.

I haven't touched any Rust dependencies since the last successful build.
Cargo.toml is exactly as-is, without any modification.

So I think the change of ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian would be the cause of the sudden error.

I wonder if the image should be patched or if I should take action.

Thanks

Run addnab/docker-run-action@v3
  with:
    image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
    options: --user 0:0 -v /home/runner/work/n-rs-kakao/n-rs-kakao/.cargo-cache/git/db:/usr/local/cargo/git/db -v /home/runner/work/n-rs-kakao/n-rs-kakao/.cargo/registry/cache:/usr/local/cargo/registry/cache -v /home/runner/work/n-rs-kakao/n-rs-kakao/.cargo/registry/index:/usr/local/cargo/registry/index -v /home/runner/work/n-rs-kakao/n-rs-kakao:/build -w /build
    run: set -e;
  apt update;
  sudo apt-get install -y pkg-config libssl-dev perl; # REF: https://github.com/napi-rs/napi-rs/issues/1359
  export OPENSSL_LIB_DIR="/usr/lib/x86_64-linux-gnu";
  export OPENSSL_INCLUDE="/usr/include/openssl";
  yarn build --target x86_64-unknown-linux-gnu;
  strip *.node;
    shell: sh
  env:
    DEBUG: napi:*
    APP_NAME: n-rs-kakao
    MACOSX_DEPLOYMENT_TARGET: 10.13
/usr/bin/docker run --name a301d072695835b2ea4094acacb222eaa507b8_26e8bb --label a301d0 --workdir /github/workspace --rm -e "DEBUG" -e "APP_NAME" -e "MACOSX_DEPLOYMENT_TARGET" -e "INPUT_IMAGE" -e "INPUT_OPTIONS" -e "INPUT_RUN" -e "INPUT_SHELL" -e "INPUT_REGISTRY" -e "INPUT_USERNAME" -e "INPUT_PASSWORD" -e "INPUT_DOCKER_NETWORK" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/n-rs-kakao/n-rs-kakao":"/github/workspace" a301d0:72695835b2ea4094acacb222eaa507b8
Unable to find image 'ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian' locally
lts-debian: Pulling from napi-rs/napi-rs/nodejs-rust
aece8493d397: Pulling fs layer
8d7ceabd3b24: Pulling fs layer
5600fece2954: Pulling fs layer
05b8d098da21: Pulling fs layer
6fc0d76ab230: Pulling fs layer
72bbd3ea9fe9: Pulling fs layer
b6ab7519e6d0: Pulling fs layer
b1ada6ea28a2: Pulling fs layer
03cab0613fab: Pulling fs layer
42bc29bc6de1: Pulling fs layer
4a1c9b5dd44b: Pulling fs layer
05b8d098da21: Waiting
6fc0d76ab230: Waiting
72bbd3ea9fe9: Waiting
b6ab7519e6d0: Waiting
b1ada6ea28a2: Waiting
03cab0613fab: Waiting
42bc29bc6de1: Waiting
4a1c9b5dd44b: Waiting
5600fece2954: Verifying Checksum
5600fece2954: Download complete
aece8493d397: Verifying Checksum
aece8493d397: Download complete
8d7ceabd3b24: Verifying Checksum
8d7ceabd3b24: Download complete
aece8493d397: Pull complete
6fc0d76ab230: Verifying Checksum
6fc0d76ab230: Download complete
72bbd3ea9fe9: Verifying Checksum
72bbd3ea9fe9: Download complete
b1ada6ea28a2: Verifying Checksum
b1ada6ea28a2: Download complete
03cab0613fab: Verifying Checksum
03cab0613fab: Download complete
b6ab7519e6d0: Verifying Checksum
b6ab7519e6d0: Download complete
05b8d098da21: Verifying Checksum
05b8d098da21: Download complete
4a1c9b5dd44b: Verifying Checksum
4a1c9b5dd44b: Download complete
8d7ceabd3b24: Pull complete
5600fece2954: Pull complete
42bc29bc6de1: Verifying Checksum
42bc29bc6de1: Download complete
05b8d098da21: Pull complete
6fc0d76ab230: Pull complete
72bbd3ea9fe9: Pull complete
b6ab7519e6d0: Pull complete
b1ada6ea28a2: Pull complete
03cab0613fab: Pull complete
42bc29bc6de1: Pull complete
4a1c9b5dd44b: Pull complete
Digest: sha256:4b2638c0987845c4ab3488574a215a2a866b99fb28588788786f2b8cbcb40e71
Status: Downloaded newer image for ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Get:1 https://apt.llvm.org/jammy llvm-toolchain-jammy-18 InRelease [6833 B]
Hit:2 https://deb.nodesource.com/node_20.x nodistro InRelease
Get:3 https://apt.llvm.org/jammy llvm-toolchain-jammy-18/main Sources [2028 B]
Get:4 https://apt.llvm.org/jammy llvm-toolchain-jammy-18/main amd64 Packages [12.5 kB]
Get:5 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:6 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [44.6 kB]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1514 kB]
Get:10 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease [18.1 kB]
Hit:11 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:12 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 Packages [27.7 kB]
Get:13 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1073 kB]
Get:14 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1889 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1796 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [50.4 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1345 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1927 kB]
Fetched 9936 kB in 2s (4425 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
101 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libdpkg-perl libfile-fcntllock-perl liblocale-gettext-perl libperl5.34
  libssl3 perl-base perl-modules-5.34
Suggested packages:
  debian-keyring patch bzr libssl-doc perl-doc libterm-readline-gnu-perl
  | libterm-readline-perl-perl libtap-harness-archive-perl dpkg-dev
Recommended packages:
  netbase
The following NEW packages will be installed:
  libdpkg-perl libfile-fcntllock-perl liblocale-gettext-perl libssl-dev
  pkg-config
The following packages will be upgraded:
  libperl5.34 libssl3 perl perl-base perl-modules-5.34
5 upgraded, 5 newly installed, 0 to remove and 96 not upgraded.
Need to get 14.4 MB of archives.
After this operation, 15.1 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libperl5.34 amd64 5.34.0-3ubuntu1.3 [4820 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 perl amd64 5.34.0-3ubuntu1.3 [232 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 perl-base amd64 5.34.0-3ubuntu1.3 [1762 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 perl-modules-5.34 all 5.34.0-3ubuntu1.3 [2976 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 liblocale-gettext-perl amd64 1.07-4build3 [17.1 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libssl3 amd64 3.0.2-0ubuntu1.15 [1905 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libdpkg-perl all 1.21.1ubuntu2.2 [237 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy/main amd64 libfile-fcntllock-perl amd64 0.22-3build7 [33.9 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libssl-dev amd64 3.0.2-0ubuntu1.15 [2376 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/main amd64 pkg-config amd64 0.29.2-1ubuntu3 [48.2 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 14.4 MB in 1s (10.9 MB/s)
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 38941 files and directories currently installed.)
Preparing to unpack .../libperl5.34_5.34.0-3ubuntu1.3_amd64.deb ...
Unpacking libperl5.34:amd64 (5.34.0-3ubuntu1.3) over (5.34.0-3ubuntu1.2) ...
Preparing to unpack .../perl_5.34.0-3ubuntu1.3_amd64.deb ...
Unpacking perl (5.34.0-3ubuntu1.3) over (5.34.0-3ubuntu1.2) ...
Preparing to unpack .../perl-base_5.34.0-3ubuntu1.3_amd64.deb ...
Unpacking perl-base (5.34.0-3ubuntu1.3) over (5.34.0-3ubuntu1.2) ...
Setting up perl-base (5.34.0-3ubuntu1.3) ...
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 38941 files and directories currently installed.)
Preparing to unpack .../perl-modules-5.34_5.34.0-3ubuntu1.3_all.deb ...
Unpacking perl-modules-5.34 (5.34.0-3ubuntu1.3) over (5.34.0-3ubuntu1.2) ...
Selecting previously unselected package liblocale-gettext-perl.
Preparing to unpack .../liblocale-gettext-perl_1.07-4build3_amd64.deb ...
Unpacking liblocale-gettext-perl (1.07-4build3) ...
Preparing to unpack .../libssl3_3.0.2-0ubuntu1.15_amd64.deb ...
Unpacking libssl3:amd64 (3.0.2-0ubuntu1.15) over (3.0.2-0ubuntu1.10) ...
Setting up libssl3:amd64 (3.0.2-0ubuntu1.15) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
Selecting previously unselected package libdpkg-perl.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 38955 files and directories currently installed.)
Preparing to unpack .../libdpkg-perl_1.21.1ubuntu2.2_all.deb ...
Unpacking libdpkg-perl (1.21.1ubuntu2.2) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../libfile-fcntllock-perl_0.22-3build7_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-3build7) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../libssl-dev_3.0.2-0ubuntu1.15_amd64.deb ...
Unpacking libssl-dev:amd64 (3.0.2-0ubuntu1.15) ...
Selecting previously unselected package pkg-config.
Preparing to unpack .../pkg-config_0.29.2-1ubuntu3_amd64.deb ...
Unpacking pkg-config (0.29.2-1ubuntu3) ...
Setting up perl-modules-5.34 (5.34.0-3ubuntu1.3) ...
Setting up libssl-dev:amd64 (3.0.2-0ubuntu1.15) ...
Setting up liblocale-gettext-perl (1.07-4build3) ...
Setting up libperl5.34:amd64 (5.34.0-3ubuntu1.3) ...
Setting up perl (5.34.0-3ubuntu1.3) ...
Setting up libdpkg-perl (1.21.1ubuntu2.2) ...
Setting up libfile-fcntllock-perl (0.22-3build7) ...
Setting up pkg-config (0.29.2-1ubuntu3) ...
Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
   Compiling proc-macro2 v1.0.78
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.153
   Compiling quote v1.0.35
   Compiling syn v2.0.52
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.4
   Compiling autocfg v1.1.0
   Compiling serde v1.0.197
   Compiling getrandom v0.2.12
   Compiling once_cell v1.19.0
   Compiling pin-project-lite v0.2.13
   Compiling ahash v0.8.10
   Compiling cc v1.0.88
   Compiling pkg-config v0.3.30
   Compiling vcpkg v0.2.15
   Compiling lock_api v0.4.11
   Compiling zerocopy v0.7.32
   Compiling parking_lot_core v0.9.9
   Compiling allocator-api2 v0.2.16
   Compiling futures-core v0.3.30
   Compiling typenum v1.17.0
   Compiling scopeguard v1.2.0
   Compiling serde_derive v1.0.197
   Compiling hashbrown v0.14.3
   Compiling slab v0.4.9
   Compiling generic-array v0.14.7
   Compiling futures-sink v0.3.30
   Compiling const-oid v0.9.6
   Compiling futures-io v0.3.30
   Compiling itoa v1.0.10
   Compiling futures-channel v0.3.30
   Compiling futures-macro v0.3.30
   Compiling pin-utils v0.1.0
   Compiling futures-task v0.3.30
   Compiling bytes v1.5.0
   Compiling memchr v2.7.1
   Compiling futures-util v0.3.30
   Compiling smallvec v1.13.1
   Compiling parking_lot v0.12.1
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.4
   Compiling tokio-macros v2.2.0
   Compiling socket2 v0.5.6
   Compiling mio v0.8.10
   Compiling num_cpus v1.16.0
   Compiling signal-hook-registry v1.4.1
   Compiling equivalent v1.0.1
   Compiling libm v0.2.8
   Compiling indexmap v2.2.4
   Compiling tokio v1.36.0
   Compiling digest v0.10.7
   Compiling openssl-sys v0.9.101
   Compiling rand_core v0.6.4
   Compiling num-traits v0.2.18
   Compiling base64ct v1.6.0
   Compiling zeroize v1.7.0
   Compiling pem-rfc7468 v0.6.0
The following warnings were emitted during compilation:

warning: openssl-sys@0.9.101: build/expando.c:1:10: fatal error: 'openssl/opensslv.h' file not found
warning: openssl-sys@0.9.101:     1 | #include <openssl/opensslv.h>
warning: openssl-sys@0.9.101:       |          ^~~~~~~~~~~~~~~~~~~~
warning: openssl-sys@0.9.101: 1 error generated.

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

Caused by:
  process didn't exit successfully: `/build/target/release/build/openssl-sys-49202c8d6d9b3030/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR = /usr/lib/x86_64-linux-gnu
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR = /usr/x86_64-unknown-linux-gnu/
  cargo:rerun-if-changed=/usr/x86_64-unknown-linux-gnu/include/openssl
  cargo:rustc-link-search=native=/usr/lib/x86_64-linux-gnu
  cargo:include=/usr/x86_64-unknown-linux-gnu/include
  cargo:rerun-if-changed=build/expando.c
  OPT_LEVEL = Some("3")
  TARGET = Some("x86_64-unknown-linux-gnu")
  HOST = Some("x86_64-unknown-linux-gnu")
  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("clang")
  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 = Some("--sysroot=/usr/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot")
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:warning=build/expando.c:1:10: fatal error: 'openssl/opensslv.h' file not found
  cargo:warning=    1 | #include <openssl/opensslv.h>
  cargo:warning=      |          ^~~~~~~~~~~~~~~~~~~~
  cargo:warning=1 error generated.

  --- stderr
  thread 'main' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.101/build/main.rs:186:13:

  Header expansion error:
  Error { kind: ToolExecError, message: "Command \"clang\" \"-O3\" \"-ffunction-sections\" \"-fdata-sections\" \"-fPIC\" \"-m64\" \"--target=x86_64-unknown-linux-gnu\" \"--sysroot=/usr/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot\" \"-I\" \"/usr/x86_64-unknown-linux-gnu/include\" \"-E\" \"build/expando.c\" with args \"clang\" did not execute successfully (status code exit status: 1)." }

  Failed to find OpenSSL development headers.

  You can try fixing this setting the `OPENSSL_DIR` environment variable
  pointing to your OpenSSL installation or installing OpenSSL headers package
  specific to your distribution:

      # On Ubuntu
      sudo apt-get install libssl-dev
      # On Arch Linux
      sudo pacman -S openssl
      # On Fedora
      sudo dnf install openssl-devel
      # On Alpine Linux
      apk add openssl-dev

  See rust-openssl documentation for more information:

      https://docs.rs/openssl

  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Internal Error: Command failed: cargo build --release --target x86_64-unknown-linux-gnu
    at checkExecSyncError (node:child_process:890:11)
    at Object.execSync (node:child_process:962:15)
    at BuildCommand.<anonymous> (/build/node_modules/@napi-rs/cli/scripts/index.js:11515:30)
    at Generator.next (<anonymous>)
    at /build/node_modules/@napi-rs/cli/scripts/index.js:3552:69
    at new Promise (<anonymous>)
    at __awaiter$1 (/build/node_modules/@napi-rs/cli/scripts/index.js:3548:10)
    at BuildCommand.execute (/build/node_modules/@napi-rs/cli/scripts/index.js:11292:16)
    at BuildCommand.validateAndExecute (/build/node_modules/@napi-rs/cli/scripts/index.js:2113:37)
@jjangga0214 jjangga0214 changed the title Openssl error by change of ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian Openssl build error by change of ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian Feb 29, 2024
@Brooooooklyn Brooooooklyn self-assigned this Feb 29, 2024
@Brooooooklyn Brooooooklyn added the bug Something isn't working label Feb 29, 2024
@inaiat
Copy link

inaiat commented Mar 21, 2024

Hey, I have similar error on build image to linux-gnu.

@Brooooooklyn any updates?

I cant build image for stable - x86_64-unknown-linux-gnu after napi updates. Ref.: https://github.com/inaiat/kafka-crab-js/actions/runs/8309936223/job/22741859095?pr=2#logs

@blakebyrnes
Copy link

Did anyone find a workaround or fix for this?

@Brooooooklyn
Copy link
Sponsor Member

@inaiat CXXFLAGS="-stdlib=libc++ -L/usr/lib/llvm-18/lib -static" can solve your case

@inaiat
Copy link

inaiat commented Apr 10, 2024

Thank you @Brooooooklyn with this flag the build on linux works fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants