Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

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
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


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: 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
Comment by Ho Tuan Kiet (tuankiet65) - Wednesday, 29 July 2020, 12:50 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: Seems like a upstream problem I think.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 30 July 2020, 00:17 GMT
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).
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 30 July 2020, 00:19 GMT
I patched the package in 1.39.20-3 and submitted this upstream: