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

Fails to build on x86 without SSE2 #69

Closed
jbeich opened this issue Jun 25, 2022 · 2 comments
Closed

Fails to build on x86 without SSE2 #69

jbeich opened this issue Jun 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@jbeich
Copy link

jbeich commented Jun 25, 2022

FreeBSD, NetBSD, OpenBSD still support pre-SSE2 CPUs, so downstream rust package for 32-bit x86 (aka i386) targets real i686 (aka pentiumpro) or i586 (aka pentium). To reproduce on Linux (via rustup) pass --target i586-unknown-linux-gnu or similar.

$ cargo build
[...]
   Compiling quanta v0.10.0 (/tmp/quanta)
error[E0599]: no function or associated item named `new` found for struct `CpuId` in the current scope
   --> src/lib.rs:558:24
    |
558 |     let cpuid = CpuId::new();
    |                        ^^^ function or associated item not found in `CpuId`

error[E0599]: no function or associated item named `new` found for struct `CpuId` in the current scope
   --> src/lib.rs:566:24
    |
566 |     let cpuid = CpuId::new();
    |                        ^^^ function or associated item not found in `CpuId`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `quanta` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
@tobz tobz added the bug Something isn't working label Jun 26, 2022
@tobz
Copy link
Member

tobz commented Jun 26, 2022

Trying to build quanta via cargo build --target i586-unknown-linux-gnu doesn't seem to actually manage to even build the dependencies, namely once_cell.

I pushed a change to main to consolidate the usage of CpuId to an area where know we at least are on x86_64 with SSE2 support. Do you mind testing that out locally?

@jbeich
Copy link
Author

jbeich commented Jun 26, 2022

Thanks, builds fine now:

$ cargo build
[...]
   Compiling quanta v0.10.0 (/tmp/quanta)
warning: unused import: `raw_cpuid::CpuId`
   --> src/lib.rs:149:5
    |
149 | use raw_cpuid::CpuId;
    |     ^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default

warning: `quanta` (lib) generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 0.86s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants