Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ The recommended way is to use [xcaddy](https://github.com/caddyserver/xcaddy) to
```console
CGO_ENABLED=1 \
XCADDY_GO_BUILD_FLAGS="-ldflags='-w -s' -tags=nobadger,nomysql,nopgx" \
CGO_CFLAGS=$(php-config --includes) \
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
CGO_CFLAGS="$(php-config --includes)" \
CGO_LDFLAGS="$(php-config --ldflags) -L$(php-config --prefix)/lib $(php-config --libs)" \
xcaddy build \
--output frankenphp \
--with github.com/dunglas/frankenphp/caddy \
Expand All @@ -121,6 +121,8 @@ xcaddy build \

```

If your distribution provides a versioned command such as `php-config-zts` or `php-config8.4`, use that command consistently in the `CGO_CFLAGS` and `CGO_LDFLAGS` values.

> [!TIP]
>
> If you're using musl libc (the default on Alpine Linux) and Symfony,
Expand All @@ -138,5 +140,5 @@ Alternatively, it's possible to compile FrankenPHP without `xcaddy` by using the
```console
curl -L https://github.com/php/frankenphp/archive/refs/heads/main.tar.gz | tar xz
cd frankenphp-main/caddy/frankenphp
CGO_CFLAGS=$(php-config --includes) CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" go build -tags=nobadger,nomysql,nopgx
../../go.sh build
```