FS#67432 - [emscripten] Emscripten 1.39.20 depends on binaryen 93/94
Attached to Project:
Community Packages
Opened by Ho Tuan Kiet (tuankiet65) - Wednesday, 29 July 2020, 12:35 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 07 August 2020, 21:43 GMT
Opened by Ho Tuan Kiet (tuankiet65) - Wednesday, 29 July 2020, 12:35 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 07 August 2020, 21:43 GMT
|
Details
Using emscripten 1.39.20-2 and binaryen 1:95-1 (both latest
version in Arch repository), emcc failed to compile a simple
C++ source file with the following error message:
emcc: error: unexpected binaryen version: 95 (expected 93) [-Wversion-check] [-Werror] FAIL: Compilation failed!: ['/usr/lib/emscripten/emcc', '-D_GNU_SOURCE', '-o', '/tmp/tmptmg9f75t.js', '/tmp/tmp3klv_561.c', '-O0', '--js-opts', '0', '--memory-init-file', '0', '-Werror', '-Wno-format', '-s', 'BOOTSTRAPPING_STRUCT_INFO=1', '-s', 'WARN_ON_UNDEFINED_SYMBOLS=0', '-s', 'STRICT=1', '-s', 'SINGLE_FILE=1'] Turns out there's a binaryen version check in Emscripten. For emscripten 1.39.20, it expectes that the installed binaryen is either version 93 or 94 (source: https://github.com/emscripten-core/emscripten/blob/1.39.20/tools/shared.py#L44) When I downgraded binaryen from version 95 to 94 then emcc compiles normally. |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Friday, 07 August 2020, 21:43 GMT
Reason for closing: Fixed
Friday, 07 August 2020, 21:43 GMT
Reason for closing: Fixed
Comment by
Ho Tuan Kiet (tuankiet65) -
Wednesday, 29 July 2020, 12:50 GMT
Comment by
Sven-Hendrik Haase (Svenstaro) -
Thursday, 30 July 2020, 00:17 GMT
Comment by
Sven-Hendrik Haase (Svenstaro) -
Thursday, 30 July 2020, 00:19 GMT
Did some digging, the error is caused by the "generating system
asset: generated_struct_info.json" step, which is only done once
when the cache is empty/does not exist. The step involves invoking
emcc with the -Werror flag. emcc will emit a binaryen version
mismatch warning, which is turned into a error due to the -Werror
flag (source:
https://github.com/emscripten-core/emscripten/blob/f2bc28012efb62e6fd1dddfa90231271665a11b7/tools/gen_struct_info.py#L399). Seems like a upstream problem I think.
I can reproduce after clearing cache. I saw the warning during my
testing earlier but since it compiled fine I was like "sure
whatever". Honestly, I think a "good" short-term fix would be to
make the message into a warning again (which is in line with
default emcc behavior).
I patched the package in 1.39.20-3 and submitted this upstream:
https://github.com/emscripten-core/emscripten/pull/11759