cosmos / sdk-tutorials

Tutorials for building modules for the Cosmos SDK
https://tutorials.cosmos.network/
Apache License 2.0
496 stars 391 forks source link

Liquidity Module fails to build on OSX #817

Closed ekkis closed 1 year ago

ekkis commented 3 years ago

Foreword

I originally created this issue on https://github.com/b-harvest/gravity-dex/issues/6 since that seems to be the offending piece of the puzzle, but I think it's more clearly germane to the sdk tutorial, hence my post here. I'm also posting here since I got no response from the other post

Summary of Bug

make install fails

Version

uname -a: Darwin katallaxia 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64 git commit hash: unsure what is required gaiacli version: gaiad won't build, unknown gaiad version: gaiad won't build, unknown

Steps to Reproduce

$ git clone https://github.com/b-harvest/gravity-dex.git
$ cd gravity-dex && make install

Results

mkdir -p /Users/ekkis/dev/gravity-dex/build/ go install -mod=readonly -tags "netgo ledger" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=gaia -X github.com/cosmos/cosmos-sdk/version.AppName=gaiad -X github.com/cosmos/cosmos-sdk/version.Version=add-liquidity-module-to-gaia-fd6bb727660a052bc1e702325acd28b02dfd6a39 -X github.com/cosmos/cosmos-sdk/version.Commit=fd6bb727660a052bc1e702325acd28b02dfd6a39 -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger" -X github.com/tendermint/tendermint/version.TMCoreSemVer=v0.34.10 -w -s' -trimpath ./... go: downloading github.com/cosmos/cosmos-sdk v0.42.5 go: downloading github.com/spf13/cast v1.3.1 go: downloading github.com/spf13/cobra v1.1.3 go: downloading github.com/tendermint/tendermint v0.34.10 go: downloading github.com/tendermint/tm-db v0.6.4 go: downloading github.com/gorilla/mux v1.8.0 go: downloading github.com/gravity-devs/liquidity v1.2.8 go: downloading github.com/pkg/errors v0.9.1 go: downloading github.com/rakyll/statik v0.1.7 go: downloading github.com/regen-network/protobuf v1.3.3-alpha.regen.1 go: downloading github.com/tendermint/go-amino v0.16.0 go: downloading gopkg.in/yaml.v2 v2.4.0 go: downloading github.com/grpc-ecosystem/grpc-gateway v1.16.0 go: downloading google.golang.org/grpc v1.33.2 go: downloading github.com/spf13/pflag v1.0.5 go: downloading github.com/spf13/viper v1.7.1 go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 go: downloading github.com/btcsuite/btcd v0.21.0-beta go: downloading github.com/cosmos/go-bip39 v1.0.0 go: downloading github.com/99designs/keyring v1.1.6 go: downloading github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 go: downloading github.com/rs/zerolog v1.21.0 go: downloading github.com/golang/protobuf v1.5.2 go: downloading github.com/regen-network/cosmos-proto v0.3.1 go: downloading google.golang.org/genproto v0.0.0-20210114201628-6edceaf6022f go: downloading github.com/go-kit/kit v0.10.0 go: downloading github.com/go-logfmt/logfmt v0.5.0 go: downloading github.com/gogo/gateway v1.1.0 go: downloading github.com/gorilla/handlers v1.5.1 go: downloading github.com/stretchr/testify v1.7.0 go: downloading github.com/confio/ics23/go v0.6.6 go: downloading github.com/armon/go-metrics v0.3.8 go: downloading github.com/google/btree v1.0.0 go: downloading github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974 go: downloading github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.1 go: downloading github.com/davecgh/go-spew v1.1.1 go: downloading google.golang.org/protobuf v1.26.0 go: downloading github.com/cosmos/iavl v0.16.0 go: downloading github.com/prometheus/client_golang v1.10.0 go: downloading github.com/prometheus/common v0.23.0 go: downloading github.com/bgentry/speakeasy v0.1.0 go: downloading github.com/mattn/go-isatty v0.0.12 go: downloading golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad go: downloading github.com/cosmos/ledger-cosmos-go v0.11.1 go: downloading github.com/tendermint/btcd v0.1.1 go: downloading github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 go: downloading github.com/fsnotify/fsnotify v1.4.9 go: downloading github.com/hashicorp/hcl v1.0.0 go: downloading github.com/magiconair/properties v1.8.5 go: downloading github.com/mitchellh/mapstructure v1.3.3 go: downloading github.com/pelletier/go-toml v1.8.1 go: downloading github.com/spf13/afero v1.3.4 go: downloading github.com/spf13/jwalterweatherman v1.1.0 go: downloading github.com/subosito/gotenv v1.2.0 go: downloading gopkg.in/ini.v1 v1.61.0 go: downloading github.com/hashicorp/golang-lru v0.5.4 go: downloading github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b go: downloading github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d go: downloading github.com/mitchellh/go-homedir v1.1.0 go: downloading github.com/mtibben/percent v0.2.1 go: downloading github.com/rs/cors v1.7.0 go: downloading github.com/gorilla/websocket v1.4.2 go: downloading github.com/felixge/httpsnoop v1.0.1 go: downloading github.com/hashicorp/go-immutable-radix v1.0.0 go: downloading github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 go: downloading github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d go: downloading github.com/gtank/merlin v0.1.1 go: downloading github.com/libp2p/go-buffer-pool v0.0.2 go: downloading github.com/beorn7/perks v1.0.1 go: downloading github.com/cespare/xxhash/v2 v2.1.1 go: downloading github.com/prometheus/client_model v0.2.0 go: downloading github.com/prometheus/procfs v0.6.0 go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1 go: downloading github.com/cespare/xxhash v1.1.0 go: downloading golang.org/x/sys v0.0.0-20210510120138-977fb7262007 go: downloading github.com/cosmos/ledger-go v0.9.2 go: downloading golang.org/x/text v0.3.3 go: downloading golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 go: downloading github.com/Workiva/go-datastructures v1.0.52 go: downloading github.com/minio/highwayhash v1.0.1 go: downloading github.com/google/orderedcode v0.0.1 go: downloading github.com/pmezard/go-difflib v1.0.0 go: downloading gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c go: downloading github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 go: downloading github.com/gtank/ristretto255 v0.1.2 go: downloading github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 go: downloading github.com/zondax/hid v0.9.0 github.com/keybase/go-keychain cgo-gcc-prolog:203:11: warning: 'SecTrustedApplicationCreateFromPath' is deprecated: first deprecated in macOS 10.15 - No longer supported [-Wdeprecated-declarations] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrustedApplication.h:59:10: note: 'SecTrustedApplicationCreateFromPath' has been explicitly marked deprecated here

Notes

consequent to the attempt to build I try gaiad version but only get:

-sh: gaiad: command not found


For Admin Use

Antropocosmist commented 3 years ago

Looks like some problems with path to binary

look at: /usr/local/bin/ Can you see your binary there? There is need to be file with name: *gaiad

Also, this file can be at: /root/gaia/bin/

If you have it - just copy it to /usr/local/bin/

After try to check: gaiad version

ekkis commented 3 years ago

there's no binary. I'm on OSX so there's no /root but /usr/local/bin doesn't contain the binary. it's failing to build

xavierlepretre commented 1 year ago

It looks like this is referring to obsolete content.