From 89646fb5f53cb5d5fe2396a44d5d746b7e07ad0a Mon Sep 17 00:00:00 2001 From: vimystic <122659254+vimystic@users.noreply.github.com> Date: Wed, 23 Oct 2024 20:45:24 -0600 Subject: [PATCH 1/2] chore:update read to add troubleshooting info on M* macbooks --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 0734af8..61aee17 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,14 @@ make get-localic # Attempt to run a command spawn help +# Potential workaround if spawn is immediately killed when attempting run "spawn help" on a m* macbook. +# This may happen because of an xcode16 update. +# To work around this as a temporary measure please change this line in the Make file. +LD_FLAGS = -X main.SpawnVersion=$(VERSION) +# to +LD_FLAGS = -X main.SpawnVersion=$(VERSION) -s -w + + # If you get "command 'spawn' not found", add to path. # Run the following in your terminal to test # Then add to ~/.bashrc (linux / windows) or ~/.zshrc (mac) From 09237372f16c464ae8126ef826180550f65e4f81 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Thu, 24 Oct 2024 09:00:44 +0400 Subject: [PATCH 2/2] `-s -w` on build --- Makefile | 6 +++++- simapp/Makefile | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 477567d..c35c0a3 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,11 @@ endif DATE := $(shell date '+%Y-%m-%dT%H:%M:%S') HEAD = $(shell git rev-parse HEAD) -LD_FLAGS = -X main.SpawnVersion=$(VERSION) +# MacOS sequoia + XCode 16 causes the binary to instantly die +# Stripping the debug info with -s -w fixes this so the binary +# is properly signed +# ref: https://github.com/rollchains/spawn/issues/248 +LD_FLAGS = -X main.SpawnVersion=$(VERSION) -s -w BUILD_FLAGS = -mod=readonly -ldflags='$(LD_FLAGS)' ## mod-tidy: go mod tidy spawn, simapp, and interchaintest with proper go.mod suffixes diff --git a/simapp/Makefile b/simapp/Makefile index 6ae5170..d380edc 100644 --- a/simapp/Makefile +++ b/simapp/Makefile @@ -62,11 +62,14 @@ build_tags_comma_sep := $(subst $(empty),$(comma),$(build_tags)) # process linker flags +# flags '-s -w' resolves an issue with xcode 16 and signing of go binaries +# ref: https://github.com/golang/go/issues/63997 ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=wasm \ -X github.com/cosmos/cosmos-sdk/version.AppName=wasmd \ -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ - -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" + -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \ + -s -w ifeq ($(WITH_CLEVELDB),yes) ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb