Tag nobrotli doesn't properly work
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 11.3k
- Forks
- 488
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 11
Description
What happened?
Hello, I use Docker image ubuntu:20.04 to compile frankenphp like here https://frankenphp.dev/docs/compile/#compile-the-go-app
here is my command with nobrotli and it works but not at all.
tar -xf main.tar.gz && \
cd frankenphp-main/caddy/frankenphp && \
CGO_CFLAGS=$(php-config --includes) CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" go build -o frankenphp -tags=nobrotli,nowatcher
here is output when nobrotli disabled
#19 276.1 # github.com/google/brotli/go/cbrotli
#19 276.1 /root/go/pkg/mod/github.com/google/brotli/go/cbrotli@v0.0.0-20241111155135-4303850b01d6/writer.go:13:10: fatal error: brotli/encode.h: No such file or directory
#19 276.1 13 | #include <brotli/encode.h>
#19 276.1 | ^~~~~~~~~~~~~~~~~
#19 276.1 compilation terminated.
#19 ERROR: process "/bin/sh -c tar -xf main.tar.gz && cd frankenphp-main/caddy/frankenphp && CGO_CFLAGS=$(php-config --includes) CGO_LDFLAGS=\"$(php-config --ldflags) $(php-config --libs)\" go build -o frankenphp -tags=nowatcher" did not complete successfully: exit code: 1
------
> [builder 15/15] RUN tar -xf main.tar.gz && cd frankenphp-main/caddy/frankenphp && CGO_CFLAGS=$(php-config --includes) CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" go build -o frankenphp -tags=nowatcher:
236.8 go: downloading github.com/bits-and-blooms/bitset v1.20.0
276.1 # github.com/google/brotli/go/cbrotli
276.1 /root/go/pkg/mod/github.com/google/brotli/go/cbrotli@v0.0.0-20241111155135-4303850b01d6/writer.go:13:10: fatal error: brotli/encode.h: No such file or directory
276.1 13 | #include <brotli/encode.h>
276.1 | ^~~~~~~~~~~~~~~~~
276.1 compilation terminated.
and here is when nobrotli enabled
#19 265.9 # github.com/google/brotli/go/cbrotli
#19 265.9 /root/go/pkg/mod/github.com/google/brotli/go/cbrotli@v0.0.0-20241111155135-4303850b01d6/reader.go:13:10: fatal error: brotli/decode.h: No such file or directory
#19 265.9 13 | #include <brotli/decode.h>
#19 265.9 | ^~~~~~~~~~~~~~~~~
#19 265.9 compilation terminated.
#19 ERROR: process "/bin/sh -c tar -xf main.tar.gz && cd frankenphp-main/caddy/frankenphp && CGO_CFLAGS=$(php-config --includes) CGO_LDFLAGS=\"$(php-config --ldflags) $(php-config --libs)\" go build -o frankenphp -tags=nobrotli,nowatcher" did not complete successfully: exit code: 1
------
> [builder 15/15] RUN tar -xf main.tar.gz && cd frankenphp-main/caddy/frankenphp && CGO_CFLAGS=$(php-config --includes) CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" go build -o frankenphp -tags=nobrotli,nowatcher:
215.9 go: downloading github.com/bits-and-blooms/bitset v1.20.0
265.9 # github.com/google/brotli/go/cbrotli
265.9 /root/go/pkg/mod/github.com/google/brotli/go/cbrotli@v0.0.0-20241111155135-4303850b01d6/reader.go:13:10: fatal error: brotli/decode.h: No such file or directory
265.9 13 | #include <brotli/decode.h>
265.9 | ^~~~~~~~~~~~~~~~~
265.9 compilation terminated.
difference is in encode.h | decode.h
look like brotli still used in project but I really don't need it
Build Type
Custom (tell us more in the description)
Worker Mode
No
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
-
Relevant log output
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documented compile flow and the caddy/frankenphp entry point used by the reported go build command. Reproduce both nowatcher builds in ubuntu:20.04, then trace why github.com/google/brotli/go/cbrotli is compiled despite the nobrotli tag. Done means the nobrotli build completes without requiring brotli/encode.h or brotli/decode.h.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, php
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100