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

OPENSSL_STATIC ignored if pkg-config succeeds #878

Closed
harmic opened this issue Mar 14, 2018 · 2 comments
Closed

OPENSSL_STATIC ignored if pkg-config succeeds #878

harmic opened this issue Mar 14, 2018 · 2 comments

Comments

@harmic
Copy link

harmic commented Mar 14, 2018

In a system with pkg-config working, if you give this:

OPENSSL_STATIC=1 cargo build

then OPENSSL_STATIC is ignored. The reason is that build.rs calls try_pkg_config before it even considers OPENSSL_STATIC, and if try_pkg_config succeeds it exits build.rs early.

The workaround is to set both OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR manually so that try_pkg_config is never invoked. The documentation does not state this as a requirement though.

See also: how-do-i-statically-link-the-openssl-sys-crate-into-a-shared-library

@sfackler
Copy link
Owner

pkg-config also looks at OPENSSL_STATIC, but you may be running into rust-lang/pkg-config-rs#37

@sfackler
Copy link
Owner

Closing as a duplicate of #877

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