-
Notifications
You must be signed in to change notification settings - Fork 223
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
LLVM ERROR: Not supported instr #124
Comments
Try |
It is a bit different, but still the same 🙂
With
I have also tried a clean build with:
Still the same. |
I have made a reproduction: FROM rustlang/rust:nightly-slim
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
avr-libc \
binutils-avr \
gcc-avr \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
COPY . /code
WORKDIR /code/boards/arduino-uno
RUN rustup component add rust-src
RUN cargo +nightly build --example uno-blink
Steps:
This is the output:
|
Regression in |
We have identified the problem, let's see how it will be solved. In the meantime, for anyone stumbling upon this issue: Just use an older toolchain like rustup toolchain install nightly-2021-01-07
# ...
cargo +nightly-2021-01-07 build |
Thank you for the workaround! |
Due to a compiler regression [1], latest nightly builds of the compiler are currently broken. Instead, suggest using the last working build which was `nightly-2021-01-07`. This commit can hopefully be reverted once the compiler is fixed again. [1]: rust-lang/compiler-builtins#400 Ref: #124
Newer nightly fails to compile: LLVM ERROR: Not supported instr: <MCInst 258 <MCOperand Reg:1> <MCOperand Imm:15> <MCOperand Reg:45>> error: could not compile `compiler_builtins` Already reported upstream: Rahix/avr-hal#124 (comment)
For anyone that needs this information: Rust So, if you are (for example) looking for a release where you can work with Sources: |
One more solution to |
I found it's easiest to create a file called [toolchain]
channel = "nightly-2021-01-07"
components = ["rust-src"] afterwards you can simply run |
For my own future reference: these are the docs for |
This is actually super helpful. Thanks for the tip! |
This is rust-lang/rust#82104 and rust-lang/compiler-builtins#400 |
Thank you! I was looking for this! |
gcc backend will be soon supported for rust |
On Thu, Jul 08, 2021 at 09:39:44PM -0700, sodo wrote:
gcc backend will be soon supported for rust
so can we use them instead?
Soon we can find out
|
Pardon my way too whity response. Yes please, keep sharing possible solutions. |
Hi everyone. Same problem here, I just $ cargo build
Compiling compiler_builtins v0.1.49
Compiling core v0.0.0 (/home/ssmg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
Compiling proc-macro2 v1.0.28
Compiling unicode-xid v0.2.2
Compiling syn v1.0.74
Compiling semver-parser v0.7.0
Compiling proc-macro-hack v0.5.19
Compiling paste v1.0.5
Compiling semver v0.9.0
Compiling rustc_version v0.2.3
Compiling quote v1.0.9
Compiling bare-metal v0.2.5
Compiling rustc-std-workspace-core v1.99.0 (/home/ssmg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
Compiling nb v1.0.0
Compiling cfg-if v0.1.10
Compiling void v1.0.2
Compiling ufmt-write v0.1.0
Compiling vcell v0.1.3
LLVM ERROR: Not supported instr: <MCInst 296 <MCOperand Reg:1> <MCOperand Imm:15> <MCOperand Reg:39>>
error: could not compile `compiler_builtins`
warning: build failed, waiting for other jobs to finish...
error: build failed I've tried [toolchain]
channel = "nightly-2021-01-07"
components = [ "rust-src" ] and then Compiling compiler_builtins v0.1.49
Compiling nb v1.0.0
Compiling bare-metal v0.2.5
Compiling ufmt-write v0.1.0
Compiling vcell v0.1.3
Compiling void v1.0.2
Compiling cfg-if v0.1.10
Compiling cfg-if v1.0.0
Compiling panic-halt v0.2.0
Compiling ufmt v0.1.0
Compiling nb v0.1.3
Compiling avr-device v0.3.1
Compiling embedded-hal v0.2.6
LLVM ERROR: Not supported instr: <MCInst 296 <MCOperand Reg:1> <MCOperand Imm:13> <MCOperand Reg:40>>
error: could not compile `compiler_builtins`
warning: build failed, waiting for other jobs to finish...
error: build failed and with error: "/home/ssmg/.rustup/toolchains/nightly-2021-01-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/Cargo.lock" does not exist, unable to build with the standard library, try:
rustup component add rust-src but I make Thank you for your help and time. |
@ssmgcode you need to add the rust-src component for the particular toolchain. I believe you can use the same +«toolchain-version» trick you can use with other Rust commands. |
@ssmgcode, it seems your rustup is not picking up |
Thank you! I made |
Yes, it seemed, it was a really weird thing. My rustup version is Thank you for your time guys, this makes me happy. |
Heads-up: rust-lang/rust#96845 🙂 |
This is huge, thank you so much for your efforts here @Patryk27! |
The underlying [issue] in avr-hal has been fixed. [issue]: Rahix/avr-hal#124
I am using this example: https://github.com/Rahix/avr-hal/tree/d17a441a667dd65e5a9be75b0e71d1beadf93e84/boards/arduino-uno
I have also executed
rustup component add rust-src
And it fails to compile with this error:
My versions:
The text was updated successfully, but these errors were encountered: