openframeworks / openframeworks/openFrameworks

Tons of emscripten errors.

Open
#6,760 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

emscripten
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

I have tried to install emscripten using the guides here and solutions people found worked here.
Everytime I did I got this error:

wasm-ld: error: /Users/Eino/Coding/of_v0.11.2_osx_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.bc: unexpected table definition(s) without corresponding symbol-table entries.
wasm-ld: error: /Users/Eino/Coding/of_v0.11.2_osx_release/libs/freetype/lib/emscripten/libfreetype.bc: unexpected table definition(s) without corresponding symbol-table entries.
em++: error: '/Users/Eino/Coding/emsdk/upstream/bin/wasm-ld -o bin/Collatz-Conjecture.wasm obj/emscripten/Release/src/ofApp.o obj/emscripten/Release/src/main.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenSoundStream.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenVideoPlayer.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenSoundPlayer.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenVideoGrabber.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenURLFileLoader.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxAppEmscriptenWindow.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxBaseGui.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxColorPicker.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxSliderGroup.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxToggle.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxButton.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxGuiGroup.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxInputField.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxLabel.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxPanel.o /Users/Eino/Coding/of_v0.11.2_osx_release/addons/obj/emscripten/Release/ofxGui/src/ofxSlider.o /Users/Eino/Coding/of_v0.11.2_osx_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.bc /Users/Eino/Coding/of_v0.11.2_osx_release/libs/FreeImage/lib/emscripten/libfreeimage.a /Users/Eino/Coding/of_v0.11.2_osx_release/libs/boost/lib/emscripten/libboost_system.a /Users/Eino/Coding/of_v0.11.2_osx_release/libs/boost/lib/emscripten/libboost_filesystem.a /Users/Eino/Coding/of_v0.11.2_osx_release/libs/freetype/lib/emscripten/libfreetype.bc /Users/Eino/Coding/of_v0.11.2_osx_release/libs/pugixml/lib/emscripten/libpugixml.bc /Users/Eino/Coding/of_v0.11.2_osx_release/libs/tess2/lib/emscripten/libtess2.a /Users/Eino/Coding/of_v0.11.2_osx_release/libs/uriparser/lib/emscripten/liburiparser.a -L/Users/Eino/Coding/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten -lGL -lal -lhtml5 -lc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -ldlmalloc -lc_rt_wasm -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=main --export-if-defined=stackSave --export-if-defined=stackRestore --export-if-defined=stackAlloc --export-if-defined=__wasm_call_ctors --export-if-defined=fflush --export-if-defined=__errno_location --export-if-defined=malloc --export-if-defined=free --export-if-defined=_get_tzname --export-if-defined=_get_daylight --export-if-defined=_get_timezone --export-if-defined=setThrew --export-if-defined=saveSetjmp --export-if-defined=__cxa_is_pointer_type --export-if-defined=__cxa_can_catch --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-table -z stack-size=5242880 --initial-memory=134217728 --no-entry --max-memory=134217728 --global-base=1024' failed (returned 1)
make[1]: *** [bin/Collatz-Conjecture.html] Error 1
make: *** [Release] Error 2
emmake: error: 'make' failed (returned 2)

But now, I also installed and activated binaryen-main-64bit (current active tools node-14.15.5-64bit, python-3.9.2-1-64bit, binaryen-main-64bit, emscripten-1.38.9) and I'm just getting a python error like this:

Traceback (most recent call last):
  File "/Users/Eino/Coding/emsdk/emscripten/1.38.9/emmake.py", line 23, in <module>
    from tools import shared
  File "/Users/Eino/Coding/emsdk/emscripten/1.38.9/tools/shared.py", line 790, in <module>
    CLANG_CC = os.path.expanduser(build_clang_tool_path(exe_suffix('clang')))
  File "/Users/Eino/Coding/emsdk/emscripten/1.38.9/tools/shared.py", line 655, in build_clang_tool_path
    return os.path.join(LLVM_ROOT, tool)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 70, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

I have scoured the interwebs for help, with the two previously linked guides/threads being the only ones of help, and just can not get it working. What I atleast want to know if it is just me being dumb or is something else broken.
Code for the project I'm trying to compile: https://codeberg.org/EinoHR/Collatz-Conjecture

Edit: When activating sdk-1.40.0-64bit the error doesnt python error doesn't happen anymore, only the earlier one.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Collatz-Conjecture build with the cited Emscripten SDK versions and inspect the reported wasm-ld command. Read emmake.py and tools/shared.py around the LLVM_ROOT lookup, then compare that Python failure with the unexpected table definitions from libopenFrameworks.bc and libfreetype.bc. Done means identifying a reproducible toolchain or build compatibility problem and documenting the confirmed cause.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python, wasm
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.