Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
Bug report
Makefile.pre.in andconfigure.ac are using therealpath command for some targets. For example WASIHOSTRUNNER usesrealpath --relative-to to get the working directory relative to the srcdir root directory. macOS seems to lack realpath, breaking WASI tests, see#95828 (comment)
For WASI HOSTRUNNER we need to replace realpath somehow. Or find a different approach to fix testing with OOT builds. The HOSTRUNNER for WASI is complicated because we have to makesrcdir available to WASI runtime environment.--mapdir /::$(srcdir) maps the srcdir to root/ inside the runtime environment. wasmtime sets cwd to/, so our logic to findpybuilddir.txt does not work. That's why the HOSTRUNNER sets--env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib, which resolves to--env PYTHONPATH=/builddir/wasi/build/lib.wasi-wasm32-3.12:/Lib on my system. The prefix depends on the OOT builddir. The suffix is read from pybuilddir.txt, which is generated at the end of the build process.