emscripten-forge / recipes

Recipes to build the packages for the emscripten-forge distribution
BSD 3-Clause "New" or "Revised" License
55 stars 47 forks source link

add qhull and update matplotlib #1205

Closed wolfv closed 2 months ago

wolfv commented 2 months ago

Adding qhull seemed pretty easy. Matplotlib - unfortunately - does not seem to work yet in Jupyterlite.

The error I am getting is:

LinkError: WebAssembly.instantiate(): Import #190 "env" "time": imported function does not match the expected type
DerThorsten commented 2 months ago

often a missing -sWASM_BIGINT give erros like "imported function does not match the expected type" @wolfv

ianthomas23 commented 2 months ago

From version 3.9.0 Matplotlib switched to using meson, and I think more changes are required here for this. For example, there is no setupext.py any more, and it probably needs a meson cross-compilation file (as other meson-using packages do here). I have a WIP branch https://github.com/emscripten-forge/recipes/tree/matplotlib_3.9.0 that builds but fails the tests (probably because the build is wrong), and you are welcome to take any of that to use here.

wolfv commented 2 months ago

Thanks @DerThorsten - with WASM_BIGINT it seems to work like a charm (for the two things I tested at least). Screenshot attached.

Screenshot 2024-07-15 at 18 49 36
wolfv commented 2 months ago

3D triangulation stuff also seems to work?!

Screenshot 2024-07-15 at 18 53 23
DerThorsten commented 2 months ago

3D triangulation stuff also seems to work?!

Screenshot 2024-07-15 at 18 53 23

nice! Is this ready for review/merging?

wolfv commented 2 months ago

I think so! :)

wolfv commented 2 months ago

Although I think it can be simplified some more ...

wolfv commented 2 months ago

Ok, so I spent a little time on simplifications but it didn't completely pan out.

I tried to remove numpy and pybind11 from the build dependencies.

Instead we configure the location in the meson cross file.

But note: the cross-python package does some magic upon activation (it moves all headers and shared objects in the $BUILD_PREFIX). So the "final" location of the numpy include dir is still in the $BUILD_PREFIX).