avash icon indicating copy to clipboard operation
avash copied to clipboard

Broken dependencies

Open dben89x opened this issue 3 years ago • 2 comments

After going through a fresh install of go and this package, I get the following after running go build:

../avalanchego/utils/crypto/secp256k1r.go:15:2: cannot find package "github.com/decred/dcrd/dcrec/secp256k1/v3" in any of:
	/usr/local/go/src/github.com/decred/dcrd/dcrec/secp256k1/v3 (from $GOROOT)
	/Users/doug/go/src/github.com/decred/dcrd/dcrec/secp256k1/v3 (from $GOPATH)
../avalanchego/utils/crypto/secp256k1r.go:13:2: cannot find package "github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa" in any of:
	/usr/local/go/src/github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa (from $GOROOT)
	/Users/doug/go/src/github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa (from $GOPATH)
../../spf13/viper/internal/encoding/hcl/codec.go:8:2: cannot find package "github.com/hashicorp/hcl/hcl/printer" in any of:
	/usr/local/go/src/github.com/hashicorp/hcl/hcl/printer (from $GOROOT)
	/Users/doug/go/src/github.com/hashicorp/hcl/hcl/printer (from $GOPATH)

The first two can be resolved by changing the following lines in ava-labs/avalanchego/utils/crypto/secp256k1r.go:

"github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa" to "github.com/decred/dcrd/dcrec/secp256k1/ecdsa" secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v3" to secp256k1 "github.com/decred/dcrd/dcrec/secp256k1"

Output from ls in ~/go/src/github.com/decred/dcrd/dcrec/secp256k1:

README.md			ecdh_test.go			field.go			loadprecomputed.go		privkey_test.go
bench_test.go			ecdsa				field_bench_test.go		modnscalar.go			pubkey.go
compressedbytepoints.go		ellipticadaptor.go		field_test.go			modnscalar_bench_test.go	pubkey_test.go
curve.go			ellipticadaptor_test.go		genprecomps.go			modnscalar_test.go		schnorr
curve_test.go			error.go			genstatics.go			nonce.go
doc.go				error_test.go			go.mod				nonce_test.go
ecdh.go				example_test.go			go.sum				privkey.go

I'm not sure how to resolve the last one, as I'm not familiar with the package. But it seems its directory structure has been altered.

Output from ls in ~/go/src/github.com/hashicorp/hcl:

CHANGELOG.md			eval_context.go			guide				json				schema.go
LICENSE				expr_call.go			hcldec				merged.go			spec.md
README.md			expr_list.go			hcled				merged_test.go			specsuite
cmd				expr_map.go			hclparse			ops.go				static_expr.go
diagnostic.go			expr_unwrap.go			hclsimple			ops_test.go			structure.go
diagnostic_text.go		ext				hclsyntax			pos.go				structure_at_pos.go
diagnostic_text_test.go		go.mod				hcltest				pos_scanner.go			traversal.go
didyoumean.go			go.sum				hclwrite			pos_scanner_test.go		traversal_for_expr.go
doc.go				gohcl				integrationtest			pos_test.go			traversal_for_expr_test.go

My go version:

go version go1.17.4 darwin/amd64

I'm unsure whether this is an isolated issue with just my environment, but considering I just did a fresh install of go, I doubt it.

dben89x avatar Dec 06 '21 01:12 dben89x

any resolution to this?

theprojectabot avatar Jan 02 '22 02:01 theprojectabot

I found that doing: export GO111MODULE=auto then go get github.com/ava-labs/avash cd $GOPATH/src/github.com/ava-labs/avash go build

resolved this all

theprojectabot avatar Jan 02 '22 02:01 theprojectabot