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

Example fails to build, missing emcc.py #169

Open
sfc-gh-aminyaylov opened this issue Sep 14, 2024 · 0 comments
Open

Example fails to build, missing emcc.py #169

sfc-gh-aminyaylov opened this issue Sep 14, 2024 · 0 comments

Comments

@sfc-gh-aminyaylov
Copy link

The wasm build rule expects emscripten binaries to be available in the sandbox directory external/emsdk/emscripten/emcc.py.

The build runs @proxy_wasm_cpp_sdk proxy_wasm_cpp_sdk_dependencies_extra(), which in turn runs @emsdk emscripten_deps(), which registers the emscripten archive, which should make emcc.py available in the expected sandbox directory.

However, since bazel uses lazy evaluation, and there is no rule directly using the emscripten_bin_linux archive, this filegroup is never instantiated. I'm not clear how this ever worked.

Simple repro from head:

$ git clone git@github.com:proxy-wasm/proxy-wasm-cpp-sdk.git
$ cd proxy-wasm-cpp-sdk
$ bazel build example:http_wasm_example.wasm
INFO: Analyzed target //example:http_wasm_example.wasm (25 packages loaded, 222 targets configured).
INFO: Found 1 target...
ERROR: /home/user/proxy-wasm-cpp-sdk/BUILD:32:11: Compiling proxy_wasm_intrinsics.cc failed: (Exit 2): emcc.sh failed: error executing command external/emsdk/emscripten_toolchain/emcc.sh '--sysroot=external/emsdk/emscripten/cache/sysroot' -fdiagnostics-color -fno-exceptions -fno-strict-aliasing -funsigned-char -no-canonical-prefixes ... (remaining 29 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
python3: can't open file '/home/user/.cache/bazel/_bazel_user/63d72b24569786f1ee6718e6de54cbab/sandbox/linux-sandbox/2/execroot/proxy_wasm_cpp_sdk/external/emsdk/emscripten/emcc.py': [Errno 2] No such file or directory
Target //example:http_wasm_example.wasm failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.933s, Critical Path: 0.05s
INFO: 11 processes: 11 internal.
FAILED: Build did NOT complete successfully
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

1 participant