First implementation of dynare python library.#712
First implementation of dynare python library.#712DerThorsten merged 38 commits intoemscripten-forge:mainfrom
Conversation
|
Here is the error :
with channels: The reported errors are:
|
|
Now the errors during the compilation are:
and some repetition of the same errors. These seem related to C++ standard library (thread, stop_token are defined in C++20). The preprocessor is usually compiled with -std=gnu++20. |
|
I have now removed all parts from the source which involve |
|
the recipe it self uses a lot of build dependencies, but a lot of them should be host dependencies. so its using a python from the build prefix which is wrong (the python from the build prefix is not for the wasm platform but for linux (or whatever machine we are on)) |
|
smth like |
|
Hmm, that is very clear. Now the situation starts to get more complicated as I need to find a way to have meson build a python extension_module without the python binary, or with a dummy one. |
|
often the cross_python package does just the right thing. It uses the "normal" python but sets everything up st. the build will be for emscripten-wasm32 (most python packages for emscripten-forge use this package) |
|
Sounds perfect. This conda world never ceases to amaze me! Do you have any example of a package that uses it by any chance? |
|
https://github.com/emscripten-forge/recipes/blob/main/recipes/recipes_emscripten/regex/recipe.yaml#L19 adding that is sometimes enough |
|
So, now that the build is passing, you probably want to know if the build is actually working. To do that, just add a file If this test is able to import your package we are done and can merge this =) |
|
is the extension compiled with the |
|
I didn´t add it explicitly. I've tried locally to add |
since its a shared library it must be SIDE_MODULE=1 |
|
Ok, I've added |
|
Ok, now I don't know. The error on CI:
But it didn't work. Strangely the error I get on my laptop is different: |
|
@DerThorsten : do you have any idea of where to go next on this ? |
|
@albop its finally working! |
|
Absolutely amazing ! Thank you so much. Can you tell me in just a few words what did the trick ? |
|
removing all -pthread arguments, adding -fexception and -s WASM_BIGINT everywhere |
|
sounds easy when you say it like that... |
the package is available at https://prefix.dev/channels/emscripten-forge-dev/packages/dynare-preprocessor-pylib You should be able to make lite-deployments with it using https://github.com/jupyterlite/xeus-lite-demo |
Some elements of context:
After some lengthy discussion with @DerThorsten, I managed to:
meson setup(in build.sh)I don't know which steps I should take now and am waiting for some feedback from you (and from CI).