You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo:warning=In file included from /usr/include/openssl/opensslv.h:109,
cargo:warning= from build/expando.c:1:
cargo:warning=/usr/include/openssl/macros.h:14:10: fatal error: openssl/opensslconf.h: No such file or directory
cargo:warning= 14 | #include <openssl/opensslconf.h>
cargo:warning= | ^~~~~~~~~~~~~~~~~~~~~~~
cargo:warning=compilation terminated.
--- stderr
thread 'main' panicked at /root/.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 \"cc\" \"-O0\" \"-ffunction-sections\" \"-fdata-sections\" \"-fPIC\" \"-gdwarf-4\" \"-fno-omit-frame-pointer\" \"-I\" \"/usr/include\" \"-Wall\" \"-Wextra\" \"-E\" \"build/expando.c\" with args \"cc\" 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
...
However I have pkg-config and libssl-dev installed and up to date:
root@6b49c5e222e1:/workspaces/sshenanigans# apt-get install pkg-config libssl-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
pkg-config is already the newest version (1.8.1-2).
libssl-dev is already the newest version (3.0.13-0ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
root@6b49c5e222e1:/workspaces/sshenanigans#
Inspecting /usr/include, I can see that /usr/include/openssl/ has 133 header files, all the usual suspects, and /usr/include/aarch64-linux-gnu/openssl/ contains two header files: configuration.h and opensslconf.h.
For reproducibility, I'm attempting to cargo build a rust project that depends on openssl-sys from within this Docker container:
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y curl libssl-dev pkg-config
# See https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#in-a-container.RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux --init none --no-confirm
ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin"RUN nix profile install nixpkgs#cargo nixpkgs#gcc
The text was updated successfully, but these errors were encountered:
Ok, using cargo from rustup, but gcc from nixpkgs (nix profile install nixpkgs#gcc instead of apt-get install build-essential) produces the error. So I suspect something in that cc` or its configuration is at fault...
I'm currently seeing an error:
Full log available in this gist.
However I have
pkg-config
andlibssl-dev
installed and up to date:Inspecting
/usr/include
, I can see that/usr/include/openssl/
has 133 header files, all the usual suspects, and/usr/include/aarch64-linux-gnu/openssl/
contains two header files:configuration.h
andopensslconf.h
.For reproducibility, I'm attempting to
cargo build
a rust project that depends onopenssl-sys
from within this Docker container:The text was updated successfully, but these errors were encountered: