Skip to content

Cross compiling for MUSL on Ubuntu 24.10 encountered undefined symbol: __ubsan_handle_type_mismatch_v1 #3779

Answered by CorvusPrudens
songday asked this question in Q&A
Discussion options

You must be logged in to vote

I compiled with zig

Ah, yes this seems to be a common factor. I happened to be using Zig via cargo-lambda to compile for an AWS lambda function. Luckily, I'm not deploying to arm runners, so I can just use the Rust toolchain, which indeed solved my problem.

As for why Zig fails, I have no leads. ubsan is, as far as I understand, an undefined behavior sanitizer tool in the LLVM suite. I'm not sure why one of sqlx's dependencies wants to link to the ubsan runtime in the first place. I read that this was discouraged, probably in part for the trouble it's caused us here. Maybe it's a C/C++ dependency.

I did not pin my Zig version, so I'm guessing the latest version of the Zig toolchain caus…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@songday
Comment options

Answer selected by songday
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants