akuiper
akuiper

Reputation: 214927

Build pyodide on windows WSL2

Trying to build pyodide on windows WSL2. I have already created a conda environment with the required python version. But I'm still constantly getting the following error:

wasm-ld: error: unknown argument: --sysroot=/
em++: error: '/home/xxx/LearningCenter/pyodide/emsdk/emsdk/upstream/bin/wasm-ld -o build/lib.linux-x86_64-3.9/msgpack/_cmsgpack.cpython-39-x86_64-linux-gnu.so --whole-archive --sysroot=/ -L/home/xxx/miniconda3/envs/pyodide-dev/lib -L/home/xxx/miniconda3/envs/pyodide-dev/lib build/temp.linux-x86_64-3.9/msgpack/_cmsgpack.o -L/home/xxx/LearningCenter/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/pic --no-whole-archive -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --lto-legacy-pass-manager --allow-undefined --import-memory --strip-debug --export-all --no-gc-sections --experimental-pic -shared' failed (1)

Does anyone have an idea what could be the problem ?

Upvotes: 3

Views: 116

Answers (1)

Howland
Howland

Reputation: 11

It isn't a direct solution to your problem and really late but maybe it helps someone else. They provide a Docker container which i had no trouble with. And their documentation is good to follow. Things i had trouble with but are also mentioned in the doc is that you should have about 3GB of RAM for the WSL environment that it builds successfully (with 8GB of RAM it didn't work, at least not in a acceptable time) on 16GB it worked. Pyodide Documentation And to build packages i had to first execute

pip install -e ./pyodide-build
make -C emsdk
make -C cpython

i had to execute this every time when i restarted the docker container, but this could be my error in using docker. With the global make this should be executed in the make script. While building there where two git errors with a solution to fix which worked for me. The error was about some dubious folder, or something if i recall correctly.

Upvotes: 1

Related Questions