Skip to content

AArch64/Arm64 binaryen (wasm-opt) crashes #24930

@Stephen-Seo

Description

@Stephen-Seo

Please include the following in your bug report:

Version of emscripten/emsdk:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.12 (6f625bd62ee64f4f8cd11476774741b961e4a2d5)
clang version 22.0.0git (https:/github.com/llvm/llvm-project 7f93487862d98bf1c168babba87daf6224d8a46f)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/rpi4git/ja_demo_1/third_party/emsdk_git/upstream/bin

Failing command line in full:
Attempting a build in AArch64 on https://git.seodisparate.com/gitweb/?p=jumpartifact.com_demo_1;a=summary with make

source /home/rpi4git/ja_demo_1/third_party/emsdk_git/emsdk_env.sh >&/dev/null && em++ -std=c++23 -o dist/ja_demo1.html \
	-s USE_GLFW=3 -Ithird_party/raylib_out/include -Ithird_party/imgui_git -Ithird_party/rlImGui_git \
	-Lthird_party/raylib_out/lib -lraylib \
	-Lthird_party/imgui_out -limgui \
	third_party/rlImGui_out/rlImGui.cpp.o \
	--shell-file custom_shell.html \
	-sEXPORTED_FUNCTIONS=_main \
	-O2 -DNDEBUG \
	objdir/src/demo_scene.cc.o objdir/src/scene_system.cc.o objdir/src/main.cc.o
em++: error: error running binaryen executable (/home/rpi4git/ja_demo_1/third_party/emsdk_git/upstream/bin/wasm-opt). Please check your binaryen installation
make: *** [Makefile:29: dist/index.html] Error 1

Full link command and output with -v appended:

source /home/rpi4git/ja_demo_1/third_party/emsdk_git/emsdk_env.sh >&/dev/null && em++ -v -std=c++23 -o dist/ja_demo1.html \
	-s USE_GLFW=3 -Ithird_party/raylib_out/include -Ithird_party/imgui_git -Ithird_party/rlImGui_git \
	-Lthird_party/raylib_out/lib -lraylib \
	-Lthird_party/imgui_out -limgui \
	third_party/rlImGui_out/rlImGui.cpp.o \
	--shell-file custom_shell.html \
	-sEXPORTED_FUNCTIONS=_main \
	-O2 -DNDEBUG \
	objdir/src/demo_scene.cc.o objdir/src/scene_system.cc.o objdir/src/main.cc.o
 /home/rpi4git/ja_demo_1/third_party/emsdk_git/upstream/bin/clang --version
 /home/rpi4git/ja_demo_1/third_party/emsdk_git/upstream/bin/wasm-ld -o dist/ja_demo1.wasm -Lthird_party/raylib_out/lib -lraylib -Lthird_party/imgui_out -limgui third_party/rlImGui_out/rlImGui.cpp.o objdir/src/demo_scene.cc.o objdir/src/scene_system.cc.o objdir/src/main.cc.o -L/home/rpi4git/ja_demo_1/third_party/emsdk_git/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten -L/home/rpi4git/ja_demo_1/third_party/emsdk_git/upstream/emscripten/src/lib -lGL-getprocaddr -lal -lhtml5 -lstubs -lnoexit -lc -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /tmp/tmpf8xmfyx_libemscripten_js_symbols.so --strip-debug --export=_emscripten_stack_alloc --export=__wasm_call_ctors --export=emscripten_stack_get_current --export=_emscripten_stack_restore --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=main --export-if-defined=__main_argc_argv --export-table -z stack-size=65536 --no-growable-memory --initial-heap=16777216 --no-entry --table-base=1 --global-base=1024
  /home/rpi4git/ja_demo_1/third_party/emsdk_git/upstream/bin/llvm-objcopy dist/ja_demo1.wasm dist/ja_demo1.wasm '--remove-section=.debug*' --remove-section=producers --remove-section=name
 /home/rpi4git/ja_demo_1/third_party/emsdk_git/node/22.16.0_64bit/bin/node /home/rpi4git/ja_demo_1/third_party/emsdk_git/upstream/emscripten/tools/compiler.mjs -
em++: error: error running binaryen executable (/home/rpi4git/ja_demo_1/third_party/emsdk_git/upstream/bin/wasm-opt). Please check your binaryen installation
make: *** [Makefile:29: dist/index.html] Error 1

Also to note, when running emsdk_git/upstream/bin/wasm-opt --help, wasm-opt crashes instead of printing the help text.

$ ./third_party/emsdk_git/upstream/bin/wasm-opt --help
Illegal instruction        (core dumped) ./third_party/emsdk_git/upstream/bin/wasm-opt --help

EDIT: Also, system information:

$ uname -a
Linux rpi4alarm 6.16.0-1-aarch64-ARCH #1 SMP PREEMPT_DYNAMIC Sun Aug  3 04:22:52 MDT 2025 aarch64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions