Closed fbrusch closed 2 years ago
Ah. You are looking to source-build on ARM64. I haven't tested that at all, likely Dockerfile.source would require adjustments to detect architecture and build accordingly. I don't have a Mac M1 to test; I will happily entertain a PR for this.
FYI I believe this issue was to do with Alpine 3.14 (link) rather than ARM64.
I've just built Geth from the source Dockerfile on the following arch with no problems: Linux 5.11.0-1028-oracle #31~20.04.1-Ubuntu SMP Wed Jan 26 14:20:52 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
Oh interesting. So if I change Geth to be built on Debian rather than Alpine, it might work on arm64.
I'll keep this issue open until I have time to test this on ARM64. Thanks!
Oh, I just meant that it was probably caused by @fbrusch using an outdated version of docker (incompatible with current Alpine). No change was necessary to build on ARM64.
Ah got you. Thanks for testing! The M1 likely has whatever ships there with Docker Desktop.
Closing for now. I'll have a Rock5 B "MoreSoonerish(tm)" to test on. I am unlikely to buy an M1/M2 anytime soon, if ever.
While I try to docker-build on an Mac M1 I get:
[...] Step 6/16 : RUN bash -c "git clone https://github.com/ethereum/go-ethereum.git && cd go-ethereum && git config advice.detachedHead false && git fetch --all --tags && git checkout ${BUILD_TARGET} && make geth" ---> Running in e8a4cb471331 Cloning into 'go-ethereum'... Updating files: 100% (1826/1826), done. Fetching origin Already on 'master' Your branch is up to date with 'origin/master'. env GO111MODULE=on go run build/ci.go install ./cmd/geth make: env: Operation not permitted make: *** [Makefile:12: geth] Error 127 The command '/bin/sh -c bash -c "git clone https://github.com/ethereum/go-ethereum.git && cd go-ethereum && git config advice.detachedHead false && git fetch --all --tags && git checkout ${BUILD_TARGET} && make geth"' returned a non-zero code: 2 ERROR: Service 'execution' failed to build : Build failed