-
Notifications
You must be signed in to change notification settings - Fork 28
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
support arm64 golang on M1 mac #380
Comments
Thanks for your contribution.
Please give us more information.
We've built the below for the |
When I build docker image in lbm-sdk, the building is failed.
The system specification is macOs v12.2.1 and CPU is |
I got the same error on m1 mac as you did. And I confirmed that I failed to build Docker in another environment, Catalina Mac.
|
But I got success to build Ostracon. So I think lbm-sdk should improve
|
@zemyblue I've built docker on lbm-sdk( $ git diff
diff --git a/Dockerfile b/Dockerfile
index 72349483b..ac2960014 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,7 +13,7 @@
FROM golang:alpine AS build-env
# Install minimum necessary dependencies,
-ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3
+ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 build-base file gmp-dev clang libtool autoconf automake
RUN apk add --no-cache $PACKAGES
# Set working directory for the build
It's a success.
Anyway, would you change the issues' title? It doesn't depend on arm64 golang on M1 mac. Thanks. |
I still don't compile. |
@zemyblue I've checked and confirmed the success with the latest version lbm-sdk with more of the below patch: diff --git a/Makefile b/Makefile
index fe874d60e..f9d36cf1f 100644
--- a/Makefile
+++ b/Makefile
@@ -112,9 +112,10 @@ include contrib/devtools/Makefile
BUILD_TARGETS := build install
+TARGET_ARCH ?= $(shell go env GOARCH)
build: BUILD_ARGS=-o $(BUILDDIR)/
build-linux:
- GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build
+ GOOS=linux GOARCH=$(TARGET_ARCH) LEDGER_ENABLED=false $(MAKE) build Thanks |
@zemyblue Would you check them?
I wish those help you. Thanks. |
Summary
The latest Ostracon version(v1.0.4) doesn't support arm64 build on M1 mac.
I found the problem is
github.com/herumi/bls-eth-go-binary
libray doesn't support.Need to update the library at least 1.20+. (I think current
bls-eth-go-binary
version seems 1.12.)Problem Definition
Proposal
For Admin Use
The text was updated successfully, but these errors were encountered: