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

Make build-linux Target Fails #1500

Closed
alexanderbez opened this issue Jul 2, 2018 · 6 comments
Closed

Make build-linux Target Fails #1500

alexanderbez opened this issue Jul 2, 2018 · 6 comments
Assignees
Labels

Comments

@alexanderbez
Copy link
Contributor

On the latest develop (feb3acd), the make target build-linux fails with:

GOOS=linux GOARCH=amd64 /Library/Developer/CommandLineTools/usr/bin/make build
go build -tags netgo -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=feb3acdb" -o build/gaiad ./cmd/gaia/cmd/gaiad
# github.com/cosmos/cosmos-sdk/vendor/github.com/zondax/ledger-goclient
vendor/github.com/zondax/ledger-goclient/ledger.go:76:18: undefined: hid.Devices
vendor/github.com/zondax/ledger-goclient/ledger.go:99:18: undefined: hid.Devices
make[1]: *** [build] Error 2
make: *** [build-linux] Error 2

As @ebuchman suggested, we should have build tags to support ledger/keybase integration. However, this is not trivial as it stands due to the way said code is structured. It'll need some minor refactoring to facilitate this.

@cwgoes
Copy link
Contributor

cwgoes commented Jul 2, 2018

make build-linux works fine for me; are you perchance running this on a Mac? Perhaps we need to package the HID library differently for OS X.

@alexanderbez
Copy link
Contributor Author

alexanderbez commented Jul 2, 2018

@cwgoes yes, this was ran on a mac. More specifically:

ProductName:    Mac OS X
ProductVersion: 10.13.4
BuildVersion:   17E199

@ebuchman
Copy link
Member

ebuchman commented Jul 2, 2018

See #1502

I think it would be ideal if we could refactor a little bit so it's easier to toggle building things that require CGO

@ValarDragon
Copy link
Contributor

ValarDragon commented Jul 6, 2018

Note, on a clean ubuntu server install, I get the following error with make install. CGO assumes GCC, which isn't in our installation scripts. (not sure if its in the installation readme either)

root@internal-testnet:~/goApps/src/github.com/cosmos/cosmos-sdk# make install
go install -tags netgo -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=1f3ab37" ./cmd/gaia/cmd/gaiad
# github.com/cosmos/cosmos-sdk/vendor/github.com/brejski/hid
exec: "gcc": executable file not found in $PATH
Makefile:40: recipe for target 'install' failed
make: *** [install] Error 2

Agreed we need to add a build flag.

@ValarDragon ValarDragon self-assigned this Jul 6, 2018
@ValarDragon
Copy link
Contributor

ValarDragon commented Jul 6, 2018

Do we want to make the build flag here "Cgo and Ledger=True", or just have everything with cgo install the ledger. I suggest requiring both before attempting ledger installation.

@ValarDragon
Copy link
Contributor

Closing in favor of #1581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants