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

Build fails due to dependency issue #2

Open
openoms opened this issue Feb 2, 2022 · 1 comment
Open

Build fails due to dependency issue #2

openoms opened this issue Feb 2, 2022 · 1 comment

Comments

@openoms
Copy link

openoms commented Feb 2, 2022

Trying to build dump_keys as the binary is no longer available (and would also need it for arm64: raspiblitz/raspiblitz#2897):

git clone https://github.com/rsbondi/clightning-go-plugin
cd clightning-go-plugin
go mod init dump_keys
go mod tidy

but fails with:

go: found github.com/mattn/go-sqlite3 in github.com/mattn/go-sqlite3 v1.14.11
go: dump_keys/dump_keys imports
	github.com/btcsuite/btcd/chaincfg: github.com/btcsuite/[email protected]: parsing go.mod:
	module declares its path as: github.com/gcash/bchd
	        but was required as: github.com/btcsuite/btcd
$ go build ./.. ./dump_keys
dump_keys/dump_keys.go:9:2: no required module provides package github.com/btcsuite/btcd/chaincfg; to add it:
	go get github.com/btcsuite/btcd/chaincfg
dump_keys/dump_keys.go:10:2: no required module provides package github.com/btcsuite/btcutil/hdkeychain; to add it:
	go get github.com/btcsuite/btcutil/hdkeychain
dump_keys/dump_keys.go:11:2: no required module provides package github.com/niftynei/glightning/glightning; to add it:
	go get github.com/niftynei/glightning/glightning
dump_keys/dump_keys.go:12:2: no required module provides package github.com/niftynei/glightning/jrpc2; to add it:
	go get github.com/niftynei/glightning/jrpc2
dump_keys/dump_keys.go:13:2: no required module provides package golang.org/x/crypto/hkdf; to add it:
	go get golang.org/x/crypto/hkdf
$ go get github.com/btcsuite/btcd/chaincfg
go get: github.com/btcsuite/[email protected]: parsing go.mod:
	module declares its path as: github.com/gcash/bchd
	        but was required as: github.com/btcsuite/btcd

Likely related to: btcsuite/btcd#1791

Is there an acceptable way around until it is fixed?

@chappjc
Copy link

chappjc commented Feb 7, 2022

You might consider making a go.mod (either in dump_keys or at the root of the repo), and use require github.com/btcsuite/btcd v0.22.0-beta to specify the right version.

Note that very soon you'll need to update your btcutil import from github.com/btcsuite/btcutil to github.com/btcsuite/btcd/btcutil. Both of those have their own module and would need require statements as well if you decide to start using modules to pin your deps.

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

2 participants