My personal webspace

A webspace for innovation, free thinking, and procrastination

Attempting to build a Rust package on Arch, I ran into a problem that the version of the openssl crate depended on by one of the dependencies didn’t correctly detect the latest OpenSSL, 1.1.1. To solve this, I ensure a previous version (OpenSSL 1.0) was installed, and setup my environment with:

# Only needed on Arch to use an older openssl version

export PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig/
export OPENSSL_LIB_DIR=/usr/lib/openssl-1.0
export OPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0

And then things built :).

The error message the started me on this:

error: failed to run custom build command for `openssl v0.9.24`
process didn't exit successfully: `/home/chathaway/programming/rust-server-test/target/debug/build/openssl-cfe5073b2197a031/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Unable to detect OpenSSL version', /home/chathaway/.cargo/registry/src/
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Content © 2022 Charles Hathaway