-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Makefile / configure.ac: realpath is not available on macOS #95952
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
Comments
macOS does not have a realpath command (at least not on macOS 12). There is a manual page, but that doesn't mention a relative-to option (it basically describes a command-line wrapper around realpath(3)). UPDATE: The beta for the next major release of macOS does include a realpath(1) command, but that doesn't have the |
@brettcannon, is this still relevant? |
I have no idea (I certainly don't need it as I generate a shell script to avoid such issues), so I'm going to close it as unnecessary. |
configure.ac still contains code using realpath options not supported on macOS:
|
I believe @ronaldoussoren is referring to: Lines 1417 to 1420 in 939fc6d
I personally think that should be changed to error out if the host runner is not specified for WASI. With |
That's correct.
I don't have an opinion on that, WASI/WebAsm support is interesting from the distance but I've never looked at it beyond reading articles ("how cool, CPython in a browser"). |
There are three workarounds for this on MacOS:
For (3) something like this should work (I may have gotten the two arguments backwards):
Just dropping automatically settings HOSTRUNNER for WASI is probably easier ;-) |
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 make
srcdir
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.The text was updated successfully, but these errors were encountered: