classic-core icon indicating copy to clipboard operation
classic-core copied to clipboard

[BUG] Installation problem on Mac Os Big Sur

Open gerardjk opened this issue 2 years ago • 34 comments

When following the installation instructions on MacOs Big Sur I am encountering the following error from make install which is preventing successful installation

go install -mod=readonly -tags "netgo ledger" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=terra -X github.com/cosmos/cosmos-sdk/version.AppName=terrad -X github.com/cosmos/cosmos-sdk/version.Version=0.5.2-2-gf41a7de -X github.com/cosmos/cosmos-sdk/version.Commit=f41a7de7e1c06ab836d50381c6fe918b64a73483 -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger" -w -s' -trimpath ./cmd/terrad # 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

Is anyone able to give advice on overcoming this problem?

gerardjk avatar Sep 12 '21 08:09 gerardjk

@gerardjk that seems successful message. any problem after installation?

yun-yeo avatar Sep 15 '21 08:09 yun-yeo

Yes I am getting the same thing, guessing this has to do with M1 architecture. This is what happens when trying to run the binary too

dyld: Library not loaded: @rpath/libwasmvm.dylib
  Referenced from: /usr/local/bin/terrad
  Reason: image not found
[1]    62009 abort      terrad --help

cryptoboole avatar Sep 23 '21 16:09 cryptoboole

It seems this is still in effect https://github.com/terra-money/core/issues/548#issuecomment-910185567

cryptoboole avatar Sep 24 '21 14:09 cryptoboole

I am also encountering this same message, but have an intel chip installed. System Details: macOS Big Sur Version 11.6 Processor: Intel Core i7 GoLang: v1.16.8

ZakAyesh avatar Sep 29 '21 21:09 ZakAyesh

@cryptoboole to get this working on an M1, you need to install the x86 version of Go and compile terrad with that version using Rosetta

harryscholes avatar Oct 07 '21 08:10 harryscholes

@harryscholes thank you will attempt this now

cryptoboole avatar Oct 11 '21 12:10 cryptoboole

Regret to inform the original problem in this issue remains even with steps above as mentioned by @harryscholes

go install -mod=readonly -tags "netgo ledger" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=terra -X github.com/cosmos/cosmos-sdk/version.AppName=terrad -X github.com/cosmos/cosmos-sdk/version.Version=0.5.6-2-g884d1f3 -X github.com/cosmos/cosmos-sdk/version.Commit=884d1f3f2056a0dd17e9ddd0bc6b6b836dab8e70 -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger" -w -s' -trimpath ./cmd/terrad
# 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

The issue is in a deprecated function used by the cosmos-sdk as described here, will try to find a work around https://github.com/cosmos/cosmos-sdk/issues/5759

cryptoboole avatar Oct 11 '21 12:10 cryptoboole

@cryptoboole what commit are you doing this on? It works for me on v0.5.6

harryscholes avatar Oct 11 '21 12:10 harryscholes

884d1f3f2056a0dd17e9ddd0bc6b6b836dab8e70 which mac OS version are you running?

cryptoboole avatar Oct 11 '21 12:10 cryptoboole

11.4

harryscholes avatar Oct 11 '21 12:10 harryscholes

11.6 here but I doubt that is the issue... ill keep debugging. Just to confirm @harryscholes (thank you for replying btw)

I am running under i386 using rosetta mode terminal and working on that commit. I am using an x86 version of go to compile...

cryptoboole avatar Oct 11 '21 13:10 cryptoboole

Related Cosmos SDK issues: https://github.com/cosmos/cosmos-sdk/issues/10267 https://github.com/cosmos/cosmos-sdk/issues/5759

harryscholes avatar Oct 13 '21 13:10 harryscholes

stupid question, after I checkout, cd core, and then make install. I am getting make is not a recognized command?

thanks!

RylandCapital avatar Oct 22 '21 17:10 RylandCapital

@cryptoboole does this work?

arch -x86_64 make install

harryscholes avatar Oct 22 '21 19:10 harryscholes

hi guys, any new progress? I am encountering the same issue on mac air too terrad --help dyld: Library not loaded: @rpath/libwasmvm.dylib Referenced from: /Users/xxx/Desktop/terra/./terrad Reason: image not found

Halimao avatar Oct 31 '21 07:10 Halimao

having the same issue with mac 12.1.

@cryptoboole @harryscholes were you guys able to get up and running? Am having issue with v0.5.6 and v0.5.14 and v0.5.14_oracle.

On the mbp 16' 2019

ElasticBottle avatar Dec 30 '21 00:12 ElasticBottle

+1 big issues, definitely a cosmos-sdk thing though

itsdevbear avatar Mar 02 '22 05:03 itsdevbear

Still facing this, any actual solution? No issue linked above actually solved it.

vvllxxdd avatar Mar 02 '22 17:03 vvllxxdd

no actual solution for now, I simply ran the thing on a linux // wsl on windows and it worked fine

