Skip to content

1.0.58/#527 broke building openssl on macOS #529

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

Closed
benesch opened this issue Jul 8, 2020 · 5 comments
Closed

1.0.58/#527 broke building openssl on macOS #529

benesch opened this issue Jul 8, 2020 · 5 comments

Comments

@benesch
Copy link

benesch commented Jul 8, 2020

Build log here: https://github.com/MaterializeInc/rust-krb5-src/pull/11/checks?check_run_id=850555939

2020-07-08T16:08:37.5993460Z error: failed to run custom build command for `openssl-sys v0.9.58`
2020-07-08T16:08:37.5994010Z 
2020-07-08T16:08:37.5994410Z Caused by:
2020-07-08T16:08:37.5995340Z   process didn't exit successfully: `/Users/runner/work/rust-krb5-src/rust-krb5-src/target/debug/build/openssl-sys-6d10d87696b11ef2/build-script-main` (exit code: 101)
2020-07-08T16:08:37.5996130Z --- stdout
2020-07-08T16:08:37.5996900Z cargo:rustc-cfg=const_fn
2020-07-08T16:08:37.5997720Z cargo:rerun-if-env-changed=X86_64_APPLE_DARWIN_OPENSSL_NO_VENDOR
2020-07-08T16:08:37.5998170Z X86_64_APPLE_DARWIN_OPENSSL_NO_VENDOR unset
2020-07-08T16:08:37.5998940Z cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
2020-07-08T16:08:37.5999350Z OPENSSL_NO_VENDOR unset
2020-07-08T16:08:37.6000060Z CC_x86_64-apple-darwin = None
2020-07-08T16:08:37.6000480Z CC_x86_64_apple_darwin = None
2020-07-08T16:08:37.6000830Z HOST_CC = None
2020-07-08T16:08:37.6001150Z CC = None
2020-07-08T16:08:37.6001860Z CFLAGS_x86_64-apple-darwin = None
2020-07-08T16:08:37.6002380Z CFLAGS_x86_64_apple_darwin = None
2020-07-08T16:08:37.6002760Z HOST_CFLAGS = None
2020-07-08T16:08:37.6003110Z CFLAGS = None
2020-07-08T16:08:37.6003460Z CRATE_CC_NO_DEFAULTS = None
2020-07-08T16:08:37.6003810Z DEBUG = Some("true")
2020-07-08T16:08:37.6004170Z CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2,sse3,ssse3")
2020-07-08T16:08:37.6005220Z running "perl" "./Configure" "--prefix=/Users/runner/work/rust-krb5-src/rust-krb5-src/target/debug/build/openssl-sys-95f633180738d2b8/out/openssl-build/install" "no-dso" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-shared" "darwin64-x86_64-cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64"
2020-07-08T16:08:37.6005640Z 
2020-07-08T16:08:37.6006280Z --- stderr
2020-07-08T16:08:37.6007140Z 
2020-07-08T16:08:37.6007920Z Failure!  build file wasn't produced.
2020-07-08T16:08:37.6008900Z Please read INSTALL and associated NOTES files.  You may also have to look over
2020-07-08T16:08:37.6009300Z your available compiler tool chain or change your configuration.
2020-07-08T16:08:37.6009570Z 
2020-07-08T16:08:37.6010350Z target already defined - darwin64-x86_64-cc (offending arg: x86_64)
2020-07-08T16:08:37.6011110Z thread 'main' panicked at '
2020-07-08T16:08:37.6011490Z 
2020-07-08T16:08:37.6011740Z 
2020-07-08T16:08:37.6012100Z Error configuring OpenSSL build:
2020-07-08T16:08:37.6013880Z     Command: "perl" "./Configure" "--prefix=/Users/runner/work/rust-krb5-src/rust-krb5-src/target/debug/build/openssl-sys-95f633180738d2b8/out/openssl-build/install" "no-dso" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-shared" "darwin64-x86_64-cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64"
2020-07-08T16:08:37.6014410Z     Exit status: exit code: 255
2020-07-08T16:08:37.6014740Z 
2020-07-08T16:08:37.6015010Z 
2020-07-08T16:08:37.6015830Z     ', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.10.0+1.1.1g/src/lib.rs:386:13
2020-07-08T16:08:37.6016290Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-07-08T16:08:37.6016620Z 
2020-07-08T16:08:37.6016970Z warning: build failed, waiting for other jobs to finish...
2020-07-08T16:08:37.8390070Z error: build failed
2020-07-08T16:08:37.8444360Z ##[error]Process completed with exit code 101.
2020-07-08T16:08:37.8467870Z Cleaning up orphan processes

The issue is that OpenSSL's configure command does not allow specifying both darwin64-x86_64-cc and -arch x86_64. The reason -arch appears in there at all is because of #527, as far as I can tell.

Possibly the solution is to adjust openssl-src to skip the -arch flag here, but figured I'd raise the issue here since it was a patch release of cc that caused the breakage.

@alexcrichton
Copy link
Member

Thanks for the report! I think this is actually a bug in the openssl-src crate, probably needing an update around here

@benesch
Copy link
Author

benesch commented Jul 8, 2020

Yep, agreed that's seems like a possible fix! Sorry for burying the lede at the end of my report. Just wasn't sure if cc meant to avoid breakage like that.

Anyway, want me to prep a fix for openssl-src or are you on it?

benesch added a commit to benesch/openssl-src-rs that referenced this issue Jul 8, 2020
The latest version of cc-rs broke building OpenSSL on macOS (see
rust-lang/cc-rs#529). This commit just serves to trigger a CI build
to validate that CI catches this. I'll update with a patch shortly.
@alexcrichton
Copy link
Member

Nah if you want to send a PR feel free!

@benesch
Copy link
Author

benesch commented Jul 8, 2020

Perfect, because I failed to wait for your response anyway :D

alexcrichton/openssl-src-rs#67

@benesch
Copy link
Author

benesch commented Jul 8, 2020

Fixed by alexcrichton/openssl-src-rs#67.

@benesch benesch closed this as completed Jul 8, 2020
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

2 participants