FS#65526 - [emscripten] shared:ERROR: error parsing binaryen version
Attached to Project:
Community Packages
Opened by Algunenano (Algunenano) - Monday, 17 February 2020, 10:44 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 25 February 2020, 12:06 GMT
Opened by Algunenano (Algunenano) - Monday, 17 February 2020, 10:44 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 25 February 2020, 12:06 GMT
|
Details
Description: Error when compiling with emcc
Additional info: * Package versions * emscripten 1.39.7-1 * binaryen 1:90-1 * config and/or log files etc. Steps to reproduce: - Clean installation (emscripten wasn't installed before). - Install emscripten and binaryen. - Edit `~/.emscripten` to set up `BINARYEN_ROOT = "/usr/"` - Try to build the default hello_world.c example: ``` $ emcc tests/hello_world.c cache:INFO: generating system asset: is_vanilla.txt... (this will be cached in "/home/raul/.emscripten_cache/is_vanilla.txt" for subsequent builds) cache:INFO: - ok shared:WARNING: LLVM version appears incorrect (seeing "9.0", expected "11.0") shared:INFO: (Emscripten: Running sanity checks) cache:INFO: generating system library: libc.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libc.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libcompiler_rt.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libcompiler_rt.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libc-wasm.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libc-wasm.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libdlmalloc.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libdlmalloc.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libpthread_stub.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libpthread_stub.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libc_rt_wasm.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libc_rt_wasm.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libsockets.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libsockets.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system asset: generated_struct_info.json... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/generated_struct_info.json" for subsequent builds) shared:ERROR: error parsing binaryen version (wasm-opt (unable to determine version)). Please check your binaryen installation (/usr/bin/wasm-opt) FAIL: Compilation failed! ``` Rolling back using the archive (https://archive.archlinux.org/packages/e/emscripten/) to emscripten-1.39.6-1-x86_64.pkg.tar.zst fixes it: ``` $ sudo pacman -U /tmp/emscripten-1.39.6-1-x86_64.pkg.tar.zst ... $ emcc --clear-cache ... $ emcc tests/hello_world.c cache:INFO: generating system asset: is_vanilla.txt... (this will be cached in "/home/raul/.emscripten_cache/is_vanilla.txt" for subsequent builds) cache:INFO: - ok shared:WARNING: LLVM version appears incorrect (seeing "9.0", expected "10.0") cache:INFO: generating system library: libc.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libc.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libcompiler_rt.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libcompiler_rt.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libc-wasm.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libc-wasm.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libdlmalloc.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libdlmalloc.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libpthread_stub.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libpthread_stub.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libc_rt_wasm.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libc_rt_wasm.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system library: libsockets.a... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/libsockets.a" for subsequent builds) cache:INFO: - ok cache:INFO: generating system asset: generated_struct_info.json... (this will be cached in "/home/raul/.emscripten_cache/wasm-obj/generated_struct_info.json" for subsequent builds) cache:INFO: - ok $ ls -al a.out.* -rw-r--r-- 1 raul raul 111097 Feb 17 11:38 a.out.js -rw-r--r-- 1 raul raul 21819 Feb 17 11:38 a.out.wasm ``` I've also tested it in a different PC with an upgrade from 1.39.6 to 1.39.7 and it also stopped working and shows the same error message. |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Tuesday, 25 February 2020, 12:06 GMT
Reason for closing: Fixed
Tuesday, 25 February 2020, 12:06 GMT
Reason for closing: Fixed
.emscripten
```
$ wasm-opt --version
wasm-opt (unable to determine version)
```
I've tested building binaryen from master (changing the PKGBUILD to use git/master/HEAD) and that fixed it. I also tried to rebuild binaryen 1.90-1 from source but it reproduced the issue again.
From the build logs:
```
-- No build type selected, default to Release
fatal: not a git repository: '/home/raul/dev/PKGBUILDs/binaryen/src/binaryen-version_90/.git'
CMake Warning at CMakeLists.txt:23 (message):
Error running git describe to determine version
```
It seems to be trying to read the version from .git, which doesn't exist in the source tarball. I'm not sure what's the proper way to fix it, maybe using `git+https://github.com/WebAssembly/binaryen.git#tag...` as source or edit the build/config.h and place the $pkgver there.
```
Unknown option '--minify-imports-and-exports-and-modules'
shared:ERROR: '/usr/bin/wasm-opt --minify-imports-and-exports-and-modules ../../sql/eburos.wasm -o ../../sql/eburos.wasm --mvp-features --strip-dwarf' failed (1)
```
The only way I could fix it is to build binaryen from master. Luckily binaryen just released version_91 so I tested building that instead and it also fixes it. I've attached the updated PKGBUILD.