-
-
Notifications
You must be signed in to change notification settings - Fork 770
Build OpenSSL from source #589
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Closes #580
openssl-sys/build.rs
Outdated
.arg(os) | ||
.arg("-fPIC"); | ||
if target.contains("i686") { | ||
configure.arg("-m32"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to read the cflags from gcc-rs to pass here (instead of manually passing -fPIC/-m32)
openssl-sys/build.rs
Outdated
Stderr: | ||
{} | ||
", | ||
desc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you be sure to include output.status
in this output as well?
👍 Perhaps openssl could dogfood this support itself? IIRC we build OpenSSL for ARM on CI |
What is this waiting on? |
It doesn't work yet in cross compilation contexts and Windows, and I haven't had a chance to finish it. |
We discussed this a bit at the recent all-hands and some thoughts on this were:
|
I've started a repository for this at https://github.com/alexcrichton/openssl-src-rs. Right now I believe it's got the right logic for building for all "relevant" platforms for now, and there should be CI verifying that the build works and everything at least links correctly. Right now it's intended to be used as a build dependency, so during openssl-sys's fallback after failing to find a global installation it'd build one from source (in theory). @sfackler and I talked at RustConf about the Windows situation as well. Unfortunately building OpenSSL requires We discussed in person the possibility of shipping binaries. In this way the MSVC platform would have prebuilt binaries ready-to-go which would be used by default instead of building from source. Upon further reflection, though, I'm not sure this is a great idea:
And that's a little unfortunate! I think I'd be tempted to, for now, advocate for @sfackler how's that sound? |
I'm a bit suspicious about the cross VS library compatibility issues - plenty of projects provide precompiled Windows libraries without too much trouble AFAIKT. Having to provide crt-static/non-crt-static i686/x86_64 does seem like a bit much though. I do feel bad about requiring a Perl install but it seems like there isn't a great way to avoid that other than maybe vendoring Perl itself which seems a bit iffy. |
Closes #580