-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Link OpenSSL statically on OSX #3311
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now that Cargo requires OpenSSL >= 1.0.1 transitively through the `openssl-sys` 0.9 release the dynamic libraries for OpenSSL are no longer located on OSX by default. This means that the support necessary for libssh2 needs to be statically linked rather than dynamically linked. Closes rust-lang#3303
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ |
📌 Commit 535a67b has been approved by |
bors
added a commit
that referenced
this pull request
Nov 21, 2016
Link OpenSSL statically on OSX Now that Cargo requires OpenSSL >= 1.0.1 transitively through the `openssl-sys` 0.9 release the dynamic libraries for OpenSSL are no longer located on OSX by default. This means that the support necessary for libssh2 needs to be statically linked rather than dynamically linked. Closes #3303
☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64 |
alexcrichton
added a commit
to alexcrichton/cargo
that referenced
this pull request
Nov 23, 2016
After rust-lang#3311 we're now correctly trying to link OpenSSL statically on OSX. Unfortunately though this is failing to complete on the builders. Turns out the way we install OpenSSL through Homebrew create "universal archives" which is essentially an archive with both i686 and x86_64 object files, but separated. The linker takes care of this just fine but rustc currently chokes on it, unable to include the library statically into the compiler. To work around this we prepare our own mini install of OpenSSL by copying relevant bits into a local directory (like we do on Linux). As part of this we use the `lipo` tool, which is used to manage these fat archives, to disassemble the archive and only extract the relevant architecture. This should make a pre-installation step which both extracts the information and configures Cargo to use it. This should also fix the errors we're seeing on Travis I believe.
bors
added a commit
that referenced
this pull request
Nov 23, 2016
Really fix OSX nightlies After #3311 we're now correctly trying to link OpenSSL statically on OSX. Unfortunately though this is failing to complete on the builders. Turns out the way we install OpenSSL through Homebrew create "universal archives" which is essentially an archive with both i686 and x86_64 object files, but separated. The linker takes care of this just fine but rustc currently chokes on it, unable to include the library statically into the compiler. To work around this we prepare our own mini install of OpenSSL by copying relevant bits into a local directory (like we do on Linux). As part of this we use the `lipo` tool, which is used to manage these fat archives, to disassemble the archive and only extract the relevant architecture. This should make a pre-installation step which both extracts the information and configures Cargo to use it. This should also fix the errors we're seeing on Travis I believe.
This was referenced Nov 23, 2016
alexcrichton
added a commit
to alexcrichton/cargo
that referenced
this pull request
Dec 1, 2016
After rust-lang#3311 we're now correctly trying to link OpenSSL statically on OSX. Unfortunately though this is failing to complete on the builders. Turns out the way we install OpenSSL through Homebrew create "universal archives" which is essentially an archive with both i686 and x86_64 object files, but separated. The linker takes care of this just fine but rustc currently chokes on it, unable to include the library statically into the compiler. To work around this we prepare our own mini install of OpenSSL by copying relevant bits into a local directory (like we do on Linux). As part of this we use the `lipo` tool, which is used to manage these fat archives, to disassemble the archive and only extract the relevant architecture. This should make a pre-installation step which both extracts the information and configures Cargo to use it. This should also fix the errors we're seeing on Travis I believe.
This was referenced Dec 1, 2016
bors
added a commit
that referenced
this pull request
Dec 2, 2016
Backporting fixes to 1.14.0 This is a backport of the following PRs to fix the actual issue, rust-lang/rust#37969. * #3311 - first attempt to fix OpenSSL linkage on OSX * #3315 - second attempt to fix linkage * #3325 - fix a flaky test causing lots of CI problems * #3332 - actual fix for OpenSSL linkage on OSX * #3345 - first PR for automation changes * #3350 - second PR for automation changes * #3326 - update git2 to support netbsd * #3331 - update git2 to fix segfaults in tests * #3342 - update git2 to fix cert paths
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now that Cargo requires OpenSSL >= 1.0.1 transitively through the
openssl-sys
0.9 release the dynamic libraries for OpenSSL are no longer located on OSX by
default. This means that the support necessary for libssh2 needs to be
statically linked rather than dynamically linked.
Closes #3303