Skip to content
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

duplicate export name 57 already defined when importing multiple semver versions #1850

Closed
jsturtevant opened this issue Oct 7, 2024 · 4 comments · Fixed by #1851
Closed

Comments

@jsturtevant
Copy link

Using the latest wasi-sdk pacakge built with the fix from #1774 (https://github.com/WebAssembly/wasi-sdk/actions/runs/11129514597) I still get an error when building a wasm component with wasi:io/poll@0.2.0 and wasi:io/poll@0.2.1 I get the following error:

-- Build files have been written to: /home/jstur/projects/runtime/artifacts/bin/native/net10.0-wasi-Debug-wasm
  [ 14%] Linking C executable dotnet.wasm
EXEC : error : failed to encode component [/home/jstur/projects/runtime/src/mono/wasi/wasi.proj]

  Caused by:
      0: failed to validate component output
      1: duplicate export name `57` already defined (at offset 0xdf82f5)
cat /home/jstur/wasi-sdk-nightly/VERSION
24.9gcec5cf4f6cf3
wasi-libc: 1b19fc65ad84
llvm: a4bf6cd7cfb1
llvm-version: 19.1.0
config: f992bcc08219
alexcrichton added a commit to alexcrichton/wasm-tools that referenced this issue Oct 8, 2024
This fixes an issue with the semver-merging logic of `wit-component`
where during the componentization process due to
insertion-with-replacement behavior the same name could be assigned to
two different shims (as shim names are based on the map length which
wouldn't change if a replacement was inserted). The fix in this commit
is to avoid replacement and prefer the original name when a shim is inserted.

Closes bytecodealliance#1850
alexcrichton added a commit to alexcrichton/wasm-tools that referenced this issue Oct 8, 2024
This fixes an issue with the semver-merging logic of `wit-component`
where during the componentization process due to
insertion-with-replacement behavior the same name could be assigned to
two different shims (as shim names are based on the map length which
wouldn't change if a replacement was inserted). The fix in this commit
is to avoid replacement and prefer the original name when a shim is inserted.

Closes bytecodealliance#1850
@alexcrichton
Copy link
Member

I think this should be fixed in #1851. Is it desired that .NET updates to the latest wasi-sdk in the near future? There's a number of places to update after that lands and I'm wondering if that should happen "sooner rather than later" or if a normal "on demand" cadence is ok.

@pavelsavara
Copy link

These days we are also upgrading mono to LLVM 19 dotnet/runtime#105427
It would be good to have wasi-sdk target aligned. Is the planned version wasi-sdk 25 going to be LLVM 19 ?

github-merge-queue bot pushed a commit that referenced this issue Oct 8, 2024
This fixes an issue with the semver-merging logic of `wit-component`
where during the componentization process due to
insertion-with-replacement behavior the same name could be assigned to
two different shims (as shim names are based on the map length which
wouldn't change if a replacement was inserted). The fix in this commit
is to avoid replacement and prefer the original name when a shim is inserted.

Closes #1850
@alexcrichton
Copy link
Member

Yeah wasi-sdk 25 will have LLVM 19, it's already merged there just hasn't been a release yet.

@jsturtevant
Copy link
Author

I am happy to try out the prerelease bits once this makes its way to the wasi-sdk repo

alexcrichton added a commit to alexcrichton/wasi-sdk that referenced this issue Oct 8, 2024
alexcrichton added a commit to WebAssembly/wasi-sdk that referenced this issue Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants