Skip to content
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

cargo 0.15 depends on non-system /usr/local/opt/openssl on mac #3320

Closed
rillian opened this issue Nov 23, 2016 · 11 comments
Closed

cargo 0.15 depends on non-system /usr/local/opt/openssl on mac #3320

rillian opened this issue Nov 23, 2016 · 11 comments

Comments

@rillian
Copy link
Contributor

rillian commented Nov 23, 2016

The version of cargo included with rust 1.14.0-beta.2 cargo 0.15.0-nightly (a9c23dd 2016-11-15) appears to be dynamically linked against /usr/local/opt/openssl/lib/libssl.1.0.0.dylib and /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib.

This happens to work on my system, and I suspect the systems of many developers, because this is where homebrew installs openssl. However, this is not going to work on generic or clean Mac installs. This is a regression from rust 1.13.0 stable cargo 0.13.0-nightly (eca9e15 2016-11-01).

@rillian
Copy link
Contributor Author

rillian commented Nov 23, 2016

Note the new dependency locations. Perhaps this is related to Apple removing system openssl. Cargo dist should be static-linking the homebrew replacement instead.

$ otool -L ~/.multirust/toolchains/beta-x86_64-apple-darwin/bin/cargo 
/Users/giles/.multirust/toolchains/beta-x86_64-apple-darwin/bin/cargo:
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57031.20.26)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1153.18.0)
	/usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 8.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
	/usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
$ rustup run beta cargo --version
cargo 0.15.0-nightly (a9c23dd 2016-11-15)

vs.

$ otool -L ~/.multirust/toolchains/stable-x86_64-apple-darwin/bin/cargo 
/Users/giles/.multirust/toolchains/stable-x86_64-apple-darwin/bin/cargo:
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57031.20.26)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1153.18.0)
	/usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 8.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
	/usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
	/usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
$ rustup run stable cargo --version
cargo 0.13.0-nightly (eca9e15 2016-11-01)

@rillian
Copy link
Contributor Author

rillian commented Nov 23, 2016

cc @alexcrichton I found this problem testing on the gecko build automation. This blocks us using these cargo builds for Firefox.

 06:40:32     INFO -  checking rustc version... 1.14.0-beta.2
 06:40:32     INFO -  checking cargo support for --frozen... dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
 06:40:32     INFO -    Referenced from: /builds/slave/try-m64-0000000000000000000000/build/src/rustc/bin/cargo
 06:40:32     INFO -    Reason: image not found
 06:40:33 INFO - ERROR: Failed to call cargo:

https://treeherder.mozilla.org/logviewer.html#?job_id=31747111&repo=try#L990

@alexcrichton
Copy link
Member

Ah no worries! Originally reported as #3303, fixed in #3311, and hopefully the build is fixed in #3315.

#3315 landed just last night, so fingers crossed that tonight's nightlies will have the fix!

@rillian
Copy link
Contributor Author

rillian commented Nov 23, 2016

Great! Will that make it into rust 1.14.0-beta.3?

@alexcrichton
Copy link
Member

Whelp.

It's got to, so we'll make it work.

@alexcrichton
Copy link
Member

I filed rust-lang/rust#37969 to track the beta business.

@rillian
Copy link
Contributor Author

rillian commented Nov 23, 2016

ta :)

@vvv
Copy link

vvv commented Nov 25, 2016

I'm not able to run nightly cargo on OS X 10.11.6 + MacPorts:

$ rustup run nightly rustc --version
rustc 1.15.0-nightly (d5814b03e 2016-11-23)
$ 
$ rustup run nightly cargo --version
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/vvv/.multirust/toolchains/nightly-x86_64-apple-darwin/bin/cargo
  Reason: image not found

#3303 and #3320 are closed, yet the problem is still there on my machine.

$ otool -L ~/.multirust/toolchains/nightly-x86_64-apple-darwin/bin/cargo | grep libssl
        /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
$ 
$ port contents openssl | grep libssl
  /opt/local/lib/libssl.1.0.0.dylib
  /opt/local/lib/libssl.a
  /opt/local/lib/libssl.dylib
  /opt/local/lib/pkgconfig/libssl.pc

@alexcrichton
Copy link
Member

@vvv the fixes haven't made their way into nightlies yet, but they should do so soon.

@vvv
Copy link

vvv commented Nov 25, 2016

@alexcrichton I see. How often are nighties being built?

@vvv
Copy link

vvv commented Nov 25, 2016

Works now. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants