-
Notifications
You must be signed in to change notification settings - Fork 39
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
Trouble building with xcaddy - both 2.5.3 and 2.6.4 #10
Comments
I tried doing this to get rid of the Seems like the solution to these kinds of issues is to do a custom Caddy build so that Go can synchronize dependencies between Caddy and its plugins. Going to try that next. |
Here's at least one way to run this plugin with caddy 2.6.4 using a manual build and Dockerfile. Copy main.go as instructed in the comment in main.go. Also run main.go
This is all you need in go.mod. The rest of the require statements will be set by the go.mod
Dockerfile
And then if you used
I used go version 1.19 because 1.20 ran into issues with the gvisor dependency from caddy-tailscale that didn't support it. Pretty awesome that the build system is so flexible. Really cool system Caddy has for doing custom builds, can't wait to mess with that more now hah. |
We're you successful to build with 2.6.4? If so, consider a PR |
Yes works with 2.6.4 and latest Tailscale 1.36.2. Updating the module itself would be a bit of a different path but I agree that would be great. If I have time I can see if a quick test down that path works right away or has issues. By using the main.go file and entering the modules there, the Go build system automatically syncs dependencies. |
I'm running into issues trying to build with this plugin. I'm hoping to use caddy latest which as of writing this issue is 2.6.4.
First I tried
xcaddy build --with github.com/tailscale/caddy-tailscale
and got the errorpanic: internal error: can't find reason for requirement on github.com/google/pprof
.That led me to this issue which clarifies that this is an upstream Golang issue: caddyserver/caddy#5301
I tried the tip from this comment caddyserver/caddy#5301 (comment) from mholt to try and build using v2.6.4 as well as hopefully solve the above problem.
That leads to a new error message
go: github.com/caddyserver/caddy/v2@2.6.4: invalid version: unknown revision 2.6.4
which is similar to #9. Although I think in my case the cause is described by this stack overflow comment since 2.6.4 probably didn't exist when this plugin was built.At this point I'm going to fork and try to build this plugin using 2.6.4 following these instructions: caddyserver/caddy#5301 (comment)
If I can't get 2.6.4 to build I'll try using the version listed in the dependencies 2.5.3. I'll update here with my findings.
Any help is much appreciated.
The text was updated successfully, but these errors were encountered: