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

wasmd, make install fails on MacOSX 11.6.7 #913

Closed
4coffeeihadbreakfast opened this issue Jul 25, 2022 · 4 comments
Closed

wasmd, make install fails on MacOSX 11.6.7 #913

4coffeeihadbreakfast opened this issue Jul 25, 2022 · 4 comments

Comments

@4coffeeihadbreakfast
Copy link

4coffeeihadbreakfast commented Jul 25, 2022

Hi, wasmd make install fails for me on MacOSX 11.6.7

Following along in dev-academy setup docs -> dev-academy -> Basics -> Environment Setup -> wasmd -> make install

I am unable to install wasmd

env:

$ go version
go version go1.18.4 darwin/amd64

$ uname -a
Darwin MacBook-Pro.local 20.6.0 Darwin Kernel Version 20.6.0: Tue Apr 19 21:04:45 PDT 2022; root:xnu-7195.141.29~1/RELEASE_X86_64 x86_64

steps:

git clone https://github.com/CosmWasm/wasmd.git
cd wasmd
git fetch --tags
git checkout v0.27.0
make install
$ make install
go install -mod=readonly -tags "netgo,ledger" -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=0.27.0 -X github.com/cosmos/cosmos-sdk/version.Commit=d63bea442bedf5b3055f3821472c7e6cafc3d813 -X github.com/CosmWasm/wasmd/app.Bech32Prefix=wasm -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger" -L/usr/local/opt/libpq/lib' -trimpath ./cmd/wasmd
go: downloading github.com/cosmos/cosmos-sdk v0.45.4
go: downloading github.com/prometheus/client_golang v1.12.1
go: downloading github.com/tendermint/tendermint v0.34.19
...
...
...
# 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]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrustedApplication.h:59:10: note: 'SecTrustedApplicationCreateFromPath' has been explicitly marked deprecated here
# github.com/CosmWasm/wasmd/cmd/wasmd
flag provided but not defined: -L/usr/local/opt/libpq/lib
usage: link [options] main.o
  -B note
    	add an ELF NT_GNU_BUILD_ID note when using ELF
...
...
  -strictdups int
    	sanity check duplicate symbol contents during object file reading (1=warn 2=err).
  -tmpdir directory
    	use directory for temporary files
  -v	print link trace
  -w	disable DWARF generation
make: *** [install] Error 2

$ wasmd
zsh: command not found: wasmd

$ ls -l ~/go/bin/wasmd
ls: /Users/cfe/go/bin/wasmd: No such file or directory

$ echo $GOPATH
/Users/cfe/go

I believe the issue is that go.mod points to github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d but needs to point to a newer version. e.g. github.com/keybase/go-keychain v0.0.0-20220408132150-ad3b4a8fd4a7 (untested)

I believe Apple removed support for something which now breaks, previously it was deprecated but would still work

references:
samuong/alpaca#68
samuong/alpaca@efd9189
#783
https://forum.cosmos.network/t/cosmos-sdk-blog-tutorial-build-problem/4422
authzed/zed#67
99designs/keyring#66 (comment)
keybase/go-keychain#60
#781

@4coffeeihadbreakfast 4coffeeihadbreakfast changed the title docs -> dev-academy -> Basics -> Environment Setup -> wasmd -> make install -> fails wasmd, make install fails on MacOSX 11.6.7 Jul 25, 2022
@Alec1017
Copy link

Also receiving this same error while trying to install wasmd.

@nhatcl-smartosc
Copy link

I got the same error

@4coffeeihadbreakfast
Copy link
Author

newest release git checkout v0.28.0 also fails.

I was able to get this working. Created a PR

add this line to go.mod

replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4

then run:

go mod tidy
brew install libpq
LDFLAGS= make install

then depending on your PATH

$ wasmd
zsh: command not found: wasmd

$ ls -l ~/go/bin/wasmd
-rwxr-xr-x  1 cfe  staff  69488016 Aug 21 13:48 /Users/cfe/go/bin/wasmd

$  ~/go/bin/wasmd  version
0.28.0

@alpe
Copy link
Member

alpe commented Sep 23, 2022

This should be solved by #985 now.

@alpe alpe closed this as completed Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants