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

Add - Build on M1 Mac and Homebrew #21

Open
bdmorin opened this issue Jan 11, 2023 · 0 comments
Open

Add - Build on M1 Mac and Homebrew #21

bdmorin opened this issue Jan 11, 2023 · 0 comments
Assignees
Labels
must Enhancement that is really needed. Hence 'must' agile label.

Comments

@bdmorin
Copy link

bdmorin commented Jan 11, 2023

I wanted to try this out, but had a bunch of issues, here's how I resolved them.

Default jp package for homebrew isn't JMSEPath.

brew remove jp
brew tap jmespath/jmespath
brew install jmespath/jmespath/jp 

I had to add darwn/arm64 to build.sh

❯ git diff build.sh
diff --git a/build.sh b/build.sh
index 96b2d09..030a3e3 100755
--- a/build.sh
+++ b/build.sh
@@ -33,7 +33,7 @@ for arch in 386 arm64 amd64
 do
   linux_compile "$arch"
 done
-for dist in windows/amd64 windows/386 darwin/amd64 freebsd/amd64 js/wasm netbsd/amd64 openbsd/amd64
+for dist in windows/amd64 windows/386 darwin/arm64 darwin/amd64 freebsd/amd64 js/wasm netbsd/amd64 openbsd/amd64
 do
   cross_compile "$dist"
 done

If you want to bypass the build.sh step:

GOOS=darwin GOARCH=arm64 go build -a -ldflags="-X 'main.Version=$(git describe)'" -o frangipanni_"$GOOS"_"$GOARCH" frangipanni.go

Enjoy!

@birchb1024 birchb1024 self-assigned this Jun 15, 2023
@birchb1024 birchb1024 changed the title How I built on M1 Mac & Homebrew. Jun 15, 2023
@birchb1024 birchb1024 added the enhancement New feature or request label Jun 15, 2023
@birchb1024 birchb1024 changed the title Add - Build on M1 Mac & Homebrew Jun 15, 2023
@birchb1024 birchb1024 added must Enhancement that is really needed. Hence 'must' agile label. and removed enhancement New feature or request labels Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
must Enhancement that is really needed. Hence 'must' agile label.
2 participants