Link OpenSSL statically on OSX #3311

Merged
merged 1 commit into from Nov 21, 2016

Projects

None yet

4 participants

@alexcrichton
Member

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

@alexcrichton alexcrichton 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
535a67b
@brson brson was assigned by rust-highfive Nov 21, 2016
@rust-highfive

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Contributor
brson commented Nov 21, 2016

@bors r+

@bors
Contributor
bors commented Nov 21, 2016

📌 Commit 535a67b has been approved by brson

@bors
Contributor
bors commented Nov 21, 2016

⌛️ Testing commit 535a67b with merge f003b0e...

@bors bors added a commit that referenced this pull request Nov 21, 2016
@bors bors Auto merge of #3311 - alexcrichton:fix-nightlies, r=brson
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
f003b0e
@bors
Contributor
bors commented Nov 21, 2016
@bors bors merged commit 535a67b into rust-lang:master Nov 21, 2016

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@alexcrichton alexcrichton added a commit to alexcrichton/cargo that referenced this pull request Nov 23, 2016
@alexcrichton alexcrichton 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.
1fddd18
@bors bors added a commit that referenced this pull request Nov 23, 2016
@bors bors Auto merge of #3315 - alexcrichton:fix-travis, r=alexcrichton
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.
182f197
@alexcrichton alexcrichton deleted the alexcrichton:fix-nightlies branch Nov 23, 2016
@alexcrichton alexcrichton added a commit to alexcrichton/cargo that referenced this pull request Dec 1, 2016
@alexcrichton alexcrichton 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.
b30ccec
@bors bors added a commit that referenced this pull request Dec 1, 2016
@bors bors Auto merge of #3353 - alexcrichton:1.14.0-next, r=alexcrichton
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
f91900c
@bors bors added a commit that referenced this pull request Dec 1, 2016
@bors bors Auto merge of #3353 - alexcrichton:1.14.0-next, r=alexcrichton
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
2ada218
@bors bors added a commit that referenced this pull request Dec 1, 2016
@bors bors Auto merge of #3353 - alexcrichton:1.14.0-next, r=alexcrichton
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
6423f34
@bors bors added a commit that referenced this pull request Dec 1, 2016
@bors bors Auto merge of #3353 - alexcrichton:1.14.0-next, r=alexcrichton
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
cf0b0bc
@bors bors added a commit that referenced this pull request Dec 2, 2016
@bors bors Auto merge of #3353 - alexcrichton:1.14.0-next, r=alexcrichton
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
8d63784
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment