Lokathor / safe_arch

Exposes arch-specific intrinsics as safe function (via cfg).
https://docs.rs/safe_arch
Apache License 2.0
47 stars 8 forks source link

Compîlation failed in amd64 on copr #99

Open ghost opened 3 years ago

ghost commented 3 years ago

https://download.copr.fedorainfracloud.org/results/remilauzier/wide/fedora-rawhide-x86_64/02263930-rust-safe_arch/builder-live.log.gz

Compilation failed with this error on amd64. it compiled fine on aarch64.

error[E0425]: cannot find function mul_u8i8_add_horizontal_saturating_m128i in this scope --> tests/atoi_sse2.rs:12:13 | 12 | let x = mul_u8i8_add_horizontal_saturating_m128i(x, tens); / eeee macarena! / | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function pack_i32_to_u16_m128i in this scope --> tests/atoi_sse2.rs:18:13 18 let x = pack_i32_to_u16_m128i(x, x); ^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: pack_i32_to_i16_m128i
::: /builddir/build/BUILD/safe_arch-0.5.2/src/x86_x64/sse2.rs:2007:1
 |

2007 | pub fn pack_i32_to_i16_m128i(a: m128i, b: m128i) -> m128i { | --------------------------------------------------------- similarly named function pack_i32_to_i16_m128i defined here

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0425. error: could not compile safe_arch

Caused by: process didn't exit successfully: /usr/bin/rustc --crate-name atoi_sse2 --edition=2018 tests/atoi_sse2.rs --error-format=json --json=diagnostic-rendered-ansi --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no --test --cfg 'feature="default"' -C metadata=be0fd794a5104438 -C extra-filename=-be0fd794a5104438 --out-dir /builddir/build/BUILD/safe_arch-0.5.2/target/release/deps -L dependency=/builddir/build/BUILD/safe_arch-0.5.2/target/release/deps --extern safe_arch=/builddir/build/BUILD/safe_arch-0.5.2/target/release/deps/libsafe_arch-8c3bab58e19300b9.rlib -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn (exit status: 1) warning: build failed, waiting for other jobs to finish... error: build failed

Lokathor commented 3 years ago

It appears that the atoi_test was in the wrong test folder. It requires ssse3 in addition to sse2.

This should be fixed by https://github.com/Lokathor/safe_arch/commit/68abef090f871c10e42ef20069ac9b39554fb683.