go get github.com/caddyserver/caddy/caddy
Should compile and produce a binary in GOPATH:/bin/
Similarly to what happens here: https://github.com/caddyserver/caddy/issues/3003. Here's the output:
$ go get github.com/caddyserver/caddy/caddy
# github.com/caddyserver/caddy/caddytls
go/src/github.com/caddyserver/caddy/caddytls/tls.go:80:42: not enough arguments in call to certmagic.NewDefault().RevokeCert
have (string, bool)
want (context.Context, string, bool)
I managed to fix it by regressing certmagic. How I did it below:
$ cd go/src/github.com/mholt/certmagic/
$ git checkout 32e52d625259ceb3254d291a3d0ba78ff1a7ac9b
Note: switching to '32e52d625259ceb3254d291a3d0ba78ff1a7ac9b'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 32e52d6 Create FUNDING.yml
$ cd ~
$ go get github.com/caddyserver/caddy/caddy
When it did build, I went to run it and here was the output:
$ go/bin/caddy
panic: qtls.ConnectionState not compatible with tls.ConnectionState
goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
/usr/home/freebsd/go/src/github.com/lucas-clemente/quic-go/internal/handshake/unsafe.go:17 +0x1aa
$ uname
FreeBSD
$ uname -r
12.1-RELEASE-p1
$ go version
go version go1.13.5 freebsd/amd64
By the way, I've spun a new FreeBSD droplet on DigitalOcean to test. All the commands (i.e. go get github.com/caddyserver/caddy and go get github.com/caddyserver/caddy/caddy) work with no issues.
@Mohammed90 awesome. I'll give it a try.
@Mohammed90 can you explain your build procedure? I'm sure it's probably different from:
go get github.com/caddyserver/caddy/caddy
(Still not working out for me on RELEASE-12.1)
Confirming same issue here. I am on 16.04.6
Confirming same issue on 18.04
@Mohammed90 what was your build procedure? Did you modify anything or install any particular packages for it to work?
@jaredwolff I tried to retrace my steps and couldn't arrive at the same results of successful . Sorry, not sure how I messed up my earlier troubleshooting. The root cause seems to be that go get command fetches master of both repos, even though go.mod of Caddy specifically says github.com/mholt/certmagic v0.8.3. The workaround I have handy is to git clone github.com/caddyserver/caddy somewhere locally and build Caddy from there.
I was able to get the latest beta compiling on FreeBSD. (following the instructions in the Readme) For anyone curious here we're the steps. Closing this out.
Most helpful comment
I was able to get the latest beta compiling on FreeBSD. (following the instructions in the Readme) For anyone curious here we're the steps. Closing this out.