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

Can't compile wasmtime 0.32.0 crate using latest rustc 1.59.0-nightly on ubuntu 20.04 #92320

Closed
Kailai-Wang opened this issue Dec 27, 2021 · 6 comments
Labels
C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression.

Comments

@Kailai-Wang
Copy link

Kailai-Wang commented Dec 27, 2021

Code

wasmtime crate fails to compile on ubuntu 20.04 using the lastest rustc nightly: rustc 1.59.0-nightly (f8abed9ed 2021-12-26)

I've got a bunch of errors related to asm macro, the errors messages are the same except pointing to the different code positions.
Here is an example:

error: cannot find macro `asm` in this scope
  --> /home/kai/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/rustix-0.26.2/src/imp/linux_raw/arch/inline/x86_64.rs:63:5
   |
63 |     asm!(
   |     ^^^
   |
   = note: consider importing one of these items:
           std::arch::asm
           core::arch::asm

On MacOs it compiles without any problems.

I expected to see this happen: the compilation succeeds

Instead, this happened: the compilation fails (see error messages above)

How to reproduce

1. cargo init test
2. cd test
3. add the following line to the dependencies part in Cargo.toml:
    wasmtime = "0.32.0"
4. cargo build --release -p wasmtime

Version it worked on

It most recently worked on:
nightly-2021-12-12-x86_64-unknown-linux-gnu

Version with regression

rustc --version --verbose:

rustc --version --verbose
rustc 1.59.0-nightly (f8abed9ed 2021-12-26)
binary: rustc
commit-hash: f8abed9ed48bace6be0087bcd44ed534e239b8d8
commit-date: 2021-12-26
host: x86_64-unknown-linux-gnu
release: 1.59.0-nightly
LLVM version: 13.0.0

Those are the versions that were tested. It could be that the regression happened earlier.

Backtrace

Backtrace

<backtrace>

@Kailai-Wang Kailai-Wang added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Dec 27, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Dec 27, 2021
@hkratz
Copy link
Contributor

hkratz commented Dec 27, 2021

asm! and global_asm! were removed from the prelude in #91728 after the FCP in #87228. So I guess this is expected and rustix needs to be updated.

@Kailai-Wang
Copy link
Author

asm! and global_asm! were removed from the prelude in #91728 after the FCP in #87228. So I guess this is expected and rustix needs to be updated.

Thank you for the reply.
I'll close this and file a report on rustix side

@rustbot rustbot removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Dec 27, 2021
@hkratz
Copy link
Contributor

hkratz commented Dec 27, 2021

@Kailai-Wang This has actually been fixed in rustix and wasmtime depends on rustix v0.31.0 which contains the fix but somehow rustix v0.26.2 is being picked up. Maybe best to file the bug with wasmtime.

@Kailai-Wang
Copy link
Author

@Kailai-Wang This has actually been fixed in rustix and wasmtime depends on rustix v0.31.0 which contains the fix but somehow rustix v0.26.2 is being picked up. Maybe best to file the bug with wasmtime.

I'll do that.
Thank you for pointing it out, much appreciated! 👍

@hkratz
Copy link
Contributor

hkratz commented Dec 27, 2021

Ah, it just needs a new wasmtime release I think, the dependencies have been updated but after the release of wasmtime 0.32.0.

@Kailai-Wang
Copy link
Author

Ah, it just needs a new wasmtime release I think, the dependencies have been updated but after the release of wasmtime 0.32.0.

I see.
Just checked their TOML dependencies, rustix v0.31.0 is now applied.
Tried to compile rustix v0.31.0 on linux and it worked.

I think I'll just wait a bit. Thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression.
Projects
None yet
Development

No branches or pull requests

3 participants