`NETTLE_STATIC` environment variable is not working on some Linux distributions
The commit made the cargo linking directives (cargo:rustc-link-lib
) rely on pkg-config
crate, however pkg-config
crate denies static linking of system library.
This change made impossible to link nettle
statically on some distributions.
I confirmed it on rust:slim-buster
docker image, which is internally just Debian.
Possible solutions
- Respect
pkg-config
crate's behavior and do nothing.
Putting some notes on README is very helpful in my opinion. - Output
cargo:rustc-link-lib=static={library}
for each library after callingpkg_config::probe_library
as used to do so.
Edited by kawaemon