Repository navigation
Closed
Description
I followed the setup instructions here.
The build command I'm using is: bazel build --verbose_failures //code/programs/examples/emscripten:hello-world-wasm
The same code and BUILD definition in the instructions.
The error I get is:
INFO: Analyzed target //code/programs/examples/emscripten:hello-world-wasm (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/luxe/Desktop/unilang/source/code/programs/examples/emscripten/BUILD:9:15: Action code/programs/examples/emscripten/hello-world-wasm/hello-world.js failed: (Exit 1): wasm_binary failed: error executing command
(cd /home/luxe/.cache/bazel/_bazel_luxe/9b1d289b10540c9752c68b55618a2156/sandbox/linux-sandbox/838/execroot/__main__ && \
exec env - \
bazel-out/k8-opt-exec-2B5CBBC6/bin/external/emsdk/emscripten_toolchain/wasm_binary --output_path bazel-out/k8-fastbuild/bin/code/programs/examples/emscripten/hello-world-wasm --archive bazel-out/wasm-fastbuild-ST-95dcf5f511a2/bin/code/programs/examples/emscripten/hello-world)
Execution platform: @local_config_platform//:host
Use --sandbox_debug to see verbose messages from the sandbox
Traceback (most recent call last):
File "/home/luxe/.cache/bazel/_bazel_luxe/9b1d289b10540c9752c68b55618a2156/sandbox/linux-sandbox/838/execroot/__main__/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/emsdk/emscripten_toolchain/wasm_binary.runfiles/emsdk/emscripten_toolchain/wasm_binary.py", line 68, in <module>
main()
File "/home/luxe/.cache/bazel/_bazel_luxe/9b1d289b10540c9752c68b55618a2156/sandbox/linux-sandbox/838/execroot/__main__/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/emsdk/emscripten_toolchain/wasm_binary.runfiles/emsdk/emscripten_toolchain/wasm_binary.py", line 49, in main
tar = tarfile.open(args.archive)
File "/usr/lib/python3.9/tarfile.py", line 1616, in open
raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully
Target //code/programs/examples/emscripten:hello-world-wasm failed to build
INFO: Elapsed time: 0.170s, Critical Path: 0.05s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
Any suggestions?
Reacted by Darien Pardinas
Metadata
Metadata
Assignees
Labels
No labels
Activity
walkingeyerobot commentedon Feb 11, 2022
I suspect those instructions are slightly out of date, and will continue to be out of date with every emscripten release.
Can you try cloning the emsdk repo, and from the bazel directory, running
bazel build hello-world:hello-world-wasm? If that works for you, I'll figure out the best way to update the docs.dpar39 commentedon Sep 28, 2022
Did you figure this out? I'm having the same issue with
emsdk 3.1.20.luxe commentedon Nov 1, 2022
@walkingeyerobot, @dpar39
Thank you. I had the following in my
.bazelrcwhich caused this problem:By removing both,
bazel build hello-world:hello-world-wasmbuilds as expected.