Build with LibreSSL 3.8.2 fails #1367

Closed
opened 2026-04-06 01:50:11 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Sp1l on 11/8/2023

Subject of the issue

Building with LibreSSL 3.8.2 fails due to incompatible dependencies

Deployment environment

FreeBSD 14.0-RC4
clang 16.0.6
rust 1.73.0
LibreSSL 3.8.2

  • vaultwarden version:
    1.30.0

  • Install method:
    Build from source

  • Clients used:
    not applicable

  • Reverse proxy and version:

  • MySQL/MariaDB or PostgreSQL version:

  • Other relevant details:

Steps to reproduce

Build Vaultwarden on a system that uses LibreSSL 3.8.,2 (released 2023-11-02) for libcrypto and libssl>

Expected behaviour

...
       Fresh vaultwarden v1.0.0 (/wrkdirs/overlays/overlay/security/vaultwarden/work/vaultwarden-1.30.0)
    Finished release [optimized] target(s) in 0.11s

full build log

Actual behaviour

...
[openssl-sys 0.9.92] This crate is only compatible with OpenSSL (version 1.0.1 through 1.1.1, or 3.0.0), or LibreSSL 2.5
[openssl-sys 0.9.92] through 3.8.0, but a different version of OpenSSL was found. The build is now aborting
[openssl-sys 0.9.92] due to this version mismatch.
...
error: failed to run custom build command for `openssl-sys v0.9.92`
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: `/wrkdirs/overlays/overlay/security/vaultwarden/work/target/release/build/openssl-sys-c25c229eed872aed/build-script-main` (exit status: 101)
...

full build log

Troubleshooting data

Patched Cargo.toml

--- Cargo.toml.orig     2023-11-08 12:15:34 UTC
+++ Cargo.toml
@@ -140,10 +140,10 @@ cookie_store = "0.19.1"
 cookie_store = "0.19.1"

 # Used by U2F, JWT and PostgreSQL
-openssl = "0.10.57"
+openssl = "0.10.59"
 # Set openssl-sys fixed to v0.9.92 to prevent building issues with musl, arm and 32bit pointer width
 # It will force add a dynamically linked library which prevents the build from being static
-openssl-sys = "=0.9.92"
+openssl-sys = "=0.9.95"

 # CLI argument parsing
 pico-args = "0.5.0"

Updated Cargo.lock

cargo update -p openssl-sys -p openssl

Build succeeds.

Cargo.lock updated

--- Cargo.lock.orig     2023-11-08 12:15:54 UTC
+++ Cargo.lock
@@ -1949,9 +1949,9 @@ name = "openssl"

 [[package]]
 name = "openssl"
-version = "0.10.57"
+version = "0.10.59"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c"
+checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33"
 dependencies = [
  "bitflags 2.4.1",
  "cfg-if",
@@ -1981,18 +1981,18 @@ name = "openssl-src"

 [[package]]
 name = "openssl-src"
-version = "111.28.0+1.1.1w"
+version = "300.1.6+3.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ce95ee1f6f999dfb95b8afd43ebe442758ea2104d1ccb99a94c30db22ae701f"
+checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085"
 dependencies = [
  "cc",
 ]

 [[package]]
 name = "openssl-sys"
-version = "0.9.92"
+version = "0.9.95"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b"
+checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9"
 dependencies = [
  "cc",
  "libc",
*Originally created by @Sp1l on 11/8/2023* ### Subject of the issue Building with LibreSSL 3.8.2 fails due to incompatible dependencies ### Deployment environment FreeBSD 14.0-RC4 clang 16.0.6 rust 1.73.0 LibreSSL 3.8.2 * vaultwarden version: 1.30.0 * Install method: Build from source * Clients used: not applicable * Reverse proxy and version: * MySQL/MariaDB or PostgreSQL version: * Other relevant details: ### Steps to reproduce Build Vaultwarden on a system that uses LibreSSL 3.8.,2 (released 2023-11-02) for libcrypto and libssl> ### Expected behaviour ``` ... Fresh vaultwarden v1.0.0 (/wrkdirs/overlays/overlay/security/vaultwarden/work/vaultwarden-1.30.0) Finished release [optimized] target(s) in 0.11s ``` [full build log](https://brnrd.eu/poudriere/data/140libre-default/2023-11-08_12h31m26s/logs/vaultwarden-1.30.0.log) ### Actual behaviour ``` ... [openssl-sys 0.9.92] This crate is only compatible with OpenSSL (version 1.0.1 through 1.1.1, or 3.0.0), or LibreSSL 2.5 [openssl-sys 0.9.92] through 3.8.0, but a different version of OpenSSL was found. The build is now aborting [openssl-sys 0.9.92] due to this version mismatch. ... error: failed to run custom build command for `openssl-sys v0.9.92` 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: `/wrkdirs/overlays/overlay/security/vaultwarden/work/target/release/build/openssl-sys-c25c229eed872aed/build-script-main` (exit status: 101) ... ``` [full build log](https://brnrd.eu/poudriere/data/140libre-default/2023-11-08_12h02m24s/logs/errors/vaultwarden-1.30.0.log) ### Troubleshooting data Patched `Cargo.toml` ``` --- Cargo.toml.orig 2023-11-08 12:15:34 UTC +++ Cargo.toml @@ -140,10 +140,10 @@ cookie_store = "0.19.1" cookie_store = "0.19.1" # Used by U2F, JWT and PostgreSQL -openssl = "0.10.57" +openssl = "0.10.59" # Set openssl-sys fixed to v0.9.92 to prevent building issues with musl, arm and 32bit pointer width # It will force add a dynamically linked library which prevents the build from being static -openssl-sys = "=0.9.92" +openssl-sys = "=0.9.95" # CLI argument parsing pico-args = "0.5.0" ``` Updated `Cargo.lock` ``` cargo update -p openssl-sys -p openssl ``` Build succeeds. `Cargo.lock` updated ``` --- Cargo.lock.orig 2023-11-08 12:15:54 UTC +++ Cargo.lock @@ -1949,9 +1949,9 @@ name = "openssl" [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -1981,18 +1981,18 @@ name = "openssl-src" [[package]] name = "openssl-src" -version = "111.28.0+1.1.1w" +version = "300.1.6+3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ce95ee1f6f999dfb95b8afd43ebe442758ea2104d1ccb99a94c30db22ae701f" +checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.92" +version = "0.9.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" +checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" dependencies = [ "cc", "libc", ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1367