[Pkg-javascript-devel] Bug#975069: Bug#975069: emscripten: Incompatibilities with LLVM 11
Jonas Smedegaard
jonas at jones.dk
Sat Nov 28 18:57:39 GMT 2020
Quoting Sébastien Jodogne (2020-11-18 20:49:27)
> >> When building a large C++ project using the current package, the
> >> WebAssembly linking might fail with error "emscripten:ERROR: emscript:
> >> failure to parse metadata output from wasm-emscripten-finalize".
> >
> > Which exact options passed to wasm-emscripten-finalize?
>
> After inspection of "/usr/share/emscripten/emscripten.py", the options are:
>
> ['--detect-features', '--minimize-wasm-changes', '--dyncalls-i64',
> '--global-base=1024']
>
> You'll find the error log attached to this mail.
>
> Note how "wasm-emscripten-finalize" produced an invalid JSON file: It
> contains percents that are not properly escaped. From what I see on a
> working emsdk deployment, no function starting with "__invoke" in the
> "declares" section should be present.
Seems the problem is not which options emscripten passes to llvm, but
that llvm and binaryen are out of sync: Some renaming of "emscripten EH
EH functions" was previously done by binaryen and more recently in LLVM
- binaryen 98 is too new to do it and LLVM is too old to do it:
https://github.com/llvm/llvm-project/commit/3bba91f64eef15956f589fa446c265a714cc7893
Here is a minimal code to reproduce that (final parts of) that same
error message (tested in a clean chroot of Debian sid as of today):
apt install emscripten
emcc --version
/usr/share/emscripten/tests/runner.py test_exceptions
- Jonas
--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/
[x] quote me freely [ ] ask before reusing [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20201128/3acabe02/attachment.sig>
More information about the Pkg-javascript-devel
mailing list