Skip to content

Builds with Emscripten upstream are broken #16

@dcodeIO

Description

@dcodeIO

In WebAssembly/binaryen#2464 Binaryen moved from a bash script to cmake for building, and now expects Emscripten upstream (latest=1.39.3 at the time of this writing). However, after updating the buildbot stuff started breaking with an assertion being hit when trying to require the compiled binaryen.js:

  • Travis/Xenial with Emsdk/latest
  • Travis/Bionic with Emsdk/latest
  • Travis/Xenial with Docker/trzeci/emscripten-upstream
  • Travis/Bionic with Docker/trzeci/emscripten-upstream
  • GitHub Actions/ubuntu-latest with Emsdk/latest
AssertionError [ERR_ASSERTION]: Got unwanted exception.
Actual message: "abort(Assertion failed: *currp, at: /home/runner/work/binaryen.js/binaryen.js/binaryen/src/wasm-traversal.h,651,pushTask). Build with -s ASSERTIONS=1 for more info."
  • GitHub Actions/ubuntu-latest with Emsdk/1.39.2
AssertionError [ERR_ASSERTION]: Got unwanted exception.
Actual message: "abort(Assertion failed: s, at: /home/runner/work/binaryen.js/binaryen.js/binaryen/src/emscripten-optimizer/istring.h,65,IString). Build with -s ASSERTIONS=1 for more info."
  • GitHub Actions/ubuntu-latest with Emsdk/1.39.1 (not even compiling)
[  2%] Building CXX object src/wasm/CMakeFiles/wasm.dir/literal.cpp.o
shared:WARNING: ignoring -fPIC flag when not building with SIDE_MODULE or MAIN_MODULE
shared:ERROR: treating warnings as errors (-Werror)

with the issue not being reproducible with -DCMAKE_BUILD_TYPE=Debug or locally (Debian in WSL, plain Win10 with ninja).

Also seeing the following warning in most of these setups, don't know if relevant:

CMake Warning (dev) at CMakeLists.txt:225 (ADD_LIBRARY):
  ADD_LIBRARY called with SHARED option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.

Also tried switching make with ninja without success.

  • Full log on GitHub Actions with Emsdk/latest

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions