-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix: issue #10258 related to segmentaiton fault on mac m1 arm64 #10279
fix: issue #10258 related to segmentaiton fault on mac m1 arm64 #10279
Conversation
dad2017
to
2431883
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK (just tested on my non-M1 mac, it builds).
Maybe someone with a M1 can test it before merging? cc @frumioj
Just a heads-up, this PR fixes only the The solution that I have written works well with the issue above, since when running the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the suggested change is committed, LGTM. Pre-approving.
Makefile
Outdated
@@ -109,7 +109,7 @@ BUILD_TARGETS := build install | |||
|
|||
build: BUILD_ARGS=-o $(BUILDDIR)/ | |||
build-linux: | |||
GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build | |||
GOOS=linux GOARCH=$(if $(findstring aarch64,$(shell uname -m)),arm64,amd64) LEDGER_ENABLED=false $(MAKE) build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GOOS=linux GOARCH=$(if $(findstring aarch64,$(shell uname -m)),arm64,amd64) LEDGER_ENABLED=false $(MAKE) build | |
GOOS=linux GOARCH=$(if $(findstring aarch64,$(shell uname -m)) || $(findstring arm64, $(shell uname -m)),arm64,amd64) LEDGER_ENABLED=false $(MAKE) build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because uname -m
reports differently on Debian/M1 vs. MacOS/M1:
johnk@debian:~/src/cosmos-sdk$ uname -m
aarch64
MacOS/M1
frumiousj@dirtycomputer cosmos-sdk % uname -m
arm64
frumiousj@dirtycomputer cosmos-sdk % uname
Darwin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work well with localnet-start
as I've explained in the comment above, for some reason, in MacOS/M1, when the build GOARCH is set to ARM64, the localnet-start
binary (when executed) will output that there's a architecture mismatch.
It won't run because of incompatibility between the image architecture and that of the docker image it's being run in. I did actually find a way to fix that some time ago IIRC, but my branch is still a WIP: regen-network/regen-ledger#410 - perhaps that might be helpful though? |
Will check it out, thank you 😄 |
what is the status here? |
Ping. Is it okay to put automerge? We have 2 approvals |
I will check if the suggested change from @frumioj breaks anything, since as he pointed out this fix might not work with Debian/M1. |
…d not work on Debian/M1
running make-simd-linux fails for This also seems to have broken ci livness test |
What Arch? |
this is within the docker container. when you run |
Can you tell me how to replicate? |
If I am not missing something, this PR introduced a regression (see #12798 (comment)) |
Description
Closes: #10258
fixed an issue where the makefile target
build-linux
would build a faulty binary file on a mac m1, since the compilation targetwas AMD64, but it was needed to be ARM64.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change