Failed to build arm64 container image with QEMU TCG.
Closed this issue · 3 comments
yomaytk commented
Description
Thank you for supporting the arm64 container image with QEMU TCG.
I tried executing the arm64 container image following the examples/emscripten-aarch64/README.md
, but the following error occurred when I tried ./out/c2w --to-js --target-arch=aarch64 --dockerfile=Dockerfile --assets=. arm64v8/alpine:3.20 /tmp/out-js5/htdocs/
. It seems that building qemu-system-aarch64
by emscripten has failed.
...
81.49 [1783/1783] Linking target qemu-system-aarch64
81.49 FAILED: qemu-system-aarch64
81.49 /emsdk/upstream/emscripten/emcc -m32 @qemu-system-aarch64.rsp
81.49 emcc: error: @block.syms: No such file or directory ("@block.syms" was expected to be an input file, based on the commandline arguments provided)
81.49 ninja: build stopped: subcommand failed.
81.49 make: *** [Makefile:162: run-ninja] Error 1
81.49 emmake: error: 'make -j 8 qemu-system-aarch64' failed (returned 2)
------
Dockerfile:724
--------------------
723 | FROM qemu-emscripten-dev AS qemu-emscripten-dev-aarch64
724 | >>> RUN EXTRA_CFLAGS="-O3 -g -Wno-error=unused-command-line-argument -matomics -mbulk-memory -DNDEBUG -DG_DISABLE_ASSERT -D_GNU_SOURCE -sASYNCIFY=1 -pthread -sPROXY_TO_PTHREAD=1 -sFORCE_FILESYSTEM -sALLOW_TABLE_GROWTH -sTOTAL_MEMORY=$((2048*1024*1024)) -sWASM_BIGINT -sMALLOC=mimalloc --js-library=/qemu/build/node_modules/xterm-pty/emscripten-pty.js -sEXPORT_ES6=1 " ; \
725 | >>> emconfigure ../configure --static --target-list=aarch64-softmmu --cpu=wasm32 --cross-prefix= \
726 | >>> --without-default-features --enable-system --with-coroutine=fiber \
727 | >>> --extra-cflags="$EXTRA_CFLAGS" --extra-cxxflags="$EXTRA_CFLAGS" --extra-ldflags="-sEXPORTED_RUNTIME_METHODS=getTempRet0,setTempRet0,addFunction,removeFunction,TTY" && \
728 | >>> emmake make -j $(nproc) qemu-system-aarch64
729 | COPY --link --from=rootfs-aarch64-dev /out/rootfs.bin /pack/
--------------------
...
Environment
$ uname -v -i
#18~22.04.1-Ubuntu SMP Thu Oct 3 19:57:42 UTC 2024 x86_64
$ emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.69 (c55ff404dbe1eb9f263c48b584d5ba627224763a)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ go version
go version go1.23.2 linux/amd64
May I ask for your advice?
yomaytk commented
I succeeded in building the arm64 image and executing it on the latest commit. Thanks!
yomaytk commented
Close issue as resolved.