# github.com/namecoin/btcd/rpcclient
../_gopath/pkg/mod/github.com/namecoin/btcd@v0.22.0-beta/rpcclient/wallet.go:964:36: undefined: btcjson.CreateWalletCmd
../_gopath/pkg/mod/github.com/namecoin/btcd@v0.22.0-beta/rpcclient/chain.go:227:60: undefined:
...
../_gopath/pkg/mod/github.com/namecoin/btcd@v0.22.0-beta/rpcclient/chain.go:545:79: too many errors
# github.com/namecoin/ncrpcclient
../_gopath/pkg/mod/github.com/namecoin/ncrpcclient@v0.1.0/names.go:24:43: undefined: rpcclient.Response
../_gopath/pkg/mod/github.com/namecoin/ncrpcclient@v0.1.0/names.go:29:24: undefined: rpcclient.ReceiveFuture
../_gopath/pkg/mod/github.com/namecoin/ncrpcclient@v0.1.0/names.go:79:11: c.SendCmd undefined (type *Client has no field or method SendCmd)
...
or, if I provide namecoin/btcd in two local directories, path-replaced from github.com/namecoin/btcd and from gitbub.com/btcsuite/btcd then I get this type mismatch error:
# github.com/namecoin/ncprop279
./ncprop279.go:57:30: cannot use connCfg (variable of
type *"github.com/namecoin/btcd/rpcclient".ConnConfig)
as *"github.com/btcsuite/btcd/rpcclient".ConnConfig value
in argument to namecoin.New
There seems to be a type mismatch, indeed:
ncdns/namecoin/namecoin.goimports and declares the arg to the namecoin.New() function argument as "github.com/btcsuite/btcd/rpcclient".
ncprop279.go imports and instantiates"github.com/namecoin/btcd/rpcclient"but then passes it in the call to namecoin.New()
ncprop279.go seems to be the one at fault. The usage of btcsuite/btcd/rpcclient and namecoin/ncrpcclient seem consistent throughout; only ncprop279.go is trying to use namecoin/btcd/rpcclient. Changing this import fixed the build (though I did not test functionality, just that ncprop279 -h executes) :
sed -i 's|"github.com/namecoin/btcd/rpcclient"|"github.com/btcsuite/btcd/rpcclient"|' ncprop279.go
go build
fails with linking errors:or, if I provide namecoin/btcd in two local directories, path-replaced from
github.com/namecoin/btcd
and fromgitbub.com/btcsuite/btcd
then I get this type mismatch error:There seems to be a type mismatch, indeed:
ncdns/namecoin/namecoin.go
imports and declares the arg to thenamecoin.New()
function argument as"github.com/btcsuite/btcd/rpcclient"
.ncprop279.go
imports and instantiates"github.com/namecoin/btcd/rpcclient"
but then passes it in the call tonamecoin.New()
ncprop279.go
seems to be the one at fault. The usage ofbtcsuite/btcd/rpcclient
andnamecoin/ncrpcclient
seem consistent throughout; onlyncprop279.go
is trying to usenamecoin/btcd/rpcclient
. Changing this import fixed the build (though I did not test functionality, just thatncprop279 -h
executes) :Full working build script for Arch package (but relevant to any build) is here (there are a couple separate issues that may go into separate tickets): https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ncprop279