Skip to content

Build fails with stdarch_x86_has_cpuid featuer error #1526

Closed
@nikic

Description

@nikic
Contributor

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?

Activity

Amanieu

Amanieu commented on Feb 14, 2024

@Amanieu
Member

Should be fixed by #1523.

Amanieu

Amanieu commented on Feb 14, 2024

@Amanieu
Member

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

nikic commented on Feb 14, 2024

@nikic
ContributorAuthor

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

nikic

nikic commented on Feb 14, 2024

@nikic
ContributorAuthor

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

nikic commented on Feb 15, 2024

@nikic
ContributorAuthor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nikic@Amanieu

        Issue actions

          Build fails with stdarch_x86_has_cpuid featuer error · Issue #1526 · rust-lang/stdarch