-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
windows installation now undocumented #1062
Comments
Does the |
I wasn't really aware of it, but having looked - no, its strictly harder than installing OpenSSL - perl is not a default windows feature, nor is make, let alone any deeper components that may be needed... vcpkg would be the way to abstract out building a vendored copy on Windows I suppose. |
Ah right. I think adding documentation pointing to vcpkg is the right way to go here. |
There are still no clear instructions as to how to get this to work on Windows. Note the following (I have it installed via vcpkg): vcpkg install openssl Total elapsed time: 954.5 us The package openssl is compatible with built-in CMake targets:
Yet, I still get build failures: C:/Users//.cargo/bin/cargo.exe build --color=always --all --all-targets --- stderr Could not find directory of OpenSSL installation, and this Make sure you also have the development packages of openssl installed. If you're in a situation where you think the directory should be found $HOST = x86_64-pc-windows-msvc It looks like you're compiling for MSVC but we couldn't detect an OpenSSL https:/sfackler/rust-openssl#windows ', C:\Users<omitted>.cargo\registry\src\github.com-1ecc6299db9ec823\openssl-sys-0.9.43\build\find_normal.rs:150:5 Process finished with exit code 101 |
|
Using vcpkg was actually amazing easy. Here's what I did:
And that was it! |
Still no joy here:
Note that I installed openssl via Jenkins to ensure the permissions would be correct:
I surely have something wrong in the build environment (it builds OK from my account, it fails from Jenkins). This has been stumping me for a long time, every couple of months I try to tackle it and then give up. (I have a script that will take manually built files and package them for now, but I would like to automate the whole bloody mess). Thanks for all the help tidbits so far, |
this looks like your machine is 32-bit (x86), but is cross compiling to a 64-bit target (x64). That sounds a little unusual. Can you confirm if that is actually expected for your environment? |
It should be x64, it looks like it downloaded the wrong version of cmake? Downloading cmake... Thanks, |
I manually set it to the following:
However, when the build failed, it was set as follows:
Everything else looks OK:
|
I found the following
but while installing 64-bit openssl, it still looks to be installing 32-bit packages, I guess I will have to wait to see what it actually builds this time. |
I guess I am giving up for another month or so, this is very frustrating...
|
FYI: there seems to be nothing wrong with the openssl installation, it is just ring...
|
It is also unclear to me what I am supposed to do with this information from the openssl build?
|
With help from @tmfink, I was able to get my Jenkins build working. It turns out that when running as a service, Jenkins was getting a default profile under Windows\System32. It seemed like there might have been some permissions issues. I created a new directory under \Users for the service account that we were using for Jenkins and pointed CARGO_HOME to it. Now ring is finding the files correctly and building, so all is good - at least for now. Thanks for the help with this, there were issues that I needed to solve with vcpkg first before I was able to get this far. |
The instructions from #1062 (comment) worked for me when building I also could not get the |
It seems once I get openssl installed with vcpkg, run the integrate command, then set the following env vars it all works. (Using my paths as an example)
or if I set From what I can tell the needed steps are to grab vcpkg, run the |
Does rust-openssl work with openssl 1.1.1d? I am trying to build it on Windows by manually providing the environment variables (in this case I cannot use vcpkg), but even though the path exists, the build fails:
directory contents (*.lib):
Resolved above issue: Apparently the directory check didn't like the quoted path.
Plus the include path was one level too deep. |
Also struggling here, managed to get it to work. Still failing to build, with the following error. error: failed to run custom build command for `openssl-sys v0.9.54`
Caused by:
process didn't exit successfully: `C:\Users\Charlie\thoghtexpress\browser-native-launcher\target\debug\build\openssl-sys-e03a14a35d1c34dc\build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=I686_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR
I686_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=I686_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR
I686_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=I686_PC_WINDOWS_MSVC_OPENSSL_DIR
I686_PC_WINDOWS_MSVC_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
note: vcpkg did not find openssl as libcrypto and libssl: Could not find library in Vcpkg tree C:\Users\Charlie\code\vcpkg\installed\x86-windows\bin\libcrypto.dll
note: vcpkg did not find openssl as ssleay32 and libeay32: Could not find library in Vcpkg tree C:\Users\Charlie\code\vcpkg\installed\x86-windows\lib\libeay32.lib
--- stderr
thread 'main' panicked at '
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:/sfackler/rust-openssl
and include information about your system as well as this message.
$HOST = i686-pc-windows-msvc
$TARGET = i686-pc-windows-msvc
openssl-sys = 0.9.54
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:/sfackler/rust-openssl#windows
', C:\Users\Charlie\.cargo\registry\src\github.com-1ecc6299db9ec823\openssl-sys-0.9.54\build\find_normal.rs:150:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed However, this is because openssl-sys looks for Renaming them to |
You need to update your openssl-sys version to pick up 03b8b29#diff-e9f0c58bb4bf8069bc30ffead1ff6b2e |
Hello, would it not be possible to add some notes on the readme on ways to use |
It's still open... A link to either or both of the |
Ran into this, doesn't work in gitbash at all. |
For what it's worth, what I had to do is install vcpkg (regular installation), and then do this: vcpkg integrate install
vcpkg.exe install openssl:x64-windows-static-md That seemed to help in my case. |
This worked right off the bat for me. Simply linking to these commands in the readme would make a huge difference for consumers of dependents of this crate, as the compile error takes a bit of digging to solve (and for me at least, the old vcpkg instructions were actually wrong, as I did not need to point to any sort of authentication roots to build). |
To summarize, following can be shown during compile error: git clone https:/Microsoft/vcpkg --depth=1
vcpkg/bootstrap-vcpkg.bat
vcpkg/vcpkg.exe integrate install
vcpkg/vcpkg.exe install openssl:x64-windows-static |
There used to be pretty clear docs on getting rust-openssl to work on Windows, but with the move of the README content to the crate root that was dropped for some reason. I don't know about other folk but for me at least I keep digging back in README.md history to figure out the installation steps...
The text was updated successfully, but these errors were encountered: