Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with stdarch_x86_has_cpuid featuer error #1526

Closed
nikic opened this issue Feb 14, 2024 · 5 comments
Closed

Build fails with stdarch_x86_has_cpuid featuer error #1526

nikic opened this issue Feb 14, 2024 · 5 comments

Comments

@nikic
Copy link
Contributor

nikic commented Feb 14, 2024

Trying to run cargo +nightly test in the root directory, I get:

   Compiling std_detect v0.1.5 (/home/npopov/repos/stdarch/crates/std_detect)
   Compiling serde_json v1.0.113
   Compiling csv v1.3.0
   Compiling serde-xml-rs v0.6.0
   Compiling env_logger v0.8.4
   Compiling env_logger v0.10.2
error[E0658]: use of unstable library feature 'stdarch_x86_has_cpuid'
  --> crates/std_detect/src/detect/os/x86.rs:33:9
   |
33 |     if !has_cpuid() {
   |         ^^^^^^^^^
   |
   = note: see issue #60123 <https://github.com/rust-lang/rust/issues/60123> for more information
   = help: add `#![feature(stdarch_x86_has_cpuid)]` to the crate attributes to enable
   = note: this compiler was built on 2024-02-13; consider upgrading it if it is out of date

error[E0635]: unknown feature `stdsimd`
  --> crates/std_detect/src/lib.rs:26:56
   |
26 | #![cfg_attr(not(feature = "rustc-dep-of-std"), feature(stdsimd))]
   |                                                        ^^^^^^^

Some errors have detailed explanations: E0635, E0658.
For more information about an error, try `rustc --explain E0635`.
error: could not compile `std_detect` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `std_detect` (lib test) due to 2 previous errors

I'm not sure whether something in nightly broke this crate or whether this crate requires a special incantation to build?

@Amanieu
Copy link
Member

Amanieu commented Feb 14, 2024

Should be fixed by #1523.

@Amanieu Amanieu closed this as completed Feb 14, 2024
@Amanieu
Copy link
Member

Amanieu commented Feb 14, 2024

Though it seems we are now hitting a new error on i586-unknown-linux-gnu:

LLVM ERROR: Do not know how to split the result of this operator!

Was there an LLVM update recently?

@nikic
Copy link
Contributor Author

nikic commented Feb 14, 2024

Yes, rust-lang/rust#120055 landed yesterday. I put up rust-lang/rust#121088 to fix this issue.

@nikic
Copy link
Contributor Author

nikic commented Feb 14, 2024

This makes x86_64 pass tests, but on i586 we have ~4000 test failures of the kind:

---- core_arch::x86::tbm::assert__blcfill_u32_blcfill stdout ----
disassembly for stdarch_test_shim__blcfill_u32_blcfill: 
	 0: call 19ddf5 <stdarch_test_shim__blcfill_u32_blcfill+0x5>
	 1: pop %eax
	 2: add $0x51df6b,%eax
	 3: mov 0x4(%esp),%ecx
	 4: lea -0x28a16a(%eax),%edx
	 5: mov 0x224(%eax),%eax
	 6: mov %edx,(%eax)
	 7: blcfill %ecx,%eax
	 8: ret
	 9: xchg %ax,%ax
	10: xchg %ax,%ax
	11: xchg %ax,%ax
	12: xchg %ax,%ax
	13: xchg %ax,%ax
	14: xchg %ax,%ax
thread 'core_arch::x86::tbm::assert__blcfill_u32_blcfill' panicked at crates/stdarch-test/src/lib.rs:184:9:
instruction found, but the disassembly contains subroutine call instructions, which hint that inlining failed

@nikic
Copy link
Contributor Author

nikic commented Feb 15, 2024

Nevermind that last comment, apparently that's normal without -C relocation-model=static.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants