From 30fc9667630e1129f054b37b158fbed6d65be531 Mon Sep 17 00:00:00 2001 From: Lane Rettig Date: Tue, 30 May 2023 15:02:15 -0400 Subject: [PATCH 1/2] Update spacemesh-sdk dependency Use latest version, use rpath --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cb1d909..6f4a635 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Based on https://gist.github.com/trosendal/d4646812a43920bfe94e -DEPTAG := 0.0.1 +DEPTAG := 1.0.3 DEPLIBNAME := spacemesh-sdk DEPLOC := https://github.com/spacemeshos/$(DEPLIBNAME)/releases/download UNZIP_DEST := deps @@ -8,7 +8,7 @@ REAL_DEST := $(CURDIR)/$(UNZIP_DEST) DOWNLOAD_DEST := $(UNZIP_DEST)/$(DEPLIBNAME).tar.gz LINKLIBS := -L$(REAL_DEST) -CGO_LDFLAGS := $(LINKLIBS) +CGO_LDFLAGS := $(LINKLIBS) -Wl,-rpath,@loader_path -Wl,-rpath,$(REAL_DEST) STATICLDFLAGS := -L$(UNZIP_DEST) -led25519_bip32 -lspacemesh_remote_wallet EXTRACT = tar -xzf From 2bd3226d1f92efd041b0ca587337404f4e92b29f Mon Sep 17 00:00:00 2001 From: Lane Rettig Date: Tue, 30 May 2023 15:07:40 -0400 Subject: [PATCH 2/2] Update rpath for mac --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6f4a635..f2d4308 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,8 @@ REAL_DEST := $(CURDIR)/$(UNZIP_DEST) DOWNLOAD_DEST := $(UNZIP_DEST)/$(DEPLIBNAME).tar.gz LINKLIBS := -L$(REAL_DEST) -CGO_LDFLAGS := $(LINKLIBS) -Wl,-rpath,@loader_path -Wl,-rpath,$(REAL_DEST) +RPATH := -Wl,-rpath,@loader_path -Wl,-rpath,$(REAL_DEST) +CGO_LDFLAGS := $(LINKLIBS) $(RPATH) STATICLDFLAGS := -L$(UNZIP_DEST) -led25519_bip32 -lspacemesh_remote_wallet EXTRACT = tar -xzf @@ -60,7 +61,7 @@ else ifeq ($(GOOS),darwin) # macOS specific settings # statically link our libs, dynamic build using default toolchain - CGO_LDFLAGS = $(LINKLIBS) $(REAL_DEST)/libed25519_bip32.a $(REAL_DEST)/libspacemesh_remote_wallet.a -framework CoreFoundation -framework IOKit -framework AppKit + CGO_LDFLAGS = $(LINKLIBS) $(REAL_DEST)/libed25519_bip32.a $(REAL_DEST)/libspacemesh_remote_wallet.a -framework CoreFoundation -framework IOKit -framework AppKit $(RPATH) LDFLAGS = else ifeq ($(GOOS),windows) # static build using default toolchain