rustc_codegen_cranelift icon indicating copy to clipboard operation
rustc_codegen_cranelift copied to clipboard

[arm] error: couldn't load codegen backend

Open zwhitchcox opened this issue 5 years ago • 7 comments

Hi, I'm trying to follow the build instructions, but when I get to test.sh, I get this error:

error: couldn't load codegen backend "/home/pi/codegen/rustc_codegen_cranelift/target/release/librustc_codegen_cranelift.so": "/home/pi/codegen/rustc_codegen_cranelift/target/release/librustc_codegen_cranelift.so: undefined symbol: __register_frame"

zwhitchcox avatar Jul 08 '20 19:07 zwhitchcox

Are you using glibc or another libc? Just guessing.

bjorn3 avatar Jul 08 '20 19:07 bjorn3

That symbol should be provided by libunwind: https://github.com/bjorn3/rustc_codegen_cranelift/blob/eb5ce4e92ae8d512804279fda1101032c7ec9f28/src/debuginfo/unwind.rs#L136

bjorn3 avatar Jul 08 '20 20:07 bjorn3

Not sure if this answers your question, but this is the output of ldd --version

ldd --version
ldd (Debian GLIBC 2.28-10+rpi1) 2.28
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
pi@raspberrypi:~/codegen/rustc_codegen_cranelift 

zwhitchcox avatar Jul 08 '20 20:07 zwhitchcox

Ah, you are using an arm system. While the error is unrelated, please note thatthe AArch64 backend of Cranelift is still missing some things necessary for cg_clif (mostly 128bit int support) and arm32 is completely missing.

bjorn3 avatar Jul 08 '20 20:07 bjorn3

Ok, I see, so this is a lost cause, and I should close the issue?

zwhitchcox avatar Jul 08 '20 20:07 zwhitchcox

btw, I just installed libunwind-dev, and I got the same error

zwhitchcox avatar Jul 08 '20 20:07 zwhitchcox

You can keep it open. Once Cranelift implements the necessary features I do want to get cg_clif fully functioning on AArch64.

bjorn3 avatar Jul 08 '20 20:07 bjorn3

AArch64 support is now almost complete. It only needs a couple of changes to Cranelift that have already landed on main support to fix the remaining tests. I'm not sure why __register_frame wasn't found for you. If you still have this issue you can build with --no-unstable-features to disable the JIT.

bjorn3 avatar Sep 01 '22 15:09 bjorn3