Bug#931002: rust-coresimd: FTBFS (unrecognized platform-specific intrinsic function: `x86_rdrand16_step`unrecognized platform-specific intrinsic function: `x86_rdrand16_step`)

2019-07-05 Thread Henri Sivonen
> For future release, a better way of handling this will be needed. The fact
> that these updates break random other packages isn't really acceptable.

The fix in sid involved patching encoding_rs 0.8.15, which addressed
the simd crate problem. The reason why simd complied previously and
got packaged is explained by the build.rs hack in the simd crate.
Upstream encoding_rs 0.8.16 no longer depends on the simd crate and
instead depends on packed_simd, which doesn't have such a hack.
Indeed, the hack was recognized as problematic upstream, and the
present the harmlessness of the hack in encoding_rs's own build.rs now
depends on the build failing in packed_simd when using the stable
compiler.

As reported, the failures were not only in the simd crate but also in
coresimd, which was pulled in by packed_simd, which was pulled in as
an optional dependency of the bytecount crate. None of these three
crates have the build.rs hack, so the build for packed_simd and
coresimd should have failed even before the recent rustc update in sid
and buster.

Indeed, if I try to build the corresponding upstream versions of
bytecount and packed_simd with by invoking
cargo build --features generic-simd
from the bytecount directory locally with Rust 1.32 from rustup, the
build fails in packed_simd due to use of unstable features.

In the interest of avoiding future breakage, it would be particularly
worthwhile investigate how it was possible that packed_simd and
coresimd made it through the import as optional dependencies of
bytecount and compiled with the previous compiler when they shouldn't
have compiled. (Also: Why does the newly-uploaded version of
packed_simd in sid compile now?)

-- 
Henri Sivonen



Bug#931002: rust-coresimd: FTBFS (unrecognized platform-specific intrinsic function: `x86_rdrand16_step`unrecognized platform-specific intrinsic function: `x86_rdrand16_step`)

2019-06-24 Thread Santiago Vila
Package: src:rust-coresimd
Version: 0.1.2-1
Severity: serious
Tags: ftbfs

Dear maintainer:

I tried to build this package in buster but it failed:


[...]
 debian/rules build-arch
dh build-arch --buildsystem cargo
   dh_update_autotools_config -a -O--buildsystem=cargo
   dh_autoreconf -a -O--buildsystem=cargo
   dh_auto_configure -a -O--buildsystem=cargo
debian cargo wrapper: options, profiles, parallel: ['parallel=2'] [] ['-j2']
debian cargo wrapper: rust_type, gnu_type: x86_64-unknown-linux-gnu, 
x86_64-linux-gnu
debian cargo wrapper: linking /usr/share/cargo/registry/* into 
/<>/debian/cargo_registry/
   dh_auto_build -a -O--buildsystem=cargo
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<>'
export RUSTC_BOOTSTRAP=1; \
dh_auto_test
debian cargo wrapper: options, profiles, parallel: ['parallel=2'] [] ['-j2']
debian cargo wrapper: rust_type, gnu_type: x86_64-unknown-linux-gnu, 
x86_64-linux-gnu
debian cargo wrapper: running subprocess (['env', 'RUST_BACKTRACE=1', 
'/usr/bin/cargo', '-Zavoid-dev-deps', 'build', '--verbose', '--verbose', '-j2', 
'--target', 'x86_64-unknown-linux-gnu'],) {}
   Compiling coresimd v0.1.2 (/<>)
 Running `rustc --crate-name build_script_build build.rs --color never 
--crate-type bin --emit=dep-info,link -C debuginfo=2 -C 
metadata=4c9f73b74e941fa4 -C extra-filename=-4c9f73b74e941fa4 --out-dir 
/<>/target/debug/build/coresimd-4c9f73b74e941fa4 -C 
incremental=/<>/target/debug/incremental -L 
dependency=/<>/target/debug/deps`
 Running 
`/<>/target/debug/build/coresimd-4c9f73b74e941fa4/build-script-build`
[coresimd 0.1.2] cargo:rustc-env=TARGET=x86_64-unknown-linux-gnu
 Running `rustc --crate-name coresimd src/lib.rs --color never --crate-type 
lib --emit=dep-info,link -C debuginfo=2 -C metadata=709a32ec1dae0a97 -C 
extra-filename=-709a32ec1dae0a97 --out-dir 
/<>/target/x86_64-unknown-linux-gnu/debug/deps --target 
x86_64-unknown-linux-gnu -C 
incremental=/<>/target/x86_64-unknown-linux-gnu/debug/incremental 
-L dependency=/<>/target/x86_64-unknown-linux-gnu/debug/deps -L 
dependency=/<>/target/debug/deps -C debuginfo=2 --cap-lints warn 
-C linker=x86_64-linux-gnu-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix 
/<>=/usr/share/cargo/registry/coresimd-0.1.2`
error: unrecognized platform-specific intrinsic function: `x86_rdrand16_step`
 --> src/coresimd/x86/rdrand.rs:6:5
  |
6 | fn x86_rdrand16_step() -> (u16, i32);
  | ^

error: unrecognized platform-specific intrinsic function: `x86_rdrand32_step`
 --> src/coresimd/x86/rdrand.rs:7:5
  |
7 | fn x86_rdrand32_step() -> (u32, i32);
  | ^

error: unrecognized platform-specific intrinsic function: `x86_rdseed16_step`
 --> src/coresimd/x86/rdrand.rs:8:5
  |
8 | fn x86_rdseed16_step() -> (u16, i32);
  | ^

error: unrecognized platform-specific intrinsic function: `x86_rdseed32_step`
 --> src/coresimd/x86/rdrand.rs:9:5
  |
9 | fn x86_rdseed32_step() -> (u32, i32);
  | ^

error: unrecognized platform-specific intrinsic function: `x86_rdrand64_step`
 --> src/coresimd/x86_64/rdrand.rs:6:5
  |
6 | fn x86_rdrand64_step() -> (u64, i32);
  | ^

error: unrecognized platform-specific intrinsic function: `x86_rdseed64_step`
 --> src/coresimd/x86_64/rdrand.rs:7:5
  |
7 | fn x86_rdseed64_step() -> (u64, i32);
  | ^

error: aborting due to 6 previous errors

error: Could not compile `coresimd`.

Caused by:
  process didn't exit successfully: `rustc --crate-name coresimd src/lib.rs 
--color never --crate-type lib --emit=dep-info,link -C debuginfo=2 -C 
metadata=709a32ec1dae0a97 -C extra-filename=-709a32ec1dae0a97 --out-dir 
/<>/target/x86_64-unknown-linux-gnu/debug/deps --target 
x86_64-unknown-linux-gnu -C 
incremental=/<>/target/x86_64-unknown-linux-gnu/debug/incremental 
-L dependency=/<>/target/x86_64-unknown-linux-gnu/debug/deps -L 
dependency=/<>/target/debug/deps -C debuginfo=2 --cap-lints warn 
-C linker=x86_64-linux-gnu-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix 
/<>=/usr/share/cargo/registry/coresimd-0.1.2` (exit code: 1)
dh_auto_test: /usr/share/cargo/bin/cargo build returned exit code 101
make[1]: *** [debian/rules:8: override_dh_auto_test] Error 101
make[1]: Leaving directory '/<>'
make: *** [debian/rules:4: build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit 
status 2


The build was made in my autobuilder with "dpkg-buildpackage -B"
and it also fails here:

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/rust-coresimd.html

where you can get a full build log if you need it.

If this is really a bug in one of the