Closed georgestagg closed 9 months ago
@jeroen How does this look?
I think this looks good. You could consider setting EM_PKG_CONFIG_PATH
in this shim instead of webr_env
but I don't think it matters too much.
After you merge it I'll run a bunch test builds and let you know if I find any regressions.
Hmm I think this use of tail
is not portable. I see a lot of these:
configure: sh -c "./configure.orig --host=wasm32-unknown-emscripten"
tail: invalid option -- 'r'
Try 'tail --help' for more information.
tail: invalid option -- 'r'
Try 'tail --help' for more information.
xargs: echo: terminated by signal 13
tail: invalid option -- 'r'
Try 'tail --help' for more information.
tail: invalid option -- 'r'
Try 'tail --help' for more information.
xargs: echo: terminated by signal 13
Eg: https://github.com/r-universe-org/build-wasm/actions/runs/7198206097/job/19607201772
Ah, drat! Looks like -r
is BSD and not POSIX, yet. Thanks, I'll replace it with something else.
EDIT: tail -r
has been replaced with a shell function in https://github.com/r-wasm/rwasm/commit/b8415c1c61c053462ec0ade07019ac58c3953672. Technically, tac
is already available in the Linux container, but I want to be sure.
When cross-compiling packages for Wasm, ensure that the
uname
command outputs"Emscripten"
and thepkg-config
command outputs a unique list of libraries suitable for static linking.This should improve compatibility with several R packages'
configure
scripts.The output for
uname
has been selected based on Emscripten's own implementation of theuname
syscall. Some details below.