Skip to content

Error duplicate symbol when compiling for wasm32 target #438

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

Open
josediegorobles opened this issue Apr 30, 2022 · 4 comments
Open

Error duplicate symbol when compiling for wasm32 target #438

josediegorobles opened this issue Apr 30, 2022 · 4 comments

Comments

@josediegorobles
Copy link

josediegorobles commented Apr 30, 2022

Hi,

I'm using last version of rust-bitcoin and I have several duplicate symbol errors when I try to compile for wasm32 target:

LIke that:

note: rust-lld: error: duplicate symbol: WASM32_INT_SIZE
[104](https://github.com/diba-io/bitmask-core/runs/6238804096?check_suite_focus=true#step:8:104)
          >>> defined in /home/runner/work/bitmask-core/bitmask-core/target/wasm32-unknown-unknown/debug/deps/libsecp256k1_sys-dc224e0595a95c29.rlib(precomputed_ecmult_gen.o)
[105](https://github.com/diba-io/bitmask-core/runs/6238804096?check_suite_focus=true#step:8:105)
          >>> defined in /home/runner/work/bitmask-core/bitmask-core/target/wasm32-unknown-unknown/debug/deps/libsecp256k1_sys-dc224e0595a95c29.rlib(precomputed_ecmult.o)
[106](https://github.com/diba-io/bitmask-core/runs/6238804096?check_suite_focus=true#step:8:106)
          
[107](https://github.com/diba-io/bitmask-core/runs/6238804096?check_suite_focus=true#step:8:107)
          rust-lld: error: duplicate symbol: WASM32_INT_ALIGN
[108](https://github.com/diba-io/bitmask-core/runs/6238804096?check_suite_focus=true#step:8:108)
          >>> defined in /home/runner/work/bitmask-core/bitmask-core/target/wasm32-unknown-unknown/debug/deps/libsecp256k1_sys-dc224e0595a95c29.rlib(precomputed_ecmult_gen.o)
[109](https://github.com/diba-io/bitmask-core/runs/6238804096?check_suite_focus=true#step:8:109)
          >>> defined in /home/runner/work/bitmask-core/bitmask-core/target/wasm32-unknown-unknown/debug/deps/libsecp256k1_sys-dc224e0595a95c29.rlib(precomputed_ecmult.o)

You can see in build phase here:

https://github.com/diba-io/bitmask-core/runs/6238804096?check_suite_focus=true

@apoelstra
Copy link
Member

This was fixed by #421 but this hasn't made it out to a release yet (and it's been a month! how did that happen :().

I think we can release 5.1.0 of secp256k1-sys with this fix. Just need to check a couple other recently-merged PRs to see if they break any APIs. I'll try to do this today or tomorrow.

@tcharding
Copy link
Member

tcharding commented May 1, 2022

I'm not a maintainer on this repo so can't edit your post, but for future readers you meant to write release v0.5.1, and that's been done here.

@wilfredjonathanjames
Copy link

@josediegorobles did this fix your issue? I ran into this using crates.io latest (0.24.0). Same issue when pulling git direct.

May be related, as I'm not running wasm32-wasi:
#485

@josediegorobles
Copy link
Author

This fixed the issue at he moment. Later appeared another problem with wasm32 that is solved now, but I'm not using directly the library so I can't tell if it's working 0.24.0 like this. When I run it, I will tell here if there are problems or no.

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

No branches or pull requests

4 participants