mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 06:48:18 -07:00
libssh2-sys was passing -I/usr/include -I/usr/${CHOST}/include to
the compiler, which would then pick up the multilib wrapper for dev-libs/openssl
for CBUILD and break the build. After a lot of trial and error, it seems
this comes from where zlib is used [0]. Use static zlib instead (which
disables searching for zlib in the zlib-sys crate and builds its own). It
seems Google ran into this at some point too [1].
(This happened with mips-linux-gnu.)
In the process of debugging that, I found the PKG_CONFIG_* exports to be
a bit risky in terms of possibly breaking the build in unexpected ways, so
I've changed them to be scoped to the right target, ditto the OPENSSL_* vars.
[0] https://github.com/alexcrichton/ssh2-rs/blob/libssh2-sys-0.3.1/libssh2-sys/build.rs#L153
[1] https://issues.chromium.org/issues/357917328
Bug: https://bugs.gentoo.org/978022
Signed-off-by: Sam James <sam@gentoo.org>
28 KiB
28 KiB