-
Notifications
You must be signed in to change notification settings - Fork 726
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 linking metadata version: 3" when running against Rust-generated WASM #842
Comments
In case it matters, we don't normally use the |
I just tried this out with HEAD (dd7663d) and I see the same error message, but it does produce output:
Perhaps we should replace the message with a warning instead. |
Heh, I never even looked because of the error message. 😊 Since this is targeted for the Rust Playground, I'd rather users not see that text, but I could always munge it out somehow. |
@sbc100 and I were discussing this. We're curious how you're using the tool. I assume the Rust Playground allows you to write rust and you're going to show the wat output, is that right? (n/m @jgravelle-google just showed me the actual output running :-)) If you run wasm2wat on the output of the linker (wasm lld) you won't have this issue, since there will be no linking section. But it's reasonable to show the output of the wasm object files too, I suppose. In any case, this issue (the extra error mesage) should be resolved as soon as LLVM is updated to the new format. |
For reference, here's the full invocation we do on the backend. |
I think that everything is square for me now. I would agree that it should say "warning" instead of "error" to help prevent poor sods like me from being confused. |
do you happen to know what the |
@sbc100 oh the wasm artifact that Cargo emits is the output of LLD, all intermediate artifacts are stuffed away in rlibs (rust versions of |
OIC.. I think lld used to always write the linking section and now it doesn't. https://reviews.llvm.org/D42869. So, I guess the problem will doubly go away when you update because the final output should not have a linking section at all. |
I get this same error message. I was once able to get it to go away after running
|
@autodidaddict I suppose the |
When running
wasm2wat
on Rust-generated WASM, I get an error:playground.wasm.zip
The
--ignore-custom-section-errors
flag doesn't seem to take effect; perhaps I'm doing something wrong?I'm using:
rustc 1.27.0-nightly (f0fdaba04 2018-05-15)
(moved from comments on #841)
The text was updated successfully, but these errors were encountered: