LLVM Error: fixup value too large for data type

Hey folks, I'm trying to figure out what would cause compiling a release version of a binary to provide the error, "LLVM Error: fixup value too large for data type!" that I've been running into.

This only happens with release, which is configured with these settings:

[profile.release]
opt-level = 'z'
lto = true
codegen-units = 1

These settings worked fine until I recently refactored my binary to use a new library I wrote that generates a lot of code using a mixture of derive and attribute macros, so I'm assuming it has something to do with that, but this error message doesn't tell me anything that I can do to try to fix it myself.

For reference, the project being compiled is vimwiki-server of vimwiki-rs RefactorToEntity branch. It's a lot of code, so trying to undo changes one at a time is going to be difficult.

Has anyone seen this error before? What kinds of Rust code can lead to this?

That looks like a bug in rustc, as it shouldn't allow LLVM errors to happen. File a bug.

1 Like

I couldn’t reproduce this. Can you give more details? I tried make release from the main directory and cargo build --release from the vimwiki-server directory, compiling with Rust 1.51 on my Ubuntu Laptop, RefactorToEntity branch (23fb3426e7795d72448145b354ebc2e5fcd91606).

1 Like

@steffahn, oh, good catch! I'd forgotten that I was running this on an M1 Mac using stable 1.51.0. Hadn't considered this might be isolated to that platform. Now that I think about it, I also remember hitting a Rosetta problem when trying to build and run non-natively.

@kornel, suppose this would still be an appropriate bug to file?

yup

Bug filed: LLVM ERROR: fixup value too large for data type · Issue #84006 · rust-lang/rust · GitHub

Seems like there has been an update to a newer version of LLVM that is believed to fix this, but am unable to verify via nightly as a transient dependency is failing to compile on nightly.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.