From 4259a2f0c7c2e97f9b4846bb03f6517920398804 Mon Sep 17 00:00:00 2001 From: Avi Saranga Date: Sat, 11 Aug 2018 16:10:47 -0700 Subject: [PATCH 1/2] fix makefile to build on openbsd --- Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 208b59ade1ab..99727d8c2e28 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ BUILD_TAGS = netgo ledger BUILD_FLAGS = -tags "${BUILD_TAGS}" -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=${COMMIT_HASH}" GCC := $(shell command -v gcc 2> /dev/null) LEDGER_ENABLED ?= true +UNAME_S := $(shell uname -s) all: get_tools get_vendor_deps install install_examples install_cosmos-sdk-cli test_lint test ######################################## @@ -17,12 +18,18 @@ ci: get_tools get_vendor_deps install test_cover test_lint test check-ledger: ifeq ($(LEDGER_ENABLED),true) -ifndef GCC -$(error "gcc not installed for ledger support, please install") -endif + ifeq ($(UNAME_S),OpenBSD) + $(info "OpenBSD detected, disabling ledger support (https://github.com/cosmos/cosmos-sdk/issues/1988)") + TMP_BUILD_TAGS := $(BUILD_TAGS) + BUILD_TAGS = $(filter-out ledger, $(TMP_BUILD_TAGS)) + else + ifndef GCC + $(error "gcc not installed for ledger support, please install") + endif + endif else -TMP_BUILD_TAGS := $(BUILD_TAGS) -BUILD_TAGS = $(filter-out ledger, $(TMP_BUILD_TAGS)) + TMP_BUILD_TAGS := $(BUILD_TAGS) + BUILD_TAGS = $(filter-out ledger, $(TMP_BUILD_TAGS)) endif build: check-ledger From 445f90243cbf9f643f0aab3c74cb04c2ee9a5e03 Mon Sep 17 00:00:00 2001 From: Avi Saranga Date: Sat, 11 Aug 2018 16:23:48 -0700 Subject: [PATCH 2/2] update PENDING.md --- PENDING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/PENDING.md b/PENDING.md index a0274a4430da..e89b96b74487 100644 --- a/PENDING.md +++ b/PENDING.md @@ -66,6 +66,7 @@ IMPROVEMENTS * [server] \#1930 Transactions indexer indexes all tags by default. BUG FIXES +* \#1988 Make us compile on OpenBSD (disable ledger) [#1988] (https://github.com/cosmos/cosmos-sdk/issues/1988) * \#1666 Add intra-tx counter to the genesis validators * \#1797 Fix off-by-one error in slashing for downtime * \#1787 Fixed bug where Tally fails due to revoked/unbonding validator