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

Build failed #7

Open
heavygale opened this issue Jun 8, 2024 · 2 comments
Open

Build failed #7

heavygale opened this issue Jun 8, 2024 · 2 comments

Comments

@heavygale
Copy link

The Build in the web-downloader is failing:
https://caddyserver.com/download?package=github.com%2Fcaddy-dns%2Fnetcup

Adding the module via command line also fails:

# caddy add-package github.com/caddy-dns/netcup
2024/06/08 21:38:46.258	INFO	this executable will be replaced	{"path": "/usr/bin/caddy"}
2024/06/08 21:38:46.258	INFO	requesting build	{"os": "linux", "arch": "amd64", "packages": ["github.com/caddy-dns/netcup"]}
Error: download failed: download failed: HTTP 400: unable to fulfill download request (id=89ff3b75-78e1-4fcc-b9e2-f0d161c44534)

Should I try compiling it using xcaddy as this might be an error in the downloader or is there something wrong with the module itself?

@hypervtechnics
Copy link

I am building using xcaddy and get this error during the build:

62.54 2024/06/15 12:58:19 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /usr/bin/caddy -ldflags -w -s -trimpath -tags nobadger
73.68 # github.com/libdns/netcup
73.68 /go/pkg/mod/github.com/libdns/[email protected]/util.go:27:14: cannot use record.Priority (variable of type int) as uint value in struct literal
73.68 /go/pkg/mod/github.com/libdns/[email protected]/util.go:43:17: cannot use record.Priority (variable of type uint) as int value in struct literal
98.46 2024/06/15 12:58:55 [INFO] Skipping cleanup as requested; leaving folder intact: /tmp/buildenv_2024-06-15-1257.275866987
98.46 2024/06/15 12:58:55 [FATAL] exit status 1

@hypervtechnics
Copy link

I see a fix was merged in libdns/netcup#1, checking this out and running go build also succeeds.

In the logs of the build of xcaddy I also see:

30.95 2024/06/15 13:00:23 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddy-dns/netcup github.com/caddyserver/caddy/[email protected]
31.17 go: downloading github.com/caddy-dns/netcup v0.1.0
31.24 go: downloading github.com/libdns/netcup v0.1.0
31.52 go: added github.com/caddy-dns/netcup v0.1.0
31.52 go: added github.com/libdns/netcup v0.1.0

This probably says that only the (very old) v0.1.0 tag gets downloaded and not the version in main with the fix in it. So I used this xcaddy parameter: --with github.com/caddy-dns/netcup@a811da94403509715bd149669b07544706fd6d46.

This fixed the build and can be used as a workaround until the maintainers update the git tag.

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