-
Notifications
You must be signed in to change notification settings - Fork 2.7k
cargo build --profile production
fails with linker error when ran on the substrate repo
#13376
Comments
cargo build --profile production
ends with linker error when ran on the substrate repocargo build --profile production
fails with linker error when ran on the substrate repo
I'll take a look at this. |
The problem reproduces for me. From a cursory look it looks like it might be a bug in What's happening is that I'll report this to |
|
Thanks a lot. Just out of curiosity: Shouldn't you always use |
I'm not sure I completely understand the question, but in general it's the other way around: you essentially always want to mangle your symbols unless you're exposing and/or interacting with a stable API/ABI boundary. In this case not mangling the symbols makes sense because those are just internal symbols (there are no two binaries here!) so they don't actually need to be externally exposed nor stable. They can be anything as long as they're unique. Without more digging I don't know exactly why this problem triggers, but it's most likely not due to mangling/not mangling itself. In Rust |
I thought that symbols were called from asm. For me this sounded like you want a stable ABI as this is handwritten code. |
Yes, but that's a |
Closing, since this is now technically fixed. (Although we're not using an official |
The
production
profile is used for benchmarking. I get the following error when linkingnode-template
:There are more crates who throw this and similar errors. They are all related to
wasmtime
. Apparently it only happens when lto is enabled (which is only the case with the production profile). The error was introduced with #13160. The commit before this PR works fine but the commit that includes this PR does not.Please note that this does not only happen for me locally but also when trying to bench with the benchmarking machine.
I suggest rolling back this PR until we resolved this issue.
cc @koute @alvicsam @ggwpez
The text was updated successfully, but these errors were encountered: