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
Builds on windows and linux fail with OpenSSL installed. #766
Comments
After setting
After setting
|
After confirming that any dependencies in this issue were installed, I am still receiving this panic. As far as I'm aware I have all dependencies ( |
The OPENSSL_DIR environment variable is unrelated to OpenSSL's own OPENSSLDIR value. What do |
I had formatted and reinstalled all dependencies from scratch. The issue persisted. I switched to a more recent branch of the project being compiled. The linux environment is identical to the one producing the error, only the code changed, and
After some googling, I discovered that there's a way to quickly locate files installed by an
openssl.h does not seem to exist, but libssl does (not as header files): So, it seems that
The failing branch compiles successfully by setting Thankfully, the issue on my system has been solved, but this case does seem worth automation. Given the relative simplicity of the fix along with the fact that it's an installation path of |
I am not aware of anything other crates can do to change the behavior of openssl-sys remotely. I don't understand how setting Everything should work fine as long as you have OpenSSL headers installed (via libssl-dev) and let pkg-config do its thing. Are there a set of steps you can show me that reproduce the issue starting from something like a base Docker image for whatever distro you're using? |
Yeah, that's what I'm thinking. It's interesting that it fails this way. I'm using Google Cloud Platform's debian-9-stretch-v20171025 Compute Engine image as the base. I'll see if I can get a clean repro for you, and maybe even find a way to export the image so you can test it. Hmm, the problem seems to have gone away. The only differences this time were installing I can only assume one of the packages ( Oh well, I'm content that the problem is resolved and that there's a way to fix it on misconfigured systems. Thanks for rubber ducking with me, and maybe you'll bump into similar issues in the future and have a bit more info to troubleshoot with. The working set of commands:Fixing Google Cloud SDK issue https://issuetracker.google.com/issues/36323738
Upgrading
Confirming libssl-dev installed
Installing rustup
Getting project and compiling
|
Cool, no worries! Glad things are working now. |
I had the same problem as @Aarowaim , however setting OPENSSL_DIR didn't work for me. I had to set the environment variable OPENSSL_LIB_DIR='/usr/lib/x86_64-linux-gnu' |
Similar problem with Google image https://console.cloud.google.com/marketplace/details/bitnami-launchpad/elk?filter=category:others (on last version : 6.6.1-0) export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ |
this gets me every time! I have to duckduckgo for hours and try several combinations of OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR that don't seem to work. Thank you @adrienperonnet ! |
In my case, set the following env solved the problem, which just suggest where to find the openssl header files and lib.so. Forget about OPENSSL_DIR env, which just suggests how to find the above two, but different system has different setting whichs lead to bug. export OPENSSL_LIB_DIR="/usr/lib/x86_64-linux-gnu"
export OPENSSL_INCLUDE="/usr/include/openssl" |
I think the so, it should be:
|
Arch Linux:
|
Setting |
This worked for me on
|
for me i had to do the following:
|
Got the same problem on ubuntu WSL. After following your steps: |
for those on Windows using the OpenSSL distributed by slproweb and compiling with MSVC, the key is the second line here set OPENSSL_DIR=%PROGRAMFILES%\OpenSSL-Win64
set OPENSSL_LIB_DIR=%PROGRAMFILES%\OpenSSL-Win64\lib\VC\x64\MD |
After following the suggestion to use
pkg_config
, this library will still not compile. The issue seems to be that openssl is installed but uses the environment variableOPENSSLDIR
. Rust-OpenSSL attempts to find openssl inOPENSSL_DIR
. I had a similar issue compiling this package on windows.The text was updated successfully, but these errors were encountered: