Closed jeroen closed 9 months ago
Thanks, I think this comes from Emscripten's emconfigure
launching the process using subprocess.run
without shell = True
or similar.
We might be able to work around it by tweaking rwasm
to specify the shell when wrapping configure
scripts, with
emconfigure sh ./configure.orig --host=wasm32-unknown-emscripten
Yes, that works. I think using bash if possible is probably more robust (or we could check $SHELL).
I'd prefer sh
, but it's probably fine. It just means we'd be relying on bash
being installed and on the PATH
, which is likely true in almost all cases on Unix anyway and assumed by R already.
My thought process was that if a particular script wants to use e.g. csh
- or bash
-specific features it could have its own shebang which will take over, otherwise scripts without a shebang would be restricted to strictly POSIX compliant sh
, but if R already assumes configure
is a bash
-compatible scripts we should support that here.
Yes you are probably right. Cran does not allow for a non standard shebang such as bash, but i have certainly encountered packages that would only work well with bash. But maybe a better solution for this is to make bash the default shell in my docker image.
Feel free to change it 🙂
Op di 12 dec. 2023 16:12 schreef George Stagg @.***>:
I'd prefer sh, but it's probably fine. It just means we'd be relying on bash being installed and on the PATH, which is likely true in almost all cases on Unix anyway and assumed by R already.
My thought process was that if a particular script wants to use e.g. csh- or bash-specific features it could have its own shebang which will take over, otherwise scripts without a shebang would be restricted to strictly POSIX compliant sh.
— Reply to this email directly, view it on GitHub https://github.com/r-wasm/rwasm/issues/7#issuecomment-1852234337, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABUZ73DL26TF5CQUU7Q653YJBX7DAVCNFSM6AAAAABARR2TFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJSGIZTIMZTG4 . You are receiving this because you authored the thread.Message ID: @.***>
Okay, I'll switch to sh
. We can always put bash
back if it causes any serious problems.
Sounds good, thanks for the quick fix.
Packages can have a configure script without any shebang, in this case it should just execute it with the default shell (the safest option is probably bash). Currently it seems to error, for example the
openssl
package: