Created attachment 459096 [details] build log Primary error appears to be openssl-sys requring pkg-config for openssl to indicate an include path. However, `pkg-config --cflags openssl` returns no flags (indicating the default include path works). ``` error: failed to run custom build command for `openssl-sys v0.9.1` process didn't exit successfully: `/var/tmp/portage/dev-util/cargo-0.15.0/work/cargo-0.15.0/target/release/build/openssl-sys-76c1fa79ef1208aa/build-script-build` (exit code: 101) --- stdout cargo:rustc-link-lib=ssl cargo:rustc-link-lib=crypto --- stderr thread 'main' panicked at ' Used pkg-config to discover the OpenSSL installation, but pkg-config did not return any include paths for the installation. This crate needs to take a peek at the header files so it cannot proceed unless they're found. You can try fixing this by setting the `OPENSSL_DIR` environment variable pointing to your OpenSSL installation. ', /var/tmp/portage/dev-util/cargo-0.15.0/work/cargo_home/gentoo/openssl-sys-0.9.1/build.rs:173 note: Run with `RUST_BACKTRACE=1` for a backtrace. ` ```
Created attachment 459098 [details] emerge --info '=dev-util/cargo-0.15.0::gentoo'
Created attachment 459100 [details] emerge -pqv '=dev-util/cargo-0.15.0::gentoo'
Appears that this is caused by using pkgconf as the pkg-config provider. I've opened an issue on rust-openssl, but this could theoretically also be fixed by adding support for the PKG_CONFIG_ALLOW_SYSTEM_CFLAGS env var to pkgconf. https://github.com/sfackler/rust-openssl/issues/552
Locally built pkgconf-1.1.0 is giving the expected output. ``` x@arnold ~/g/pkgconf $ PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 ./pkgconf openssl --cflags -I/usr/include x@arnold ~/g/pkgconf $ PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkgconf openssl --cflags x@arnold ~/g/pkgconf $ PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config openssl --cflags -I/usr/include ``` But it also is including the system cflags when PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 is omitted: ``` x@arnold ~/g/pkgconf $ ./pkgconf openssl --cflags -I/usr/include x@arnold ~/g/pkgconf $ pkg-config openssl --cflags ``` Seems like a potential pkgconf bug.
Also, pkgconf does superficially appear to have support for the PKG_CONFIG_ALLOW_SYSTEM_CFLAGS variable (it's source code mentions it).
Mike, Any feedback on the pkgconf issue/difference in output?
Seemed to hit this bug with dev-util/cargo-0.16.0, although 0.15.0 was installed fine on Dec 28.
"PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkgconf openssl --cflags" does seem to be working for me on current stable dev-util/pkgconf-1.3.7, can you guys still reproduce the problem? # PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkgconf openssl --cflags -I/usr/include # pkgconf --version 1.3.7 #
dev-util/cargo-0.15 is no longer in the tree and the bug seems fixed. Please test with the recent package.