ElasticBottle avatar Mar 02 '22 21:03 ElasticBottle

So basically terrad is unusable on Macos. Superb

vvllxxdd avatar Mar 03 '22 11:03 vvllxxdd

+1 here

Worth mentioning that, while this seems to be related to the issues the broader cosmos ecosystem is having with go-keychain, the stack trace points directly to CosmWasm when trying to build terrad.

Ive been able to work around with different go-keychain versions but not luck thus far with terra.

Luckily the LocalTerra repo seems to provide me with an alternative route to getting the functionality i need

tgrecojs avatar Mar 04 '22 01:03 tgrecojs

It seems pretty unbelievable to me that a project this size doesn't have anyone fixing this, bascially rendering their CLI useless to a pretty big user base.

vvllxxdd avatar Mar 10 '22 11:03 vvllxxdd

@vvllxxdd This is pretty harsh... 😶

It seems pretty unbelievable to me that a project this size doesn't have anyone fixing this, bascially rendering their CLI useless to a pretty big user base.

As i mentioned above, I have been able to run LocalTerra on a docker instance. Have 0 issue running the terrad command from within the context of my container.....

tgrecojs avatar Mar 10 '22 16:03 tgrecojs

I was able to build and use on an m1 Mac with CGO_ENABLED=1 GOARCH=amd64 make build and then cp build/terrad ~/go/bin. For some reason, CGO_ENABLED=1 GOARCH=amd64 make install does not work.

zmanian avatar Mar 23 '22 13:03 zmanian

@vvllxxdd This is pretty harsh... 😶

It seems pretty unbelievable to me that a project this size doesn't have anyone fixing this, bascially rendering their CLI useless to a pretty big user base.

As i mentioned above, I have been able to run LocalTerra on a docker instance. Have 0 issue running the terrad command from within the context of my container.....

Yeah but the thing is I don't want to use Local Terra, if I wanted a local env I would've used that.

vvllxxdd avatar Mar 25 '22 12:03 vvllxxdd

I was able to build and use on an m1 Mac with CGO_ENABLED=1 GOARCH=amd64 make build and then cp build/terrad ~/go/bin. For some reason, CGO_ENABLED=1 GOARCH=amd64 make install does not work.

@zmanian I didn’t have any luck doing this unfortunately. Are there any more steps or info you can provide that helped you get it working?

gosseti avatar Mar 25 '22 22:03 gosseti

Sorry to say this, but for a 40 bn market cap blockchain you would think there SHOULD be a better dev support and documentation. Instead, everything is deprecated and outdated. Disappointed, wanted to take a fresh breath from EVMs and Solana, but instead i wasted 3 weeks on Terra and didn't make 1 single mainnet transaction from the terminal.

vvllxxdd avatar Apr 01 '22 14:04 vvllxxdd

I was able to build and use on an m1 Mac with CGO_ENABLED=1 GOARCH=amd64 make build and then cp build/terrad ~/go/bin. For some reason, CGO_ENABLED=1 GOARCH=amd64 make install does not work.

@zmanian thanks u a lot for this!

didnt run the make install, however running ur modified make build cmd succeeded in creating a local terrad instance which i then copied from./build folder into my go/bin directory. smooth sailing thus far 🙌

tgrecojs avatar Apr 01 '22 17:04 tgrecojs

I was able to build and use on an m1 Mac with CGO_ENABLED=1 GOARCH=amd64 make build and then cp build/terrad ~/go/bin. For some reason, CGO_ENABLED=1 GOARCH=amd64 make install does not work.

@zmanian thanks u a lot for this!

didnt run the make install, however running ur modified make build cmd succeeded in creating a local terrad instance which i then copied from./build folder into my go/bin directory. smooth sailing thus far 🙌

@tgrecojs Can you take us through this as a step by step? I’m still yet to get it working and very curious as to how you did it!

gosseti avatar Apr 01 '22 20:04 gosseti

@tgrecojs Can you take us through this as a step by step? I’m still yet to get it working and very curious as to how you did it!

@gosseti for me it was rly just a matter of copying that modified make build cmd and running it within the terra-money/core repo.

really straightforward (thankfully) but in the event that it's helpful, the process from start to finish is detailed in snippet below.

# clone repo && cd into it
~/ git clone https://github.com/terra-money/core && cd core
# execute make build command modified for m1 arch && cd into new build directory 
~/core  CGO_ENABLED=1 GOARCH=amd64 make build
## find go directory using "which"
~/core which go 
/usr/local/go
# copy build/terrad into appropriate directory :)
~/core cp ./build/terrad  /usr/local/go/bin/terrad

maybe i lucked out in this instance with everything working so well so quickly... hope u have the same luck tho 🙂

update want to mention that after i got terrad installed properly, i cloned LocalTerra and executed docker-compose up.

from there, exectuing terrad status verified that my local env was up n running correctly 👍

tgrecojs avatar Apr 01 '22 21:04 tgrecojs