Open TengMCing opened 1 month ago
Sorry for the latest response.
I think this package is broken (probably something with the fortran compilation, which is tricky). The splancs
package is also unavailable on https://repo.r-wasm.org/ so that might have the same reason.
However I am not sure why our build succeeds. Perhaps @georgestagg does some additional testing before publishing the package on https://repo.r-wasm.org/.
Hi @TengMCing,
The splancs
package does not currently work with WebAssembly. Jeroen is right, it's a problem in the Fortran compilation:
Our Fortran compiler, LLVM flang, does not currently support emitting symbols defined in Fortran COMMON
blocks. In splancs, the file cncvwt.f imports bounds.h, which indeed contains a common block. Common blocks are an older feature of Fortran, equivalent in nature to global variables.
In the past, I have had some luck converting Fortran common blocks into Fortran 95-style modules. The maintainer may or may not want to look into that. Otherwise, we will need to wait until our WebAssembly Fortran compiler is developed enough to emit global symbols from such blocks.
P.S. I compile packages using a slightly different architechture to r-universe for repo.r-wasm.org, so sometimes we get slightly different results - particularly when a package is broken.
The package
splancs
is listed as available on https://rsbivand.r-universe.dev/splancs for bothr-4.4-emscripten
andr-4.3-emscripten
. However, when I try to install and load the library on https://webr.r-wasm.org/latest/ (R 4.4) and https://webr.r-wasm.org/v0.3.0/ (R 4.3.3) an error will occur.Did I install it incorrectly? Or is the build broken?