debian buildd failure on powerpc
Debian's build daemons suggest that rust-nettle-sys 2.0.4-1 fails to build on powerpc, and the error is:
Compiling nettle-sys v2.0.4 (/<<PKGBUILDDIR>>)
Running `LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' CARGO_PKG_HOMEPAGE= CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_VERSION_PRE= CARGO_PKG_DESCRIPTION='Low-level Rust bindings for the Nettle cryptographic library' CARGO_PKG_AUTHORS='Justus Winter <justus@sequoia-pgp.org>:Kai Michaelis <kai@sequoia-pgp.org>' CARGO_PKG_VERSION_PATCH=4 CARGO_PKG_VERSION_MAJOR=2 CARGO_PKG_REPOSITORY='https://gitlab.com/sequoia-pgp/nettle-sys' CARGO=/usr/bin/cargo CARGO_PKG_VERSION=2.0.4 CARGO_PKG_NAME=nettle-sys CARGO_PKG_VERSION_MINOR=0 rustc --crate-name build_script_build build.rs --color never --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=6af0268acd761f75 -C extra-filename=-6af0268acd761f75 --out-dir /<<PKGBUILDDIR>>/target/debug/build/nettle-sys-6af0268acd761f75 -C incremental=/<<PKGBUILDDIR>>/target/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/debug/deps --extern bindgen=/<<PKGBUILDDIR>>/target/debug/deps/libbindgen-4c3abfbf6398eb11.rlib --extern pkg_config=/<<PKGBUILDDIR>>/target/debug/deps/libpkg_config-fa3078f11a83c5e9.rlib -L native=/<<PKGBUILDDIR>>/target/debug/build/libloading-a62528a7e3f76a4e/out`
Running `/<<PKGBUILDDIR>>/target/debug/build/nettle-sys-6af0268acd761f75/build-script-build`
[nettle-sys 2.0.4] cargo:rerun-if-env-changed=NETTLE_STATIC
[nettle-sys 2.0.4] cargo:rerun-if-env-changed=NETTLE_PREGENERATED_BINDINGS
[nettle-sys 2.0.4] cargo:rustc-link-search=native=/usr/lib/powerpc-linux-gnu
[nettle-sys 2.0.4] cargo:rustc-link-lib=nettle
[nettle-sys 2.0.4] cargo:rustc-link-lib=hogweed
[nettle-sys 2.0.4] cargo:include=/usr/include
[nettle-sys 2.0.4] cargo:rustc-link-lib=dylib=nettle
[nettle-sys 2.0.4] cargo:rustc-link-lib=dylib=hogweed
[nettle-sys 2.0.4] cargo:rustc-link-search=native=/usr/lib/powerpc-linux-gnu
[nettle-sys 2.0.4] cargo:rustc-link-lib=dylib=gmp
error: failed to run custom build command for `nettle-sys v2.0.4 (/<<PKGBUILDDIR>>)`
Caused by:
process didn't exit successfully: `/<<PKGBUILDDIR>>/target/debug/build/nettle-sys-6af0268acd761f75/build-script-build` (signal: 11, SIGSEGV: invalid memory reference)
--- stdout
It's not clear to me what's going wrong there.
On i386, the same build does not have a segfault though it does produce some funky warnings:
[nettle-sys 2.0.4] cargo:rustc-link-search=native=/usr/lib/i386-linux-gnu
[nettle-sys 2.0.4] cargo:rustc-link-lib=dylib=gmp
[nettle-sys 2.0.4] cargo:warning=couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))
[nettle-sys 2.0.4] cargo:warning=set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable
[nettle-sys 2.0.4] Failed to run rustfmt: which wasn't enabled, and no rustfmt binary specified (non-fatal, continuing)
warning: couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))
warning: set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable
Running `CARGO_PRIMARY_PACKAGE=1 CARGO_PKG_VERSION_MAJOR=2 CARGO_PKG_VERSION_PRE= CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_HOMEPAGE= CARGO=/usr/bin/cargo CARGO_PKG_VERSION_MINOR=0 OUT_DIR=/<<PKGBUILDDIR>>/target/i686-unknown-linux-gnu/debug/build/nettle-sys-5a4ab7c017aa4c35/out CARGO_PKG_DESCRIPTION='Low-level Rust bindings for the Nettle cryptographic library' CARGO_PKG_NAME=nettle-sys CARGO_PKG_VERSION=2.0.4 CARGO_PKG_AUTHORS='Justus Winter <justus@sequoia-pgp.org>:Kai Michaelis <kai@sequoia-pgp.org>' LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' CARGO_PKG_REPOSITORY='https://gitlab.com/sequoia-pgp/nettle-sys' CARGO_PKG_VERSION_PATCH=4 rustc --crate-name nettle_sys src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=f98aaef0af8131d5 -C extra-filename=-f98aaef0af8131d5 --out-dir /<<PKGBUILDDIR>>/target/i686-unknown-linux-gnu/debug/deps --target i686-unknown-linux-gnu -C incremental=/<<PKGBUILDDIR>>/target/i686-unknown-linux-gnu/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/i686-unknown-linux-gnu/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps -C debuginfo=2 --cap-lints warn -C linker=i686-linux-gnu-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/nettle-sys-2.0.4 -L native=/usr/lib/i386-linux-gnu -L native=/usr/lib/i386-linux-gnu -l nettle -l hogweed -l dylib=nettle -l dylib=hogweed -l dylib=gmp`
Running `CARGO_PRIMARY_PACKAGE=1 CARGO_PKG_VERSION_MAJOR=2 CARGO_PKG_VERSION_PRE= CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_PKG_HOMEPAGE= CARGO=/usr/bin/cargo CARGO_PKG_VERSION_MINOR=0 OUT_DIR=/<<PKGBUILDDIR>>/target/i686-unknown-linux-gnu/debug/build/nettle-sys-5a4ab7c017aa4c35/out CARGO_PKG_DESCRIPTION='Low-level Rust bindings for the Nettle cryptographic library' CARGO_PKG_NAME=nettle-sys CARGO_PKG_VERSION=2.0.4 CARGO_PKG_AUTHORS='Justus Winter <justus@sequoia-pgp.org>:Kai Michaelis <kai@sequoia-pgp.org>' LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/debug/deps:/usr/lib' CARGO_PKG_REPOSITORY='https://gitlab.com/sequoia-pgp/nettle-sys' CARGO_PKG_VERSION_PATCH=4 rustc --crate-name nettle_sys src/lib.rs --color never --emit=dep-info,metadata,link -C debuginfo=2 --test -C metadata=2d28e5281ee53da7 -C extra-filename=-2d28e5281ee53da7 --out-dir /<<PKGBUILDDIR>>/target/i686-unknown-linux-gnu/debug/deps --target i686-unknown-linux-gnu -C incremental=/<<PKGBUILDDIR>>/target/i686-unknown-linux-gnu/debug/incremental -L dependency=/<<PKGBUILDDIR>>/target/i686-unknown-linux-gnu/debug/deps -L dependency=/<<PKGBUILDDIR>>/target/debug/deps -C debuginfo=2 --cap-lints warn -C linker=i686-linux-gnu-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/nettle-sys-2.0.4 -L native=/usr/lib/i386-linux-gnu -L native=/usr/lib/i386-linux-gnu -l nettle -l hogweed -l dylib=nettle -l dylib=hogweed -l dylib=gmp`
Finished dev [unoptimized + debuginfo] target(s) in 1m 32s
Running `/<<PKGBUILDDIR>>/target/i686-unknown-linux-gnu/debug/deps/nettle_sys-2d28e5281ee53da7`
running 118 tests
I'm not sure how to diagnose this further, but if you have any suggestions i'm happy to try them out.