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

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

Closed
ramagali24 opened this issue Jun 4, 2024 · 8 comments

Comments

@ramagali24
Copy link

Compiling polyval v0.6.1
Compiling ghash v0.5.0
Compiling ctr v0.9.2
Compiling aes v0.8.3
rustc-LLVM ERROR: Do not know how to split the result of this operator!

error: could not compile polyval (lib)
warning: build failed, waiting for other jobs to finish...
rustc-LLVM ERROR: Do not know how to split the result of this operator!

error: could not compile aes (lib)
make: *** [Makefile:114: bin/stage2.bin] Error 101

@tarcieri
Copy link
Member

tarcieri commented Jun 4, 2024

What target is this for? Is it a debug or release build? (and if it's the former, can you try adding --release?)

What version of the cpufeatures crate do you have? Can you ensure it's up to date?

See also: RustCrypto/utils#821

@ramagali24
Copy link
Author

thanks for reply. When i run cargo build --release from my project , i hit lot these errors. I am building x86_64
error[E0433]: failed to resolve: use of undeclared type Vec
--> igvmbuilder/src/ovmf_firmware.rs:230:24
|
230 | let mut data = Vec::with_capacity(len);
| ^^^ use of undeclared type Vec

error[E0433]: failed to resolve: use of undeclared type Vec
--> igvmbuilder/src/ovmf_firmware.rs:243:30
|
243 | let mut directives = Vec::::new();
| ^^^ use of undeclared type Vec

error[E0433]: failed to resolve: use of undeclared type Box
--> igvmbuilder/src/ovmf_firmware.rs:255:12
|
255 | Ok(Box::new(Self {
| ^^^ use of undeclared type Box

Some errors have detailed explanations: E0405, E0412, E0425, E0432, E0433, E0463, E0531.
For more information about an error, try rustc --explain E0405.
error: could not compile igvmbuilder (bin "igvmbuilder") due to 319 previous errors

@ramagali24
Copy link
Author

i am trying to build this project https://github.com/coconut-svsm/svsm

@ramagali24
Copy link
Author

Any suggestions on this please.
svsm$ cargo build --target x86_64-unknown-uefi --no-default-features
Compiling svsm v0.1.0 (/home/amd/igvm/svsm/kernel)
error[E0463]: can't find crate for core
|
= note: the x86_64-unknown-uefi target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-uefi

For more information about this error, try rustc --explain E0463.
error: could not compile cfg-if (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile subtle (lib) due to 1 previous error
error: could not compile opaque-debug (lib) due to 1 previous error
error: could not compile cpufeatures (lib) due to 1 previous error
error: could not compile byteorder (lib) due to 1 previous error
error: could not compile cpuarch (lib) due to 1 previous error
error: could not compile bitflags (lib) due to 1 previous error
error[E0463]: can't find crate for std
|
= note: the x86_64-unknown-uefi target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-uefi

error: could not compile test (lib) due to 1 previous error
error: could not compile once_cell (lib) due to 1 previous error
error: could not compile syscall (lib) due to 1 previous error
error: could not compile static_assertions (lib) due to 1 previous error
error: could not compile igvmbuilder (bin "igvmbuilder") due to 1 previous error
error: could not compile log (lib) due to 1 previous error
error: could not compile igvmmeasure (bin "igvmmeasure") due to 1 previous error

@ramagali24
Copy link
Author

Please check this
https://github.com/ramagali24/svsm.git
cargo build --release --target=x86_64-unknown-none -p svsm

@tarcieri
Copy link
Member

tarcieri commented Jun 4, 2024

Note that only the original LLVM ERROR: Do not know how to split the result of this operator! is relevant.

The rest are problems with your environment: you don't have the x86_64-unknown-uefi target installed. It's telling you that much too:

= note: the x86_64-unknown-uefi target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-uefi

The project you linked has the latest cpufeatures: v0.2.12. I am not sure why you are getting an LLVM error here, as I thought it would be addressed by RustCrypto/utils#821, but I would consider it a bug on our end (really it's a rustc/LLVM bug, but one we should work around in the interim) /cc @newpavlov

@tarcieri tarcieri changed the title Helo need how to resolve ghash and ployval issues polyval: LLVM ERROR: Do not know how to split the result of this operator! Jun 4, 2024
@newpavlov
Copy link
Member

I think this issues is effectively a duplicate of #189. See also the relevant rust-lang issue: rust-lang/rust#117938

For now, the only practical solution is to use the polyval_force_soft configuration flag.

@tarcieri
Copy link
Member

tarcieri commented Jun 5, 2024

Aah yes sorry, dup of #189

@tarcieri tarcieri closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2024
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

3 participants