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

Gut fails compilation at openssl on Catalina #150

Closed
snomos opened this issue Jun 30, 2020 · 4 comments · Fixed by #162
Closed

Gut fails compilation at openssl on Catalina #150

snomos opened this issue Jun 30, 2020 · 4 comments · Fixed by #162
Labels
bug Something isn't working critical-path This task is required to be completed by a given delivery date.

Comments

@snomos
Copy link
Member

snomos commented Jun 30, 2020

error: failed to run custom build command for `openssl-sys v0.9.58`

Caused by:
  process didn't exit successfully: `/Users/smo036/langtech/gut/divvun/gut/target/release/build/openssl-sys-8115086e68d0bae2/build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_APPLE_DARWIN_OPENSSL_LIB_DIR
X86_64_APPLE_DARWIN_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=X86_64_APPLE_DARWIN_OPENSSL_INCLUDE_DIR
X86_64_APPLE_DARWIN_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=X86_64_APPLE_DARWIN_OPENSSL_DIR
X86_64_APPLE_DARWIN_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
run pkg_config fail: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"`: No such file or directory (os error 2)"

--- stderr
thread 'main' panicked at '

Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
compilation process.

Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.

$HOST = x86_64-apple-darwin
$TARGET = x86_64-apple-darwin
openssl-sys = 0.9.58



It looks like you're compiling on macOS, where the system contains a version of
OpenSSL 0.9.8. This crate no longer supports OpenSSL 0.9.8.

As a consumer of this crate, you can fix this error by using Homebrew to
install the `openssl` package, or as a maintainer you can use the openssl-sys
0.7 crate for support with OpenSSL 0.9.8.

Unfortunately though the compile cannot continue, so aborting.

', /Users/smo036/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.58/build/find_normal.rs:157:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
error: failed to compile `gut v0.1.0 (/Users/smo036/langtech/gut/divvun/gut)`, intermediate artifacts can be found at `/Users/smo036/langtech/gut/divvun/gut/target`
@snomos snomos added the bug Something isn't working label Jun 30, 2020
@snomos
Copy link
Member Author

snomos commented Jun 30, 2020

I have installed OpenSSL via MacPorts. It did not help. Will try to install pkg-config.

@snomos
Copy link
Member Author

snomos commented Jun 30, 2020

The conclusion so far:

  • does not build on Catalina, due to the following:
  • some dependent code requires openssl, the system provided one is too old
  • installing openssl using macports requires pkgconfig for openssl to be found
  • pkgconfig has a dependency on iconv, which leads to the issue reported in gut fails to compile, with two error messages #141

These issues were not present before I upgraded to Catalina.

@snomos snomos added the critical-path This task is required to be completed by a given delivery date. label Jun 30, 2020
@taf2
Copy link

taf2 commented Aug 6, 2020

@snomos i've got the same issue on debian 10...

error: failed to run custom build command for `openssl-sys v0.9.58`

saw another thread indicate the need to install the libss-dev on debian... i'm thinking this is an issue with an old openssl library dep... going to explore that next

apt install libssl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libssl-dev is already the newest version (1.1.1d-0+deb10u3).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

update:

sorry i solved my own problem on debian i just had to install pkg-config #facepalm

@bbqsrc
Copy link
Member

bbqsrc commented Sep 25, 2020

This just requires changing reqwest to use rustls instead of openssl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical-path This task is required to be completed by a given delivery date.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants