Source: netavark Version: 1.0.3-4 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
netavark fails to cross build from source. A build ends with: | Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=cfg_if CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>>/debian/cargo_registry/cfg-if-1.0.0 CARGO_PKG_AUTHORS='Alex Crichton <a...@alexcrichton.com>' CARGO_PKG_DESCRIPTION='A macro to ergonomically define an item depending on a large number of #[cfg] | parameters. Structured like an if-else chain, the first matching branch is the | item that gets emitted. | ' CARGO_PKG_HOMEPAGE='https://github.com/alexcrichton/cfg-if' CARGO_PKG_LICENSE=MIT/Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=cfg-if CARGO_PKG_REPOSITORY='https://github.com/alexcrichton/cfg-if' CARGO_PKG_VERSION=1.0.0 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/release/deps:/usr/lib' rustc --crate-name cfg_if --edition=2018 /<<PKGBUILDDIR>>/debian/cargo_registry/cfg-if-1.0.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=df2022695625b25e -C extra-filename=-df2022695625b25e --out-dir /<<PKGBUILDDIR>>/target/armv7-unknown-linux-gnueabihf/release/deps --target armv7-unknown-linux-gnueabihf -L dependency=/<<PKGBUILDDIR>>/target/armv7-unknown-linux-gnueabihf/release/deps -L dependency=/<<PKGBUILDDIR>>/target/release/deps --cap-lints warn -C debuginfo=2 --cap-lints warn -C linker=arm-linux-gnueabihf-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/netavark-1.0.3 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry` | error[E0463]: can't find crate for `core` | | | = note: the `armv7-unknown-linux-gnueabihf` target may not be installed | = help: consider downloading the target with `rustup target add armv7-unknown-linux-gnueabihf` | | error[E0463]: can't find crate for `compiler_builtins` | | For more information about this error, try `rustc --explain E0463`. | error: could not compile `cfg-if` due to 2 previous errors | | Caused by: | process didn't exit successfully: `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=cfg_if CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>>/debian/cargo_registry/cfg-if-1.0.0 CARGO_PKG_AUTHORS='Alex Crichton <a...@alexcrichton.com>' CARGO_PKG_DESCRIPTION='A macro to ergonomically define an item depending on a large number of #[cfg] | parameters. Structured like an if-else chain, the first matching branch is the | item that gets emitted. | ' CARGO_PKG_HOMEPAGE='https://github.com/alexcrichton/cfg-if' CARGO_PKG_LICENSE=MIT/Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=cfg-if CARGO_PKG_REPOSITORY='https://github.com/alexcrichton/cfg-if' CARGO_PKG_VERSION=1.0.0 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/release/deps:/usr/lib' rustc --crate-name cfg_if --edition=2018 /<<PKGBUILDDIR>>/debian/cargo_registry/cfg-if-1.0.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=df2022695625b25e -C extra-filename=-df2022695625b25e --out-dir /<<PKGBUILDDIR>>/target/armv7-unknown-linux-gnueabihf/release/deps --target armv7-unknown-linux-gnueabihf -L dependency=/<<PKGBUILDDIR>>/target/armv7-unknown-linux-gnueabihf/release/deps -L dependency=/<<PKGBUILDDIR>>/target/release/deps --cap-lints warn -C debuginfo=2 --cap-lints warn -C linker=arm-linux-gnueabihf-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/netavark-1.0.3 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry` (exit status: 1) | error: failed to compile `netavark v1.0.3 (/<<PKGBUILDDIR>>)`, intermediate artifacts can be found at `/<<PKGBUILDDIR>>/target` | Traceback (most recent call last): | File "/usr/share/cargo/bin/cargo", line 241, in <module> | sys.exit(main(*sys.argv[1:])) | File "/usr/share/cargo/bin/cargo", line 231, in main | return install(os.getenv("DESTDIR", ""), | File "/usr/share/cargo/bin/cargo", line 134, in install | logrun(["env", "RUST_BACKTRACE=1", | File "/usr/share/cargo/bin/cargo", line 76, in logrun | return subprocess.run(*args, **kwargs) | File "/usr/lib/python3.10/subprocess.py", line 526, in run | raise CalledProcessError(retcode, process.args, | subprocess.CalledProcessError: Command '['env', 'RUST_BACKTRACE=1', 'CARGO_TARGET_DIR=/<<PKGBUILDDIR>>/target', '/usr/bin/cargo', '-Zavoid-dev-deps', 'install', '--verbose', '--verbose', '-j1', '--target', 'armv7-unknown-linux-gnueabihf', '--path', '/<<PKGBUILDDIR>>', '--root', 'debian/netavark/usr']' returned non-zero exit status 101. | dh_auto_install: error: env DESTDIR=debian/netavark /usr/share/cargo/bin/cargo install returned exit code 1 | make: *** [debian/rules:8: binary-arch] Error 25 | dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2 I looked into this and wondered why libstd-rust-dev was tagged <!nocheck> (and thus dropped from a cross build). Indeed, the nocheck build succeeds, but this is not because libstd-rust-dev isn't needed, it's because libstd-rust-dev is implied by other dependencies. During cross builds, this implication does not hold, so we actually need that explicit dependency. I'm attaching a patch for your convenience. Helmut
diff --minimal -Nru netavark-1.0.3/debian/changelog netavark-1.0.3/debian/changelog --- netavark-1.0.3/debian/changelog 2022-10-19 22:22:07.000000000 +0200 +++ netavark-1.0.3/debian/changelog 2022-12-02 09:32:15.000000000 +0100 @@ -1,3 +1,10 @@ +netavark (1.0.3-4.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Depend on libstd-rust-dev unconditionally. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Fri, 02 Dec 2022 09:32:15 +0100 + netavark (1.0.3-4) unstable; urgency=medium * Fix FTBFS, bump nix version, thanks to Lucas Nussbaum (Closes: #1020122). diff --minimal -Nru netavark-1.0.3/debian/control netavark-1.0.3/debian/control --- netavark-1.0.3/debian/control 2022-10-19 22:22:07.000000000 +0200 +++ netavark-1.0.3/debian/control 2022-12-02 09:32:15.000000000 +0100 @@ -32,7 +32,7 @@ librust-url-dev, librust-zbus-dev, librust-zvariant-dev, - libstd-rust-dev <!nocheck>, + libstd-rust-dev, rustc:native <!nocheck>, Standards-Version: 4.6.1 Homepage: https://github.com/containers/netavark