emscripten-core / emscripten-core/emsdk

[bazel] [rules_foreign_cc] ModuleNotFoundError: No module named 'tools'

Open
#1,420 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.7k
Forks
821
Avg merge
1h 25m
Merged PRs (30d)
3

Description

When building a simple hello world binary with Meson, I am hitting the following error
```
mesonbuild.utils.universal.EnvironmentException: Unknown compiler(s): [['/home/developer/.cache/bazel/_bazel_developer/25e07d78077dfe1eca932359d50e41ef/sandbox/processwrapper-sandbox/9/execroot/_main/external/emsdk/emscripten_toolchain/emcc.sh']]
```
Digging a bit deeper, it seems `emcc.py --version` is failing and unable to find the tools module.

```
The Meson build system
Version: 1.1.1
Source dir: /home/developer/.cache/bazel/_bazel_developer/25e07d78077dfe1eca932359d50e41ef/sandbox/processwrapper-sandbox/9/execroot/_main/testing/hellomeson
Build dir: /home/developer/.cache/bazel/_bazel_developer/25e07d78077dfe1eca932359d50e41ef/sandbox/processwrapper-sandbox/9/execroot/_main/bazel-out/k8-fastbuild/bin/testing/test_meson.build_tmpdir
Build type: native build
Project name: tutorial
Project version: undefined
running cmd: ['/home/developer/.cache/bazel/_bazel_developer/25e07d78077dfe1eca932359d50e41ef/sandbox/processwrapper-sandbox/9/execroot/_main/external/emsdk/emscripten_toolchain/emcc.sh', '--version']
out:
err: Traceback (most recent call last):
File "/home/developer/.cache/bazel/_bazel_developer/25e07d78077dfe1eca932359d50e41ef/sandbox/processwrapper-sandbox/9/execroot/_main/external/emscripten_bin_linux/emscripten/emcc.py", line 23, in
from tools.toolchain_profiler import ToolchainProfiler
ModuleNotFoundError: No module named 'tools'
```
Perhaps this isn't included in the `compiler_files` filegroup which is passed to the toolchain?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.