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

Can't build with xcaddy 0.3.2 & Go 1.20.4: can't find reason for requirement #7

Closed
coolaj86 opened this issue May 19, 2023 · 3 comments

Comments

@coolaj86
Copy link

export XCADDY_SUDO=0

xcaddy build \
    --with github.com/caddy-dns/godaddy
panic: internal error: can't find reason for requirement on github.com/google/[email protected]
2023/05/18 22:20:39 [INFO] Temporary folder: /Users/aj/buildenv_2023-05-18-2220.3968038451
2023/05/18 22:20:39 [INFO] Writing main module: /Users/aj/buildenv_2023-05-18-2220.3968038451/main.go
package main

import (
	caddycmd "github.com/caddyserver/caddy/v2/cmd"

	// plug in Caddy modules here
	_ "github.com/caddyserver/caddy/v2/modules/standard"
	_ "github.com/caddy-dns/godaddy"
)

func main() {
	caddycmd.Main()
}
2023/05/18 22:20:39 [INFO] Initializing Go module
2023/05/18 22:20:39 [INFO] exec (timeout=10s): /Users/aj/.local/opt/go/bin/go mod init caddy
go: creating new go.mod: module caddy
go: to add module requirements and sums:
	go mod tidy
2023/05/18 22:20:40 [INFO] Pinning versions
2023/05/18 22:20:40 [INFO] exec (timeout=0s): /Users/aj/.local/opt/go/bin/go get -d -v github.com/caddyserver/caddy/v2
go: downloading github.com/caddyserver/caddy/v2 v2.6.4
go: downloading github.com/caddyserver/caddy v1.0.5
go: downloading github.com/caddyserver/certmagic v0.17.2
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/prometheus/client_golang v1.14.0
go: downloading github.com/quic-go/quic-go v0.32.0
go: downloading go.uber.org/zap v1.24.0
go: downloading golang.org/x/sys v0.5.0
go: downloading golang.org/x/term v0.5.0
go: downloading github.com/klauspost/cpuid/v2 v2.2.3
go: downloading github.com/libdns/libdns v0.2.1
go: downloading github.com/mholt/acmez v1.1.0
go: downloading github.com/miekg/dns v1.1.50
go: downloading golang.org/x/crypto v0.5.0
go: downloading golang.org/x/net v0.7.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.1.2
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/prometheus/client_model v0.3.0
go: downloading github.com/prometheus/common v0.37.0
go: downloading github.com/prometheus/procfs v0.8.0
go: downloading google.golang.org/protobuf v1.28.1
go: downloading github.com/quic-go/qpack v0.4.0
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading github.com/golang/mock v1.6.0
go: downloading github.com/onsi/ginkgo/v2 v2.2.0
go: downloading go.uber.org/atomic v1.9.0
go: downloading go.uber.org/multierr v1.6.0
go: downloading golang.org/x/tools v0.2.0
go: downloading github.com/quic-go/qtls-go1-18 v0.2.0
go: downloading github.com/quic-go/qtls-go1-19 v0.2.0
go: downloading github.com/quic-go/qtls-go1-20 v0.1.0
go: downloading golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading golang.org/x/text v0.7.0
go: downloading golang.org/x/mod v0.6.0
go: downloading github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
go: downloading github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
go: added github.com/beorn7/perks v1.0.1
go: added github.com/caddyserver/caddy/v2 v2.6.4
go: added github.com/caddyserver/certmagic v0.17.2
go: added github.com/cespare/xxhash/v2 v2.1.2
go: added github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
go: added github.com/golang/mock v1.6.0
go: added github.com/golang/protobuf v1.5.2
go: added github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
go: added github.com/google/uuid v1.3.0
go: added github.com/klauspost/cpuid/v2 v2.2.3
go: added github.com/libdns/libdns v0.2.1
go: added github.com/matttproud/golang_protobuf_extensions v1.0.1
go: added github.com/mholt/acmez v1.1.0
go: added github.com/miekg/dns v1.1.50
go: added github.com/onsi/ginkgo/v2 v2.2.0
go: added github.com/prometheus/client_golang v1.14.0
go: added github.com/prometheus/client_model v0.3.0
go: added github.com/prometheus/common v0.37.0
go: added github.com/prometheus/procfs v0.8.0
go: added github.com/quic-go/qpack v0.4.0
go: added github.com/quic-go/qtls-go1-18 v0.2.0
go: added github.com/quic-go/qtls-go1-19 v0.2.0
go: added github.com/quic-go/qtls-go1-20 v0.1.0
go: added github.com/quic-go/quic-go v0.32.0
go: added go.uber.org/atomic v1.9.0
go: added go.uber.org/multierr v1.6.0
go: added go.uber.org/zap v1.24.0
go: added golang.org/x/crypto v0.5.0
go: added golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
go: added golang.org/x/mod v0.6.0
go: added golang.org/x/net v0.7.0
go: added golang.org/x/sys v0.5.0
go: added golang.org/x/term v0.5.0
go: added golang.org/x/text v0.7.0
go: added golang.org/x/tools v0.2.0
go: added google.golang.org/protobuf v1.28.1
2023/05/18 22:20:58 [INFO] exec (timeout=0s): /Users/aj/.local/opt/go/bin/go get -d -v github.com/caddy-dns/godaddy github.com/caddyserver/caddy/v2
go: downloading github.com/caddy-dns/godaddy v1.0.2
panic: internal error: can't find reason for requirement on github.com/google/[email protected]

goroutine 1 [running]:
cmd/go/internal/modget.(*resolver).updateBuildList.func1({{0xc0005b1aa0, 0x17}, {0xc0000309c0, 0x22}})
	/usr/local/go/src/cmd/go/internal/modget/get.go:1760 +0xd4
cmd/go/internal/modget.(*resolver).updateBuildList(0xc0000aa000, {0x17465f8, 0xc00002c0b0}, {0x0, 0x0, 0x0})
	/usr/local/go/src/cmd/go/internal/modget/get.go:1765 +0x54c
cmd/go/internal/modget.(*resolver).resolveQueries(0xc0000aa000, {0x17465f8, 0xc00002c0b0}, {0xc000065860, 0x2, 0xc00010dd70?})
	/usr/local/go/src/cmd/go/internal/modget/get.go:1243 +0x1b1
cmd/go/internal/modget.runGet({0x17465f8, 0xc00002c0b0}, 0xc000026528?, {0xc000022220, 0x2, 0x2})
	/usr/local/go/src/cmd/go/internal/modget/get.go:314 +0x408
main.invoke(0x1a61260, {0xc0000221f0, 0x5, 0x5})
	/usr/local/go/src/cmd/go/main.go:225 +0x3d9
main.main()
	/usr/local/go/src/cmd/go/main.go:179 +0x7ce
2023/05/18 22:21:23 [FATAL] exit status 2
@mholt
Copy link

mholt commented May 19, 2023

This is an unfortunate bug in the Go toolchain:

golang/go#56494

Allegedly it will be fixed in the next release of Go.

@coolaj86
Copy link
Author

coolaj86 commented May 19, 2023

What version of Go can I use that does work?
(I can easily switch versions a la webi [email protected])

@mholt
Copy link

mholt commented May 19, 2023

I don't think any currently-released version of Go has a fix.

I don't remember the details at this point, but you might try using --with github.com/caddyserver/caddy/v2=github.com/caddyserver/caddy/[email protected]

Or updating the Caddy version in this module's go.mod, I can't remember if one of these worked or if that was for the other Go bug.

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