pyodide: Linux makefile compile error

I’m unable to get pyodide to compile on linux. I get the following error:

cat src/core/pyproxy.c | emcc -E -C -P -imacros src/core/pyproxy.c -O2 -g -fPIC  -Wall -Wno-warn-absolute-paths -Werror=unused-variable -Werror=sometimes-uninitialized -Werror=int-conversion -Werror=incompatible-pointer-types -I/home/jpedrick/Development/jslicer/pyodide/cpython/installs/python-3.9.5/include/python3.9 - >> src/js/pyproxy.gen.js
<stdin>:3:10: fatal error: 'error_handling.h' file not found
#include "error_handling.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.
emcc: error: '/home/jpedrick/Development/jslicer/pyodide/emsdk/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=16 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -flegacy-pass-manager -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/home/jpedrick/Development/jslicer/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -E -C -P -imacros src/core/pyproxy.c -O2 -g -fPIC -Wall -Werror=unused-variable -Werror=sometimes-uninitialized -Werror=int-conversion -Werror=incompatible-pointer-types -I/home/jpedrick/Development/jslicer/pyodide/cpython/installs/python-3.9.5/include/python3.9 -' failed (1)
make: *** [Makefile:106: src/js/pyproxy.gen.js] Error 1

I’ve tried editing the makefile to run this:

emcc -E -C -P -imacros src/core/pyproxy.c -O2 -g -fPIC  -Wall -Wno-warn-absolute-paths -Werror=unused-variable -Werror=sometimes-uninitialized -Werror=int-conversion -Werror=incompatible-pointer-types \
-I/home/jpedrick/Development/jslicer/pyodide/cpython/installs/python-3.9.5/include/python3.9 src/core/pyproxy.c >> src/js/pyproxy.gen.js

Which succeeds, but then I get TS errors from pyproxy.gen.js:

./tools/dependency-check.sh
npx typescript src/js/pyodide.js \
	--lib ES2018 --allowJs \
	--declaration --emitDeclarationOnly \
	--outDir build
npx: installed 1 in 1.507s
src/js/pyproxy.gen.js(141,1): error TS1128: Declaration or statement expected.
src/js/pyproxy.gen.js(141,23): error TS1005: ';' expected.
src/js/pyproxy.gen.js(141,39): error TS1003: Identifier expected.
src/js/pyproxy.gen.js(141,53): error TS1109: Expression expected.
src/js/pyproxy.gen.js(141,54): error TS1109: Expression expected.
src/js/pyproxy.gen.js(141,55): error TS1005: ')' expected.
src/js/pyproxy.gen.js(141,56): error TS1005: ':' expected.
src/js/pyproxy.gen.js(141,57): error TS1136: Property assignment expected.
src/js/pyproxy.gen.js(141,59): error TS1003: Identifier expected.
src/js/pyproxy.gen.js(141,79): error TS1003: Identifier expected.
src/js/pyproxy.gen.js(141,95): error TS1109: Expression expected.
src/js/pyproxy.gen.js(141,96): error TS1109: Expression expected.
src/js/pyproxy.gen.js(141,97): error TS1005: ')' expected.
src/js/pyproxy.gen.js(141,98): error TS1005: ':' expected.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (16 by maintainers)

Most upvoted comments

Until we get #1690 achieved, it would be great to provide documentation that the Linux build is somewhat broken and Docker build is recommended instead.

I know that Pyodide maintainers are working hard. I respect you all. There can be outdated documentation or mistakenly closed tickets. If so, instead of blaming somebody, anyone can just report it and fix it, that’s what open source is.