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
Hello, I'm not very familiar with development on Windows, and I'm trying to build a project that requires openssl-sys. I've installed openssl via vcpkg as described in the docs, but I'm getting this error. It's likely this is not a bug but rather the docs are a tad incomplete in getting the automatic detection route working. I've also tried installing the package manually and assigning the path with the OPENSSL_DIR environment variable, but openssl-sys claims that the lib directory given is insufficient. I've uninstalled that, but I'm happy to re-install and paste the error if that's the correct way to go about it. Any help is appreciated.
Compiling openssl-sys v0.9.96
error: failed to run custom build commandfor`openssl-sys v0.9.96`
Caused by:
process didn't exit successfully: `C:\Users\obrch\Code\versatus\target\debug\build\openssl-sys-789dd0cb3f81db9a\build-script-main` (exit code: 101) --- stdout cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=OPENSSL_LIB_DIR OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR unset cargo:rerun-if-env-changed=OPENSSL_DIR OPENSSL_DIR unset note: vcpkg did not find openssl: Could not find library in Vcpkg tree package openssl is not installed for vcpkg triplet x64-windows-static-md --- stderr thread 'main' panicked at C:\Users\obrch\.cargo\registry\src\index.crates.io-6f17d22bba15001f\openssl-sys-0.9.96\build\find_normal.rs:190:5: Could not find directory of OpenSSL installation, and this `-sys` crate cannot proceed without this knowledge. If OpenSSL is installed and this crate had trouble finding it, you can set the `OPENSSL_DIR` environment variable for the compilation process. Make sure you also have the development packages of openssl installed. For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora. If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.
$HOST = x86_64-pc-windows-msvc
$TARGET = x86_64-pc-windows-msvc
openssl-sys = 0.9.96
It looks like you're compiling for MSVC but we couldn't detect an OpenSSL
installation. If there isn't one installed then you can try the rust-openssl README for more information about how to download precompiled binaries of OpenSSL: https://github.com/sfackler/rust-openssl#windows
PS C:\Users\obrch\Code\vcpkg> .\vcpkg install openssl
warning: In the September 2023 release, the default triplet for vcpkg libraries changed from x86-windows to the detected host triplet (x64-windows). For the old behavior, add --triplet x86-windows . To suppress this message, add --triplet x64-windows .
Computing installation plan...
The following packages are already installed:
openssl:x64-windows -> 3.1.4#1
openssl:x64-windows is already installed
Total install time: 74.2 us
The package openssl is compatible with built-in CMake targets:
find_package(OpenSSL REQUIRED)
target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto)
The text was updated successfully, but these errors were encountered:
Hello, I'm not very familiar with development on Windows, and I'm trying to build a project that requires
openssl-sys
. I've installedopenssl
viavcpkg
as described in the docs, but I'm getting this error. It's likely this is not a bug but rather the docs are a tad incomplete in getting the automatic detection route working. I've also tried installing the package manually and assigning the path with theOPENSSL_DIR
environment variable, butopenssl-sys
claims that thelib
directory given is insufficient. I've uninstalled that, but I'm happy to re-install and paste the error if that's the correct way to go about it. Any help is appreciated.The text was updated successfully, but these errors were encountered: