Closed wzheng21 closed 7 months ago
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.
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).
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.