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

Missing dependency(?) #16

Closed
Hades32 opened this issue Dec 20, 2018 · 7 comments
Closed

Missing dependency(?) #16

Hades32 opened this issue Dec 20, 2018 · 7 comments

Comments

@Hades32
Copy link
Contributor

Hades32 commented Dec 20, 2018

I wanted to built stellar myself with the built via Docker option (because there are no armhf binaries) and got this

-> building daemon e70a943-dev
../../vendor/github.com/mholt/caddy/caddytls/client.go:30:2: cannot find package "github.com/xenolf/lego/acme" in any of:
        /go/src/github.com/ehazlett/stellar/vendor/github.com/xenolf/lego/acme (vendor tree)
        /usr/local/go/src/github.com/xenolf/lego/acme (from $GOROOT)
        /go/src/github.com/xenolf/lego/acme (from $GOPATH)
make: *** [Makefile:50: daemon] Error 1
 -> Built dev version e70a943 (linux/amd64)

I now manually added a go get ... but now I get

# github.com/ehazlett/stellar/vendor/github.com/mholt/caddy/caddytls
../../vendor/github.com/mholt/caddy/caddytls/config.go:122:10: undefined: acme.KeyType
make: *** [Makefile:50: daemon] Error 2
@ehazlett
Copy link
Owner

I ran into this a lot with some of the caddy dependencies. Let me take a look to see if I can reproduce.

@ehazlett
Copy link
Owner

Ok I was able to reproduce and just pushed a quick fix to the docker build dockerfile. It's not the greatest as the COPY busts the go module vendor but once buildkit integration is fully complete we can leverage that for some better caching. It should be building now (I tested both x86 and arm compiles). Thanks for reporting!

@Hades32
Copy link
Contributor Author

Hades32 commented Dec 22, 2018

Thanks for the quick fix!

Unfortunately I now get a new error which doesn't really help...

go: finding github.com/hashicorp/go-cleanhttp v0.5.0
go: finding github.com/codegangsta/cli v1.20.0
go: finding github.com/ehazlett/element v0.0.0-20181026123607-f8763a7a1632
go: error loading module requirements
The command '/bin/sh -c go mod vendor' returned a non-zero code: 1
Makefile:33: recipe for target 'docker-build' failed
make: *** [docker-build] Error 1

any ideas?

@ehazlett
Copy link
Owner

ugh I'm getting random failures now as well. I'm going to re-think the vendoring and see if I can find why go mod vendor isn't placing all the needed deps in the local vendor.

@ehazlett
Copy link
Owner

OK so some how vendor/github.com/xenolf/acme was added as a submodule. I've fixed it (as well as removed the Go module vendoring for now) so all dependencies should reside in vendor. I also checked on a completely fresh aws instance just to be sure. Thanks for reporting and sorry for the issues!

@Hades32
Copy link
Contributor Author

Hades32 commented Dec 23, 2018

Now it works perfectly! Thanks!

What's the reason for using the vendor dir anyway? Why don't you use go modules only?

@ehazlett
Copy link
Owner

@Hades32 the vendor dir is for backwards compat (pre-Go module versions) and to be able to build locally in the event of a network failure. There is also the issue if someone removes a branch or rebases (I've ran into this as well with Go modules).

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