Skip to content
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

Problem with JS scrips on PATH #6

Closed
jeroen opened this issue Nov 19, 2023 · 3 comments
Closed

Problem with JS scrips on PATH #6

jeroen opened this issue Nov 19, 2023 · 3 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@jeroen
Copy link
Contributor

jeroen commented Nov 19, 2023

Some R packages fail to build because we put /opt/webr/wasm/bin on the PATH at build time. However this dir contains javascript tools, that the host can not execute. Is it really required to have this on the PATH?

sprintf("PATH='%s/wasm/bin:%s'", webr_root, Sys.getenv("PATH")),

For example packages cannot extract a tar.xz file because /usr/bin/xz is masked by /opt/webr/wasm/bin/xz.

@georgestagg
Copy link
Member

The wasm/bin directory is added to the path because some of the files in there are useful shell scripts, e.g. gdal-config. However, I can see that most of the files in there should not be on the PATH.

I think a good solution would be to update webR's Makefiles for building Wasm system libraries so that they copy any useful host-compatible scripts into webr/host/bin, then remove webr/wasm/bin from the path here and add host/bin instead. That should avoid JS tools like xz getting in the way.

I'll open a related Issue in r-wasm/webr, then return here once that's been implemented.

@shikokuchuo
Copy link

The masking appears to be solved, but now there is a tar: This does not look like a tar archive error - my sources are in .tar.xz files.

e.g. at: https://github.com/r-universe/shikokuchuo/actions/runs/7596020168/job/20689283194

I'm bringing this up as I've just been made aware that, apparently, it is possible to compile the NNG library using emscripten. I'd like to investigate what is currently possible if I can get past this install step. Thanks.

@shikokuchuo
Copy link

@georgestagg I can confirm that the issue with 'xz' at least is resolved. After a bit of tweaking to the CMake files, NNG and MbedTLS are compiling! https://github.com/r-universe/shikokuchuo/actions/runs/8639056802/job/23684720195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants