Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with docker on arm64 Apple silicon does not work #31

Open
achille-roussel opened this issue Aug 14, 2024 · 0 comments
Open

Build with docker on arm64 Apple silicon does not work #31

achille-roussel opened this issue Aug 14, 2024 · 0 comments

Comments

@achille-roussel
Copy link

Hello,

I tried following the steps to build with docker on a MacBook with a arm64 CPU, but the docker images used for the build have precompiled x86 binaries which fail to be executed by Rosetta:

$ docker run --rm -it -v $(pwd):/workers-wasi workers-wasi-build

npm install --no-audit --no-optional --no-fund --no-progress --quiet
mkdir -p deps
curl -sLo wasi-sdk.tar.gz https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-13/wasi-sdk-13.0-linux.tar.gz

added 3 packages in 11s
npm notice
npm notice New major version of npm available! 8.5.5 -> 10.8.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2
npm notice Run npm install -g [email protected] to update!
npm notice
touch node_modules
echo 'aea04267dd864a2f41e21f6cc43591b73dd8901e1ad4e87decf8c4b5905c73cf wasi-sdk.tar.gz' | sha256sum -c
wasi-sdk.tar.gz: OK
tar zxf wasi-sdk.tar.gz --touch -C deps
rm wasi-sdk.tar.gz
mkdir -p build/obj/deps/littlefs
mkdir -p build/obj/deps/littlefs
mkdir -p build/obj/deps/littlefs/bd
mkdir -p build/obj/src
mkdir -p build/obj/src
/workers-wasi/deps/wasi-sdk-13.0/bin/clang -target wasm32-wasi --sysroot=/workers-wasi/deps/wasi-sdk-13.0/share/wasi-sysroot -c -Oz -flto -I ./deps/rapidjson/include -I./deps/littlefs -fno-exceptions -include ./src/config.h -std=c++20 src/util.cc -o build/obj/src/util.o
/workers-wasi/deps/wasi-sdk-13.0/bin/clang -target wasm32-wasi --sysroot=/workers-wasi/deps/wasi-sdk-13.0/share/wasi-sysroot -c -Oz -flto -I ./deps/rapidjson/include -I./deps/littlefs -fno-exceptions -include ./src/config.h deps/littlefs/lfs.c -o build/obj/deps/littlefs/lfs.o
/workers-wasi/deps/wasi-sdk-13.0/bin/clang -target wasm32-wasi --sysroot=/workers-wasi/deps/wasi-sdk-13.0/share/wasi-sysroot -c -Oz -flto -I ./deps/rapidjson/include -I./deps/littlefs -fno-exceptions -include ./src/config.h deps/littlefs/lfs_util.c -o build/obj/deps/littlefs/lfs_util.o
/workers-wasi/deps/wasi-sdk-13.0/bin/clang -target wasm32-wasi --sysroot=/workers-wasi/deps/wasi-sdk-13.0/share/wasi-sysroot -c -Oz -flto -I ./deps/rapidjson/include -I./deps/littlefs -fno-exceptions -include ./src/config.h deps/littlefs/bd/lfs_rambd.c -o build/obj/deps/littlefs/bd/lfs_rambd.o
/workers-wasi/deps/wasi-sdk-13.0/bin/clang -target wasm32-wasi --sysroot=/workers-wasi/deps/wasi-sdk-13.0/share/wasi-sysroot -c -Oz -flto -I ./deps/rapidjson/include -I./deps/littlefs -fno-exceptions -include ./src/config.h -std=c++20 src/memfs.cc -o build/obj/src/memfs.o
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
 rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
 rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
 rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
 rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
 make: *** [Makefile:37: build/obj/deps/littlefs/bd/lfs_rambd.o] Trace/breakpoint trap
make: *** Waiting for unfinished jobs....
make: *** [Makefile:41: build/obj/src/util.o] Trace/breakpoint trap
make: *** [Makefile:37: build/obj/deps/littlefs/lfs.o] Trace/breakpoint trap
make: *** [Makefile:37: build/obj/deps/littlefs/lfs_util.o] Trace/breakpoint trap
make: *** [Makefile:41: build/obj/src/memfs.o] Trace/breakpoint trap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant