Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
Image: ubuntu2004
second try (july 1, 2021)
Using pari-2.14.0.alpha again
This builds but starting fails as before with getpwuid
missing. So... this is because of code in es.c
that looks a bit funny. In any case, let's directly edit Oemscripten-wasm/paricfg.h
and delete the #define UNIX
line, which is set by paricfg.h.SH
.
The option MODULARIZE=1
solves the noInitialRun
problem, but as follows:
first try
Got pari from
https://pari.math.u-bordeaux.fr/pub/pari/snapshots/
Built as explained here
https://pari.math.u-bordeaux.fr/archives/pari-dev-1610/msg00015.html
but with changes figured out by googling randomly e.g., this
Also we're missing ccall and cwrap: https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html?highlight=ccall#interacting-with-code-ccall-cwrap
Now hitting this https://github.com/emscripten-core/emscripten/issues/13219
I just manually edited gp-sta.js and changed the getpwuid
function to return 0 instead of error. Then doing this in a console:
gives an error, which I ignore. Then
prints out "not enough memory"... but the answer DOES APPEAR!
I manually edited some code so that noInitialRun
is true in the js file, then directly imported it in node. Then I did this:
I bet the memory fix is to add -s INITIAL_MEMORY=2146435072