Closed yzg-github closed 4 years ago
1.38.31 is a very old version of emscripten. Can you run ./emsdk update
or fetch new change from git and try again?
hi@sbc100 First of all thank you for your advice. now i use 1.39.18 to complie canvaskit in skia ,a new error occure: emscripten requires at least python 3.5 (or python 2.7.12 or above). but the Interesting is my versoin of python is Python 3.6.5.(python -V) could you tell me the cause of the error?
Can you include the full command line and output?
Can you you run python3 --version
and python --version
?
hi@sbc100 @hikerpig this is my log to complie skia with emsdk 1.39.20. the version of python is 2.7.16 .i complied on macos catalina 10.15.5 the cmd i used was : ./modules/canvaskit/compile.sh -s ERROR_ON_UNDEFINED_SYMBOLS=0 -Wfastcomp -Werror . ./modules/canvaskit/compile.sh is the file in skia/modules/canvaskit , git commit id of skia is c97ebe06dc1d79fa7dfbf49259d918326b1a460f. complied log: Generating final wasm
-s LLD_REPORT_UNDEFINED
to get more information on undefined symbols
warning: To disable errors for undefined symbols use -s ERROR_ON_UNDEFINED_SYMBOLS=0
warning: _emscripten_webgl_get_current_context may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: emscripten_webgl_make_context_current (referenced by top-level compiled C/C++ code)
warning: _emscripten_webgl_make_context_current may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
em++: error: '/usr/emsdk/node/12.18.1_64bit/bin/node /usr/emsdk/upstream/emscripten/src/compiler.js /var/folders/q4/vwqr2c557nv8wnb6247v9w540000gn/T/tmprlk1jw81.txt' failed (1)
what should i do to solve these errors? is there any setting i missed?
Can you give me some suggestions? thanks a lot!So the problem is that you have -s STRICT=1
enabled, which is a good thing, bit it means that a lot of the JS libraries don't get included by default in this case.
The missing symbol here is emscripten_webgl_get_current_context
which is part of src/library_html5_webgl.js
which I believe you can include by adding -lGL
to the command line.
hi@sbc100 Thank you very much! I have solved this problem according to your suggestion in MacOS.the command line -lGL worked.
hi@Alon Zakai when i build skia canvaskit with emsdk in ./emsdk install latest ./emsdk activate latest or ./emsdk install 1.38.31 ./emsdk activate 1.38.31 the error occured Traceback (most recent call last): File "/opt/pro/emsdk/emscripten/1.38.31/emcc", line 6, in
from tools import python_selector
ImportError: No module named tools
Traceback (most recent call last):
File "/opt/pro/skia/gn/is_clang.py", line 14, in
if (b'clang' in subprocess.check_output('%s --version' % cc, shell=True) and
File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '/opt/pro/emsdk/emscripten/1.38.31/emcc --version' returned non-zero exit status 1
what should i do to solve this error?
How did the error happened?