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 issue with QUIC #100

Closed
neosdutertre opened this issue Aug 11, 2023 · 5 comments
Closed

Build issue with QUIC #100

neosdutertre opened this issue Aug 11, 2023 · 5 comments

Comments

@neosdutertre
Copy link

Hello,
I am pretty new to the "build" stuff, Caddy and Coraza (looking for a replacement of modsecurity), so I apologize if the below question seems dumb.
I encounter the below error while building Coraza:

xcaddy build --with github.com/corazawaf/coraza-caddy/v2
using go 1.21.0 on ubuntu 22.04

[go downloads]
...
2023/08/11 14:26:42 [INFO] Build environment ready
2023/08/11 14:26:42 [INFO] Building Caddy
2023/08/11 14:26:42 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -e
2023/08/11 14:26:42 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /home/neocaseadmin/caddy -ldflags -w -s -trimpath
# github.com/quic-go/quic-go/internal/handshake
/home/neocaseadmin/go/pkg/mod/github.com/quic-go/[email protected]/internal/handshake/crypto_setup.go:362:37: cannot use h.allow0RTT (variable of type bool) as tls.QUICSessionTicketOptions value in argument to h.conn.SendSessionTicket
2023/08/11 14:26:44 [INFO] Cleaning up temporary folder: /tmp/buildenv_2023-08-11-1426.587629017
2023/08/11 14:26:44 [FATAL] exit status 1

Any clue ?

thanks,
Stephane

@M4tteoP
Copy link
Member

M4tteoP commented Aug 11, 2023

Hi @neosdutertre, seems like that quic-go build broke between go1.21rc4 and go1.21.0, see quic-go/quic-go#4021. So, in order to build it with Go 1.21 we need quic-go v0.37.4, but currently the indirect dependency Is github.com/quic-go/quic-go v0.37.3 // indirect

More context: caddyserver/caddy#5719 (comment)

@M4tteoP
Copy link
Member

M4tteoP commented Aug 11, 2023

It is a Caddy dependency, updated caddyserver/caddy#5719, it is part of Caddy v2.7.4, not yet released.

You could:

  • Stick with go 1.20, waiting for Caddy v2.7.4.
  • Try to build directly caddy master branch. It should be something like: xcaddy build master --with github.com/corazawaf/coraza-caddy/v2. Or instead of master, you could add also the specific commit sha.

@neosdutertre
Copy link
Author

so that was almost dumb :-)
reverted to golang 1.20 and it is building, now !

Moving forward !
Thanks a lot for your response,

@M4tteoP
Copy link
Member

M4tteoP commented Aug 11, 2023

You are welcome! You are just ahead of time and faster than releases 😄

@jcchavezs
Copy link
Member

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

3 participants