-
Notifications
You must be signed in to change notification settings - Fork 275
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
Add Wasm build for MacOS #254
Conversation
Can you open up the offending file and see what it's trying to read from My guess is that somehow something from libc has slipped into the library. Or perhaps clang is inserting something from libc. |
I used wasm2wat (https://webassembly.github.io/wabt/demo/wasm2wat/) and found these lines: I'm not sure what to make from this.
|
This doesn't sound like an issue in the library, more like a general node issue than a secp-specific one. I do wonder if @arik-so has seen anything similar, I believe he has. |
Yes, I have. Experimenting with various optimization settings in Cargo.toml might be able to fix it, see rustwasm/wasm-pack#743 (comment) |
I played around with various combinations but no luck so far. Did you have any success? |
MacOS build fixed: https://github.com/bonomat/rust-secp256k1/pull/2/commits/74effb7fae29726a11a43b39ae9b248b126c5498 The default clang installation provided in MacOS seems to be causing the issue. Fixed by installing clang using brew and using the new installation via env variables.
before running
|
Thanks @rishflab 👏👏. I've updated this branch with your proposed changes. |
See rust-bitcoin/rust-secp256k1#254 for more details
The default clang installation provided in MacOS does not work. We fixed this locally by installing clang via llvm through brew and setting the CC and AR env variables to point at the new clang installation.The CI MacOS image seems to already have llvm installed so we did not need to install llvm on the CI. See rust-bitcoin/rust-secp256k1#254 for more details
The default clang installation provided in MacOS does not work. We fixed this locally by installing clang via llvm through brew and setting the CC and AR env variables to point at the new clang installation.The CI MacOS image seems to already have llvm installed so we did not need to install llvm on the CI. See rust-bitcoin/rust-secp256k1#254 for more details
The default clang installation provided in MacOS does not work. We fixed this locally by installing clang via llvm through brew and setting the CC and AR env variables to point at the new clang installation.The CI MacOS image seems to already have llvm installed so we did not need to install llvm on the CI. See rust-bitcoin/rust-secp256k1#254 for more details
The library does not compile to wasm using the default clang setup on MacOS. We are able to work around this by setting the environment variables CC and AR to use clang and llvm-ar provided by llvm.
This PR adds MacOS build to CI to ensure that the library also build on MacOS.
The library does not compile to wasm using the default clang setup on MacOS.
We are able to work around this by setting the environment variables CC and AR to use clang and llvm-ar provided by llvm.
//edit// outdated description below
Hi,
we depend on this library in one of our projects and fail to compile it to wasm on MacOS.
Do you have an idea what's going wrong?
I was able to reproduce it on CI (see below or here for more information here: https://github.com/bonomat/rust-secp256k1/pull/1/checks?check_run_id=1534192675):