-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Invalid LLVMRustVisibility value!
error on cargo build
after upgrading from 1.53.0 to 1.54.0
#87933
Comments
Looks like a dup of #87813 |
Ah, it does appear to be. We had several The sections looked as follows, if that helps. They were repeated a few times in different scopes: extern "C" {
static mut __bootloader_magic_value__: u32;
static mut __firmware_start__: u32;
} Thank you for the heads up. |
You may search whether you have declarations that have the same name, but a different type. I was only able to reproduce the error with that constraint, see #87813 (comment) |
All declarations have the same type, everywhere ( |
Can you use the https://github.com/kennytm/rustup-toolchain-install-master project to get a "-alt" nightly (which has LLVM assertions enabled) and try to compile your code with it. Does it give you the same result as #87813 (comment) ? |
I've tried, but it seems as though the target we build for isn't (easily?) available that way.
|
Try this (replace the hash if needed):
|
Thank you, now running It does seem to be the same issue as in #87813 (comment), apart from the fact that our types are all the same.
|
Ok, I think then we should leave this issue open until a fix is available. I would suggest that you branch the current work to have it later available for testing. |
Yes, that sounds good to me! Will do, and thank you for the help |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-high |
@hellow554 or anyone else in this thread know how to get the
|
@deg4uss3r my best guess is: because aarch64-apple-darwin is not a tier1 platform, there's no alt target built per default. You may have to build it yourself. @apiraino have you a better idea? |
I don't mind building myself was just hoping I didn't have to! edit: I built it myself no problems there, was curious if there was a way to get a line or function name easily that is causing the clash? I'm seeing this only on my |
Huh interesting looks like my project is now only hitting this on |
The code that caused the issue in the project @deg4uss3r mentioned was an #[used]
#[link_section = "__TEXT,__asar_integrity"]
#[no_mangle]
static _EMBED_ASAR_INTEGRITY: [u8; 4] = *b"1234";
extern "C" {
#[link_name = "_EMBED_ASAR_INTEGRITY"]
static START: [u8; 0];
} Removing the unnecessary |
After upgrading our toolchains from
1.53.0
to1.54.0
, our bootloader rust crates stopped building.Instead, the build command produced the error message
LLVM ERROR: Invalid LLVMRustVisibility value!
.Code
As these are a closed-source projects I cannot share any code publicly, but it can be shared privately if necessary.
I expected to see this happen: the build to succeed
Instead, this happened: the build failed
Version it worked on
It most recently worked on: Rust 1.53
Version with regression
rustc --version --verbose
:Backtrace
The compiler did not crash or produce a backtrace.
The text was updated successfully, but these errors were encountered: