-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
bazel compilation with emscripten failed #1081
Comments
Hey Victor! Let me know if you feel comfortable sending a PR to https://github.com/google/glog/blob/master/bazel/glog.bzl to fix this - also, if you depend on the wasm support maybe you could think about how to add CI for this in either https://github.com/google/glog/blob/master/.bazelci/presubmit.yml or https://github.com/google/glog/tree/master/.github/workflows, as I'm not sure how we can prevent future wasm breakage (it was added by a contributor but I haven't heard anything from them for some time). |
Hi @drigz I'm happy to send a PR. There's really not much to do. But it's a bit hard for me to do the CICD stuff with bazel + WASM. |
NP, don't block the fix on CI suggestion. Feel free to ignore that (and maybe revisit if you observe more breakage in future). |
Currently, compiling glog to wasm would fail as described in Issue google#1081 Root cause is the missing macros when compiling glog to wasm
Hi we are recently trying to compile glog to wasm using bazel. The commit we are compiling is this. The crucial part of the error message is
The root cause seems to be that
wasm_copts
misses-DHAVE_MODE_T
and-DHAVE_UNISTD_H
, both of which are defined inlinux_or_darwin_copts
, so when the platform iswasm
, then compilation failed.The quick fix I did is to move those two macro definitions to
wasm_copts
. Let me know if there's a more correct way of handling this or I missed anything.The text was updated successfully, but these errors were encountered: