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

Build fails if OpenSSL development files are not found, making it an undocumented pre-requisite #1569

Closed
1 of 5 tasks
mzabaluev opened this issue Nov 16, 2021 · 1 comment · Fixed by #1570
Closed
1 of 5 tasks
Assignees
Labels
I: dependencies Internal: related to dependencies I: documentation Internal: improvements or additions to documentation I: guide Internal: issues with the Hermes guide

Comments

@mzabaluev
Copy link
Contributor

mzabaluev commented Nov 16, 2021

Crate

ibc

Summary of Bug

The build fails if OpenSSL development files cannot be located by
the build script of openssl-sys.

Version

rev 071f609

Steps to Reproduce

On a machine where OpenSSL development files are not installed, follow the guide including the documented pre-requisites and try to build Hermes.

The failure diagnostic (on Linux):

run pkg_config fail: "\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\" did not exit successfully: exit status: 1\n--- stderr\nPackage openssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openssl.pc'\nto the PKG_CONFIG_PATH environment variable\nPackage 'openssl', required by 'virtual:world', not found\n"

--- 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-unknown-linux-gnu
$TARGET = x86_64-unknown-linux-gnu
openssl-sys = 0.9.67

', /home/mzabaluev/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/openssl-sys-0.9.67/build/find_normal.rs:174:5

Acceptance Criteria

If OpenSSL is required for the build, the guide should mention it.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@mzabaluev mzabaluev added I: documentation Internal: improvements or additions to documentation I: dependencies Internal: related to dependencies I: guide Internal: issues with the Hermes guide labels Nov 16, 2021
@mzabaluev mzabaluev self-assigned this Nov 16, 2021
@mzabaluev
Copy link
Contributor Author

As hyper and other libraries could be switched to use rustls with feature flags, the (default) decision to use OpenSSL perhaps needs to be thought over. I can see the following benefits:

  • a very mature TLS implementation;
  • integration with system-installed PKI root CA certificates (system-installed libssl.so tends to be set up for that in Linux distros).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: dependencies Internal: related to dependencies I: documentation Internal: improvements or additions to documentation I: guide Internal: issues with the Hermes guide
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant