12/08にリリースされたFrankenPHP触ってみた

# FrankenPHPってなに？
Go言語で書かれたモダンなPHPアプリケーションサーバーだそうです。
サイトはこちら👇
https://frankenphp.dev/docs/

![スクリーンショット 2023-12-08 12.12.47.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/14268/9daeaeaa-3cc5-6732-7bbb-ee8f94920972.png)


[ドキュメントサイト](https://frankenphp.dev/docs/)も作成されていました。

AdventCalendarの締め切りも近づいてたので、ちょっと触ってみるかということで触ってみました。

# インストール
インストールというよりは、Dockerで動かしてみることができるようです。

```bash
$ docker run -v $PWD:/app/public \
    -p 80:80 -p 443:443 \
    dunglas/frankenphp
```

Go言語で書かれているので、[GithubのReleases](https://github.com/dunglas/frankenphp/releases)からバイナリをダウンロードして実行することもできるようです。

取り急ぎ、Dockerで良いやということで動かしてみました。

```bash
$ docker run -v $PWD:/app/public \
    -p 80:80 -p 443:443 \
    dunglas/frankenphp
Unable to find image 'dunglas/frankenphp:latest' locally
latest: Pulling from dunglas/frankenphp
2c6d21737d83: Pull complete
92f459fbdcda: Pull complete
f47c20ea5e2a: Pull complete
1dc98159c6c0: Pull complete
c58f9b317b86: Pull complete
a90e6b079301: Pull complete
d32380b437a5: Pull complete
513b828ec666: Pull complete
31c799f9e5b6: Pull complete
2d5e6ca546a9: Pull complete
3691e9d8f327: Pull complete
fabbaf6fb713: Pull complete
1c057111ac0c: Pull complete
0df0667e9f74: Pull complete
4e4d18c35573: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:86b53988b287c0438f96f3d834e27e0e615244bcc88b1118f9b57b3cb5ebe2ea
Status: Downloaded newer image for dunglas/frankenphp:latest
{"level":"info","ts":1702004969.3801627,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1702004969.3855362,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":16}
{"level":"info","ts":1702004969.389624,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//[::1]:2019","//127.0.0.1:2019","//localhost:2019"]}
{"level":"info","ts":1702004969.3897922,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
{"level":"info","ts":1702004969.3898108,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
{"level":"info","ts":1702004969.3901534,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0x40000b2300"}
{"level":"info","ts":1702004969.4000754,"msg":"FrankenPHP started 🐘","php_version":"8.3.0"}
{"level":"info","ts":1702004969.400238,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/data/caddy"}
{"level":"info","ts":1702004969.400756,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"warn","ts":1702004969.4622707,"logger":"pki.ca.local","msg":"installing root certificate (you might be prompted for password)","path":"storage:pki/authorities/local/root.crt"}
{"level":"info","ts":1702004969.4635277,"msg":"warning: \"certutil\" is not available, install \"certutil\" with \"apt install libnss3-tools\" or \"yum install nss-tools\" and try again"}
{"level":"info","ts":1702004969.463765,"msg":"define JAVA_HOME environment variable to use the Java trust"}
{"level":"info","ts":1702004970.4351506,"msg":"certificate installed properly in linux trusts"}
{"level":"info","ts":1702004970.4354,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}
{"level":"info","ts":1702004970.4355407,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details."}
{"level":"info","ts":1702004970.4359136,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1702004970.4359539,"logger":"http.log","msg":"server running","name":"remaining_auto_https_redirects","protocols":["h1","h2","h3"]}
{"level":"info","ts":1702004970.4359574,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["localhost"]}
{"level":"info","ts":1702004970.4362216,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1702004970.4362373,"msg":"serving initial configuration"}
{"level":"info","ts":1702004970.4362538,"logger":"tls.obtain","msg":"acquiring lock","identifier":"localhost"}
{"level":"info","ts":1702004970.4385457,"logger":"tls.obtain","msg":"lock acquired","identifier":"localhost"}
{"level":"info","ts":1702004970.438589,"logger":"tls.obtain","msg":"obtaining certificate","identifier":"localhost"}
{"level":"info","ts":1702004970.4395256,"logger":"tls.obtain","msg":"certificate obtained successfully","identifier":"localhost"}
{"level":"info","ts":1702004970.4395614,"logger":"tls.obtain","msg":"releasing lock","identifier":"localhost"}
{"level":"warn","ts":1702004970.4397295,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [localhost]: no OCSP server specified in certificate","identifiers":["localhost"]}
```

なるほど🤔ログはJSONで出るのね👀
HTTPSでも動かせる❓ということで、HTTPSでアクセス `https://localhost` してみました。

![スクリーンショット 2023-12-08 12.24.37.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/14268/40989680-cae9-633e-01a6-1ba6477421be.png)

確かに、オレオレ証明書で動作していそう🤔そのままアクセスすると、、、、、

![スクリーンショット 2023-12-08 12.29.21.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/14268/2a4b9f99-f87c-a81e-8919-ed896609bd99.png)


まあ、そうだよね🤔PHPファイルも何も用意してないもんね💦

ログはこんな感じで出ていました。

```bash
2023/12/08 03:24:40.400 ERROR   http.log.access.log0    handled request {"request": {"remote_ip": "172.17.0.1", "remote_port": "43302", "client_ip": "172.17.0.1", "proto": "HTTP/2.0", "method": "GET", "host": "localhost", "uri": "/", "headers": {"Sec-Ch-Ua": ["\"Google Chrome\";v=\"119\", \"Chromium\";v=\"119\", \"Not?A_Brand\";v=\"24\""], "Sec-Fetch-Mode": ["navigate"], "Sec-Fetch-User": ["?1"], "Sec-Fetch-Dest": ["document"], "Accept-Language": ["ja,en-US;q=0.9,en;q=0.8"], "Sec-Ch-Ua-Platform": ["\"macOS\""], "Upgrade-Insecure-Requests": ["1"], "User-Agent": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"], "Sec-Fetch-Site": ["none"], "Accept-Encoding": ["gzip, deflate, br"], "Sec-Ch-Ua-Mobile": ["?0"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"], "Cache-Control": ["max-age=0"], "Cookie": []}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": "localhost"}}, "bytes_read": 0, "user_id": "", "duration": 0.002210625, "size": 0, "status": 404, "resp_headers": {"Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"]}}
```

# PHPファイルを用意してみる
`phpinfo.php` を用意してみました。

```bash
$ ls
phpinfo.php

$ cat phpinfo.php
<?
echo phpinfo();
?>
```

そのまま `https://localhost/phpinfo.php` へアクセス❗

![スクリーンショット 2023-12-08 12.32.51.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/14268/d8e7f9b1-599e-c2b6-43bc-fc666a8bc529.png)

dockerイメージをそのまま起動したからですかね🤔PHPは8.3.0が動いているようです。
Server APIにはこのアプリケーションサーバの名前が出ていました。👀

![ServerAPI表記](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/14268/53cfa1b8-6ab5-38e5-163e-63690622232a.png)

phpinfoの中身も全体的に見てみると、、、、、、、公開はしてほしくない情報もまあ出てましたね💦(隠してます)
ですが、PHPのアプリケーションサーバとして必要になりそうな PDO、openssl、json、mbstringなどはだいたい入ってました。

![phpinfo全体](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/14268/5df2988f-6293-799b-9c8a-e8e3d8951ca6.png)

# PHPのフレームワークへの対応とかはどうなってる？
確認してみると、WordpressやLaravel等にも対応していました。

* [Symfony](https://github.com/dunglas/symfony-docker)
* [API Platform](https://api-platform.com/docs/distribution/)
* [Laravel](https://frankenphp.dev/docs/laravel/)
* [Sulu](https://sulu.io/blog/running-sulu-with-frankenphp)
* [WordPress](https://github.com/dunglas/frankenphp-wordpress)
* [Drupal](https://github.com/dunglas/frankenphp-drupal)
* [Joomla](https://github.com/alexandreelise/frankenphp-joomla)

# HTTPS対応がされてるのはどうやってるのかな❓
ドキュメントサイトを確認するとわかりますが、CaddyというWebサーバーを使っているようです。
このCaddyについてもGo言語で実装されたwebサーバーのようで、こちらの説明については他の記事に譲ります。

# 他の機能は❓
ワーカーモードがあったり、アーリーヒントに対応してたり、Mercureと呼ばれるプロトコルを使ったリアルタイム通信に対応していたりと、機能が豊富でした。
Mercureは、PHPのフレームワークであるSymfonyの作者であるFabien Potencier氏が作成したプロトコルのようです。（ググったらメルキュールホテルばっかり出てきて大変だったｗ 💦 けど、Github Copilotさんが書きたかったこと教えてくれてやっぱり便利💓）

# やっぱりPHP8系じゃないと動かない❓
はい、PHP8.2以降と互換性があると記載があります。

```
FrankenPHP is compatible with the PHP 8.2 and superior.
```

# Goみたいにバイナリにできるみたい❓
下記のとおりできそうなページがあったので、やってみました。

[FrankenPHP | Create a Static Build](https://frankenphp.dev/docs/static/)

```bash
$ git clone https://github.com/dunglas/frankenphp
Cloning into 'frankenphp'...
remote: Enumerating objects: 1567, done.
remote: Counting objects: 100% (890/890), done.
remote: Compressing objects: 100% (348/348), done.
remote: Total 1567 (delta 687), reused 611 (delta 539), pack-reused 677
Receiving objects: 100% (1567/1567), 1021.10 KiB | 4.77 MiB/s, done.
Resolving deltas: 100% (967/967), done.
$ cd frankenphp
$ ./build-static.sh
Cloning into 'static-php-cli'...
remote: Enumerating objects: 276, done.
remote: Counting objects: 100% (276/276), done.
remote: Compressing objects: 100% (204/204), done.
remote: Total 276 (delta 105), reused 152 (delta 68), pack-reused 0
Receiving objects: 100% (276/276), 152.03 KiB | 926.00 KiB/s, done.
Resolving deltas: 100% (105/105), done.
composer 2.6.4 is already installed but outdated (so it will be upgraded).

# MacOS用の場合、Homebrewがインストールされてることが必要みたい💦 なんか色々インストールされた❓
$ ./build-static.sh
Already up to date.
composer 2.6.4 is already installed but outdated (so it will be upgraded).
==> Fetching dependencies for composer: openssl@3, gettext, rtmpdump, jpeg-xl, gd and libpq
==> Fetching openssl@3
==> Fetching gettext

### 色々brewで入れたものがアップデート走ってた

### Composerで各種パッケージをインストールがはじまった
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 17 installs, 0 updates, 0 removals
  - Downloading illuminate/conditionable (v10.33.0)
  - Downloading illuminate/contracts (v10.33.0)
  - Downloading illuminate/macroable (v10.33.0)
  - Downloading symfony/polyfill-mbstring (v1.28.0)
  - Downloading symfony/polyfill-intl-normalizer (v1.28.0)
  - Downloading symfony/polyfill-intl-grapheme (v1.28.0)
  - Downloading symfony/polyfill-ctype (v1.28.0)
  - Downloading symfony/string (v6.3.8)
  - Downloading symfony/service-contracts (v3.4.0)
  - Downloading symfony/console (v6.3.8)
  - Downloading illuminate/collections (v10.33.0)
  - Downloading laravel/prompts (v0.1.13)
  - Downloading zhamao/logger (1.1.1)
  - Installing illuminate/conditionable (v10.33.0): Extracting archive
  - Installing psr/simple-cache (3.0.0): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing illuminate/contracts (v10.33.0): Extracting archive
  - Installing illuminate/macroable (v10.33.0): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.28.0): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.28.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.28.0): Extracting archive
  - Installing symfony/polyfill-ctype (v1.28.0): Extracting archive
  - Installing symfony/string (v6.3.8): Extracting archive
  - Installing symfony/service-contracts (v3.4.0): Extracting archive
  - Installing symfony/deprecation-contracts (v3.4.0): Extracting archive
  - Installing symfony/console (v6.3.8): Extracting archive
  - Installing illuminate/collections (v10.33.0): Extracting archive
  - Installing laravel/prompts (v0.1.13): Extracting archive
  - Installing psr/log (3.0.0): Extracting archive
  - Installing zhamao/logger (1.1.1): Extracting archive
Generating optimized autoload files
8 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
     _        _   _                 _
 ___| |_ __ _| |_(_) ___      _ __ | |__  _ __
/ __| __/ _` | __| |/ __|____| '_ \| '_ \| '_ \
\__ \ || (_| | |_| | (_|_____| |_) | | | | |_) |
|___/\__\__,_|\__|_|\___|    | .__/|_| |_| .__/   v2.0.0-rc8
                             |_|         |_|
Checking if current OS are supported ... Darwin arm64, supported
Checking if homebrew has installed ... ok
Checking if necessary tools are installed ... ok
Doctor check complete !
     _        _   _                 _
 ___| |_ __ _| |_(_) ___      _ __ | |__  _ __
/ __| __/ _` | __| |/ __|____| '_ \| '_ \| '_ \
\__ \ || (_| | |_| | (_|_____| |_) | | | | |_) |
|___/\__\__,_|\__|_|\___|    | .__/|_| |_| .__/   v2.0.0-rc8
                             |_|         |_|
[04:21:36] [INFO] Fetching source php-src [1/27]
[04:22:26] [INFO] Fetching source pkg-config [3/27]
[04:22:30] [INFO] Fetching source apcu [4/27]
[04:22:32] [INFO] Fetching source redis [5/27]
Note: switching to '98d64ba86f37d2d3048500461f50b05f302f36ea'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

[04:22:40] [INFO] Fetching source bzip2 [6/27]
[04:22:45] [INFO] Fetching source zlib [7/27]
[04:22:47] [INFO] Fetching source openssl [8/27]
[04:22:50] [INFO] Fetching source libssh2 [9/27]
[04:22:54] [INFO] Fetching source brotli [10/27]
[04:22:57] [INFO] Fetching source nghttp2 [11/27]
[04:23:00] [INFO] Fetching source zstd [12/27]
[04:23:02] [INFO] Fetching source curl [13/27]
[04:23:05] [INFO] Fetching source libiconv [14/27]
[04:23:18] [INFO] Fetching source icu [16/27]
[04:23:22] [INFO] Fetching source libxml2 [17/27]
[04:23:24] [INFO] Fetching source libpng [18/27]
[04:23:33] [INFO] Fetching source libavif [19/27]
[04:23:38] [INFO] Fetching source libwebp [20/27]
[04:23:39] [INFO] Fetching source libjpeg [21/27]
[04:23:43] [INFO] Fetching source freetype [22/27]
Note: switching to '920c5502cc3ddda88f6c7d85ee834ac611bb11cc'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

[04:23:52] [INFO] Fetching source onig [23/27]
[04:23:55] [INFO] Fetching source sqlite [24/27]
[04:23:58] [INFO] Fetching source ncurses [25/27]
[04:24:03] [INFO] Fetching source readline [26/27]
[04:24:08] [INFO] Fetching source libzip [27/27]
[04:24:10] [INFO] Download complete, used 154.942 s !
     _        _   _                 _
 ___| |_ __ _| |_(_) ___      _ __ | |__  _ __
/ __| __/ _` | __| |/ __|____| '_ \| '_ \| '_ \
\__ \ || (_| | |_| | (_|_____| |_) | | | | |_) |
|___/\__\__,_|\__|_|\___|    | .__/|_| |_| .__/   v2.0.0-rc8
                             |_|         |_|
[04:24:11] [INFO] [EXEC] sysctl -n hw.ncpu
[04:24:11] [INFO] Build target: embed
[04:24:11] [INFO] Enabled extensions: apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, exif, fileinfo, filter, zlib, gd, iconv, intl, mbstring, mbregex, mysqlnd, mysqli, opcache, openssl, pcntl, pdo, pdo_mysql, sqlite3, pdo_sqlite, phar, posix, readline, session, redis, simplexml, sockets, sysvsem, tokenizer, xml, xmlreader, xmlwriter, zip
[04:24:11] [INFO] Required libraries: zlib, libpng, bzip2, freetype, libjpeg, libavif, libwebp, libiconv, openssl, libzip, curl, icu, libxml2, onig, sqlite, ncurses, readline
[04:24:13] [INFO] extracting pkg-config source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/pkg-config ...
[04:24:13] [INFO] extracting zlib source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/zlib ...
[04:24:13] [INFO] extracting libpng source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libpng ...
[04:24:13] [INFO] extracting bzip2 source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/bzip2 ...
[04:24:13] [INFO] extracting freetype source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/freetype ...
[04:24:13] [INFO] extracting libjpeg source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libjpeg ...
[04:24:14] [INFO] extracting libavif source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libavif ...
[04:24:14] [INFO] extracting libwebp source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libwebp ...
[04:24:14] [INFO] extracting libiconv source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libiconv ...
[04:24:14] [INFO] extracting openssl source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/openssl ...
[04:24:17] [INFO] extracting libzip source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libzip ...
[04:24:18] [INFO] extracting curl source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/curl ...
[04:24:19] [INFO] extracting icu source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/icu ...
[04:24:20] [INFO] extracting libxml2 source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libxml2 ...
[04:24:22] [INFO] extracting onig source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/onig ...
[04:24:22] [INFO] extracting sqlite source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/sqlite ...
[04:24:22] [INFO] extracting ncurses source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/ncurses ...
[04:24:22] [INFO] extracting readline source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/readline ...
[04:24:23] [INFO] Building required library [pkg-config]
[04:24:23] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/pkg-config
[04:24:23] [INFO] [EXEC] CFLAGS='--target=arm64-apple-darwin -Wimplicit-function-declaration' ./configure --disable-shared --enable-static --with-internal-glib --prefix=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot --without-sysroot --without-system-include-path --without-system-library-path --without-pc-path
[04:25:49] [INFO] [EXEC] make clean
[04:25:50] [INFO] [EXEC] make -j10
[04:25:57] [INFO] [EXEC] make install
[04:25:58] [INFO] lib [pkg-config] build success
[04:25:58] [INFO] Building required library [zlib]
[04:25:58] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/zlib
[04:25:58] [INFO] [EXEC] ./configure --static --prefix=
[04:26:00] [INFO] [EXEC] make clean
[04:26:00] [INFO] [EXEC] make -j10
[04:26:01] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:26:01] [INFO] Patching library [zlib] pkgconfig
[04:26:01] [INFO] lib [zlib] build success
[04:26:01] [INFO] Building required library [libpng]
[04:26:01] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libpng
[04:26:01] [INFO] [EXEC] chmod +x ./configure
[04:26:01] [INFO] [EXEC] chmod +x ./install-sh
[04:26:01] [INFO] [EXEC] ./configure --host=aarch64-apple-darwin --disable-shared --enable-static --enable-hardware-optimizations --enable-arm-neon --prefix=
[04:26:08] [INFO] [EXEC] make clean
[04:26:08] [INFO] [EXEC] make -j10 DEFAULT_INCLUDES='-I. -I/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/include' LIBS= libpng16.la
[04:26:09] [INFO] [EXEC] make install-libLTLIBRARIES install-data-am DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:26:09] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib
[04:26:09] [INFO] [EXEC] ln -sf libpng16.a libpng.a
[04:26:09] [INFO] Patching library [libpng] pkgconfig
[04:26:09] [INFO] lib [libpng] build success
[04:26:09] [INFO] Building required library [bzip2]
[04:26:09] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/bzip2
[04:26:09] [INFO] [EXEC] make PREFIX='/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot' clean
[04:26:09] [INFO] [EXEC] make -j10 CC=clang CXX=clang++ PREFIX='/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot' libbz2.a
[04:26:10] [INFO] [EXEC] cp libbz2.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib
[04:26:10] [INFO] [EXEC] cp bzlib.h /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/include
[04:26:10] [INFO] lib [bzip2] build success
[04:26:10] [INFO] Building required library [freetype]
[04:26:10] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/freetype
[04:26:10] [INFO] [EXEC] sh autogen.sh
[04:26:14] [INFO] [EXEC] ./configure --enable-static --disable-shared --without-harfbuzz --prefix= --with-png --with-bzip2=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot --without-brotli
[04:26:23] [INFO] [EXEC] make clean
[04:26:24] [INFO] [EXEC] make -j10
[04:26:26] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:26:27] [INFO] Patching library [freetype] pkgconfig
[04:26:27] [INFO] lib [freetype] build success
[04:26:27] [INFO] Building required library [libjpeg]
[04:26:27] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libjpeg/build
[04:26:27] [INFO] [EXEC] cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_BINDIR=/bin -DCMAKE_INSTALL_LIBDIR=/lib -DCMAKE_INSTALL_INCLUDEDIR=/include -DCMAKE_TOOLCHAIN_FILE=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/toolchain.cmake -DENABLE_STATIC=ON -DENABLE_SHARED=OFF ..
[04:26:31] [INFO] [EXEC] cmake --build . -j 10
[04:26:37] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:26:38] [INFO] Patching library [libjpeg] pkgconfig
[04:26:38] [INFO] lib [libjpeg] build success
[04:26:38] [INFO] Building required library [libavif]
[04:26:38] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libavif/build
[04:26:38] [INFO] [EXEC] cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_BINDIR=/bin -DCMAKE_INSTALL_LIBDIR=/lib -DCMAKE_INSTALL_INCLUDEDIR=/include -DCMAKE_TOOLCHAIN_FILE=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/toolchain.cmake -DBUILD_SHARED_LIBS=OFF ..
[04:26:39] [INFO] [EXEC] cmake --build . -j 10
[04:26:39] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:26:39] [INFO] Patching library [libavif] pkgconfig
[04:26:39] [INFO] lib [libavif] build success
[04:26:39] [INFO] Building required library [libwebp]
[04:26:39] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libwebp/build
[04:26:39] [INFO] [EXEC] cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_BINDIR=/bin -DCMAKE_INSTALL_LIBDIR=/lib -DCMAKE_INSTALL_INCLUDEDIR=/include -DCMAKE_TOOLCHAIN_FILE=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/toolchain.cmake -DBUILD_SHARED_LIBS=OFF -DWEBP_BUILD_EXTRAS=ON ..
[04:26:45] [INFO] [EXEC] cmake --build . -j 10
[04:26:48] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:26:49] [INFO] Patching library [libwebp] pkgconfig
[04:26:49] [INFO] Patching library [libwebp] pkgconfig
[04:26:49] [INFO] Patching library [libwebp] pkgconfig
[04:26:49] [INFO] lib [libwebp] build success
[04:26:49] [INFO] Building required library [libiconv]
[04:26:49] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libiconv
[04:26:49] [INFO] [EXEC] ./configure --enable-static --disable-shared --prefix=
[04:27:23] [INFO] [EXEC] make clean
[04:27:23] [INFO] [EXEC] make -j10
[04:27:26] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:27:27] [INFO] lib [libiconv] build success
[04:27:27] [INFO] Building required library [openssl]
[04:27:27] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/openssl
[04:27:27] [INFO] [EXEC] ./Configure no-shared zlib --prefix=/ --libdir=/lib --openssldir=/System/Library/OpenSSL darwin64-arm64-cc
[04:27:31] [INFO] [EXEC] make clean
[04:27:32] [INFO] [EXEC] make -j10 CNF_EX_LIBS="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libz.a"
[04:28:16] [INFO] [EXEC] make install_sw DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:28:23] [INFO] Patching library [openssl] pkgconfig
[04:28:23] [INFO] lib [openssl] build success
[04:28:23] [INFO] Building required library [libzip]
[04:28:23] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libzip/build
[04:28:23] [INFO] [EXEC] cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_BINDIR=/bin -DCMAKE_INSTALL_LIBDIR=/lib -DCMAKE_INSTALL_INCLUDEDIR=/include -DCMAKE_TOOLCHAIN_FILE=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/toolchain.cmake -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_DOC=OFF -DBUILD_EXAMPLES=OFF -DBUILD_REGRESS=OFF -DBUILD_TOOLS=OFF -DENABLE_BZIP2=ON -DENABLE_LZMA=OFF -DENABLE_ZSTD=OFF -DENABLE_OPENSSL=ON ..
[04:28:38] [INFO] [EXEC] make -j10
[04:28:40] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:28:40] [INFO] Patching library [libzip] pkgconfig
[04:28:40] [INFO] lib [libzip] build success
[04:28:40] [INFO] Building required library [curl]
[04:28:40] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/curl/build
[04:28:40] [INFO] [EXEC] sed -i.save s@\${CMAKE_C_IMPLICIT_LINK_LIBRARIES}@@ ../CMakeLists.txt
[04:28:40] [INFO] [EXEC] cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_BINDIR=/bin -DCMAKE_INSTALL_LIBDIR=/lib -DCMAKE_INSTALL_INCLUDEDIR=/include -DCMAKE_TOOLCHAIN_FILE=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/toolchain.cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_CURL_EXE=OFF -DCURL_USE_OPENSSL=ON -DCURL_BROTLI=OFF -DCURL_USE_LIBSSH2=OFF -DUSE_NGHTTP2=OFF -DCURL_DISABLE_LDAP=ON -DCURL_ZSTD=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF  ..
[04:29:08] [INFO] [EXEC] make -j10
[04:29:11] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:29:12] [INFO] Patching library [curl] pkgconfig
[04:29:12] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/cmake/CURL/
[04:29:12] [INFO] [EXEC] sed -ie 's|"/lib/libcurl.a"|"/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libcurl.a"|g' CURLTargets-release.cmake
[04:29:12] [INFO] lib [curl] build success
[04:29:12] [INFO] Building required library [icu]
[04:29:12] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/icu/source
[04:29:12] [INFO] [EXEC] ./runConfigureICU MacOSX --enable-static --disable-shared --prefix=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:29:26] [INFO] [EXEC] make clean
[04:29:28] [INFO] [EXEC] make -j10
[04:30:10] [INFO] [EXEC] make install
[04:30:13] [INFO] lib [icu] build success
[04:30:13] [INFO] Building required library [libxml2]
[04:30:13] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/libxml2/build
[04:30:13] [INFO] [EXEC] cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_BINDIR=/bin -DCMAKE_INSTALL_LIBDIR=/lib -DCMAKE_INSTALL_INCLUDEDIR=/include -DCMAKE_TOOLCHAIN_FILE=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/toolchain.cmake -DBUILD_SHARED_LIBS=OFF -DLIBXML2_WITH_ICONV=ON -DLIBXML2_WITH_ZLIB=ON -DLIBXML2_WITH_ICU=ON -DLIBXML2_WITH_LZMA=OFF -DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_PROGRAMS=OFF -DLIBXML2_WITH_TESTS=OFF ..
[04:30:25] [INFO] [EXEC] cmake --build . -j 10
[04:30:28] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:30:28] [INFO] lib [libxml2] build success
[04:30:28] [INFO] Building required library [onig]
[04:30:28] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/onig
[04:30:28] [INFO] [EXEC] ./configure --enable-static --disable-shared --prefix=
[04:30:37] [INFO] [EXEC] make clean
[04:30:37] [INFO] [EXEC] make -j10
[04:30:40] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:30:40] [INFO] Patching library [onig] pkgconfig
[04:30:40] [INFO] lib [onig] build success
[04:30:40] [INFO] Building required library [sqlite]
[04:30:40] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/sqlite
[04:30:40] [INFO] [EXEC] ./configure --enable-static --disable-shared --prefix=
[04:30:48] [INFO] [EXEC] make clean
[04:30:48] [INFO] [EXEC] make -j10
[04:31:08] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:31:09] [INFO] lib [sqlite] build success
[04:31:09] [INFO] Building required library [ncurses]
[04:31:09] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/ncurses
[04:31:09] [INFO] [EXEC] ./configure --enable-static --disable-shared --enable-overwrite --with-curses-h --enable-pc-files --enable-echo --with-normal --with-ticlib --without-tests --without-dlsym --without-debug -enable-symlinks--bindir=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/bin --includedir=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/include --libdir=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib --prefix=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:31:39] [INFO] [EXEC] make clean
[04:31:40] [INFO] [EXEC] make -j10
[04:31:51] [INFO] [EXEC] make install
[04:32:06] [INFO] lib [ncurses] build success
[04:32:06] [INFO] Building required library [readline]
[04:32:06] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/readline
[04:32:06] [INFO] [EXEC] ./configure --enable-static=yes --enable-shared=no --prefix= --with-curses --enable-multibyte=yes
[04:32:20] [INFO] [EXEC] make clean
[04:32:20] [INFO] [EXEC] make -j10
[04:32:21] [INFO] [EXEC] make install DESTDIR=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot
[04:32:22] [INFO] Patching library [readline] pkgconfig
[04:32:22] [INFO] lib [readline] build success
[04:32:22] [INFO] extracting php-src source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/php-src ...
[04:32:28] [INFO] extracting micro source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/php-src/sapi/micro ...
patching file 'build/order_by_dep.awk'
patching file 'ext/opcache/ZendAccelerator.c'
patching file 'ext/opcache/config.m4'
No such line 332 in input file, ignoring
patching file 'ext/opcache/config.w32'
patching file 'main/main.c'
patching file 'win32/build/confutils.js'
patching file 'ext/fileinfo/config.w32'
patching file 'ext/openssl/config.w32'
patching file 'TSRM/tsrm_win32.c'
patching file 'ext/ffi/ffi.c'
patching file 'ext/opcache/ZendAccelerator.c'
patching file 'ext/pcre/php_pcre.c'
patching file 'ext/readline/readline_cli.c'
patching file 'ext/sqlite3/sqlite3.c'
patching file 'ext/standard/php_fopen_wrapper.c'
patching file 'ext/standard/proc_open.c'
patching file 'main/main.c'
patching file 'win32/console.c'
patching file configure.ac
patching file 'win32/winutil.c'
patching file 'win32/build/confutils.js'
patching file 'Zend/zend_stream.c'
patching file 'build/php.m4'
[04:32:28] [INFO] Patched source [micro] after extracted
[04:32:28] [INFO] extracting apcu source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/php-src/ext/apcu ...
[04:32:29] [INFO] extracting redis source to /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/php-src/ext/redis ...
[04:32:29] [INFO] patching before-configure for curl checks
[04:32:29] [INFO] Extension [curl] patched before buildconf
[04:32:29] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/php-src
[04:32:29] [INFO] [EXEC] ./buildconf --force
[04:32:33] [INFO] Extension [bz2] patched before configure
[04:32:33] [INFO] Extension [curl] patched before configure
[04:32:33] [INFO] Extension [iconv] patched before configure
[04:32:33] [INFO] Extension [pdo_sqlite] patched before configure
[04:32:33] [INFO] Extension [readline] patched before configure
[04:32:33] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/php-src
[04:32:33] [INFO] Using configure: --enable-apcu --enable-bcmath --with-bz2="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-calendar --enable-ctype --with-curl --enable-dba --enable-dom --with-libxml="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-exif --enable-fileinfo --enable-filter --with-zlib --with-zlib-dir="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-gd --with-freetype --with-jpeg --with-webp --with-avif --with-iconv="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-intl --enable-mbstring  --enable-mysqlnd --with-mysqli --enable-opcache --with-openssl=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot --with-openssl-dir=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot --enable-pcntl --enable-pdo --with-pdo-mysql --with-sqlite3="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --with-pdo-sqlite --enable-phar --enable-posix --with-readline="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-session --enable-redis --enable-redis-session --enable-simplexml --with-libxml="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-sockets --enable-sysvsem --enable-tokenizer --enable-xml --with-libxml="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-xmlreader --with-libxml="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-xmlwriter --with-libxml="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --with-zip="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot"
[04:32:33] [INFO] [EXEC] ./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes CFLAGS='--target=arm64-apple-darwin -Werror=unknown-warning-option' --disable-all --disable-cgi --disable-phpdbg --disable-cli --disable-fpm --enable-embed=static --disable-micro --enable-zts --disable-zend-signals --enable-apcu --enable-bcmath --with-bz2="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-calendar --enable-ctype --with-curl --enable-dba --enable-dom --with-libxml="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-exif --enable-fileinfo --enable-filter --with-zlib --with-zlib-dir="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-gd --with-freetype --with-jpeg --with-webp --with-avif --with-iconv="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-intl --enable-mbstring  --enable-mysqlnd --with-mysqli --enable-opcache --with-openssl=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot --with-openssl-dir=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot --enable-pcntl --enable-pdo --with-pdo-mysql --with-sqlite3="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --with-pdo-sqlite --enable-phar --enable-posix --with-readline="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-session --enable-redis --enable-redis-session --enable-simplexml --with-libxml="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-sockets --enable-sysvsem --enable-tokenizer --enable-xml --with-libxml="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-xmlreader --with-libxml="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --enable-xmlwriter --with-libxml="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot" --with-zip="/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot"
[04:33:45] [INFO] cleaning up
[04:33:45] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/php-src
[04:33:45] [INFO] [EXEC] make clean
[04:33:45] [INFO] building embed
[04:33:45] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/source/php-src
[04:33:45] [INFO] [EXEC] make INSTALL_ROOT=/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot -j10 EXTRA_CFLAGS='-g -Os' EXTRA_LIBS='-framework CoreFoundation -framework CoreServices -framework SystemConfiguration -lc++  /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libreadline.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libncurses.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libsqlite3.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libonig.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libxml2.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libicui18n.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libicuio.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libicuuc.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libicudata.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libcurl.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libzip.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libssl.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libcrypto.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libiconv.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libcharset.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libwebp.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libwebpdecoder.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libwebpdemux.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libwebpmux.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libsharpyuv.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libavif.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libjpeg.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libturbojpeg.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libfreetype.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libbz2.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libpng16.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libz.a -liconv -lresolv' install
[04:36:23] [INFO] [EXEC] rm -Rf /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/php-o
[04:36:23] [INFO] [EXEC] mkdir /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/php-o
[04:36:23] [INFO] Entering dir: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/php-o
[04:36:23] [INFO] [EXEC] ar x /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libphp.a
[04:36:24] [INFO] [EXEC] rm /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libphp.a
[04:36:24] [INFO] [EXEC] ar rcs /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libphp.a *.o
[04:36:24] [INFO] [EXEC] rm -Rf /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/php-o
[04:36:24] [INFO] Build complete, used 733.539 s !
[04:36:24] [INFO] License path: /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/license/
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/myuser/Library/Caches/go-build"
GOENV="/Users/myuser/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/myuser/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/myuser/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.20.1/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.20.1/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20.1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/myuser/work/frankenphp-test/frankenphp/caddy/go.mod"
GOWORK=""
CGO_CFLAGS="-DFRANKENPHP_VERSION=d427f552987428c9d204d3c2589a807a0b2febce -I/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/include/php -I/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/include/php/main -I/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/include/php/TSRM -I/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/include/php/Zend -I/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/include/php/ext -I/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/include/php/ext/date/lib"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-framework CoreFoundation -framework SystemConfiguration -lpthread -lpthread -L/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/pkgconfig/../..//lib -L/Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib -L/lib -lresolv -lreadline /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libncurses.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libreadline.a /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libncurses.a -lstdc++ -liconv /Users/myuser/work/frankenphp-test/frankenphp/dist/static-php-cli/buildroot/lib/libbz2.a -framework CoreFoundation -framework CoreServices -framework SystemConfiguration -lnetwork -lm -lpthread -lxml2 -lssl -lcrypto -lsqlite3 -lz -lcurl -lssl -lcrypto -lxml2 -lz -lpng16 -lavif -lwebp -lsharpyuv -ljpeg -lfreetype -lz -lpng16 -licuio -licui18n -licuuc -licudata -lonig -lsqlite3 -lxml2 -lxml2 -lxml2 -lxml2 -lzip -lz -lssl -lcrypto"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gn/vcqk7r6n00q4fmb0z41mplzsyqdky8/T/go-build1612065696=/tmp/go-build -gno-record-gcc-switches -fno-common"
go: downloading go.uber.org/automaxprocs v1.5.3
go: downloading github.com/dunglas/vulcain/caddy v1.0.0
go: downloading github.com/caddyserver/caddy/v2 v2.7.5
go: downloading github.com/dunglas/mercure/caddy v0.15.5
go: downloading github.com/dunglas/vulcain v1.0.0
go: downloading github.com/dunglas/mercure v0.15.5
go: downloading github.com/caddyserver/certmagic v0.19.2
go: downloading go.uber.org/zap v1.26.0
go: downloading github.com/spf13/cobra v1.8.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/cel-go v0.15.1
go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17
go: downloading github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/google/uuid v1.4.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/quic-go/quic-go v0.40.0
go: downloading golang.org/x/sys v0.14.0
go: downloading golang.org/x/term v0.14.0
go: downloading github.com/mholt/acmez v1.2.0
go: downloading golang.org/x/exp v0.0.0-20231108232855-2478ac86f678
go: downloading golang.org/x/net v0.18.0
go: downloading github.com/smallstep/certificates v0.25.0
go: downloading github.com/smallstep/truststore v0.13.0
go: downloading go.step.sm/crypto v0.36.1
go: downloading github.com/go-chi/chi v4.1.2+incompatible
go: downloading github.com/smallstep/nosql v0.6.0
go: downloading github.com/klauspost/cpuid/v2 v2.2.6
go: downloading github.com/tailscale/tscert v0.0.0-20230806124524-28a91b69a046
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.2.1
go: downloading github.com/BurntSushi/toml v1.3.2
go: downloading github.com/Masterminds/sprig/v3 v3.2.3
go: downloading github.com/alecthomas/chroma/v2 v2.10.0
go: downloading github.com/yuin/goldmark v1.6.0
go: downloading github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
go: downloading github.com/libdns/libdns v0.2.1
go: downloading github.com/miekg/dns v1.1.56
go: downloading github.com/zeebo/blake3 v0.2.3
go: downloading golang.org/x/crypto v0.15.0
go: downloading go.uber.org/multierr v1.11.0
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.3
go: downloading google.golang.org/protobuf v1.31.0
go: downloading github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df
go: downloading github.com/beorn7/perks v1.0.1
go: downloading golang.org/x/text v0.14.0
go: downloading github.com/cespare/xxhash/v2 v2.2.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading github.com/stoewer/go-strcase v1.3.0
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading golang.org/x/sync v0.5.0
go: downloading github.com/klauspost/compress v1.17.2
go: downloading github.com/mastercactapus/proxyprotocol v0.0.4
go: downloading howett.net/plist v1.0.0
go: downloading go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0
go: downloading go.opentelemetry.io/contrib/propagators/autoprop v0.45.0
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0
go: downloading go.opentelemetry.io/otel v1.20.0
go: downloading go.opentelemetry.io/otel/sdk v1.20.0
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0
go: downloading go.opentelemetry.io/otel/trace v1.20.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading go.step.sm/cli-utils v0.8.0
go: downloading go.step.sm/linkedca v0.20.1
go: downloading google.golang.org/grpc v1.59.0
go: downloading gopkg.in/square/go-jose.v2 v2.6.0
go: downloading github.com/fxamacker/cbor/v2 v2.5.0
go: downloading github.com/go-chi/chi/v5 v5.0.10
go: downloading github.com/google/go-tpm v0.9.0
go: downloading github.com/smallstep/go-attestation v0.4.4-0.20230627102604-cf579e53cbd2
go: downloading github.com/slackhq/nebula v1.7.2
go: downloading github.com/quic-go/qpack v0.4.0
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/Masterminds/semver/v3 v3.2.1
go: downloading github.com/huandu/xstrings v1.4.0
go: downloading github.com/imdario/mergo v0.3.16
go: downloading github.com/shopspring/decimal v1.3.1
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/spf13/cast v1.5.1
go: downloading github.com/russross/blackfriday/v2 v2.1.0
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading github.com/dunglas/httpsfv v1.0.2
go: downloading github.com/getkin/kin-openapi v0.120.0
go: downloading github.com/gofrs/uuid v4.4.0+incompatible
go: downloading github.com/gorilla/handlers v1.5.2
go: downloading github.com/tidwall/gjson v1.17.0
go: downloading github.com/tidwall/sjson v1.2.5
go: downloading github.com/felixge/httpsnoop v1.0.4
go: downloading go.opentelemetry.io/otel/metric v1.20.0
go: downloading go.opentelemetry.io/contrib/propagators/aws v1.20.0
go: downloading go.opentelemetry.io/contrib/propagators/b3 v1.20.0
go: downloading go.opentelemetry.io/contrib/propagators/jaeger v1.20.0
go: downloading go.opentelemetry.io/contrib/propagators/ot v1.20.0
go: downloading go.opentelemetry.io/proto/otlp v1.0.0
go: downloading github.com/micromdm/scep/v2 v2.1.0
go: downloading go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352
go: downloading github.com/urfave/cli v1.22.14
go: downloading github.com/chzyer/readline v1.5.1
go: downloading github.com/manifoldco/promptui v0.9.0
go: downloading github.com/x448/float16 v0.8.4
go: downloading github.com/rs/xid v1.5.0
go: downloading github.com/sirupsen/logrus v1.9.3
go: downloading filippo.io/edwards25519 v1.0.0
go: downloading github.com/dgraph-io/ristretto v0.1.1
go: downloading github.com/golang-jwt/jwt/v4 v4.5.0
go: downloading github.com/gorilla/mux v1.8.1
go: downloading github.com/hashicorp/golang-lru v1.0.2
go: downloading github.com/kevburnsjr/skipfilter v0.0.1
go: downloading github.com/spf13/viper v1.17.0
go: downloading github.com/unrolled/secure v1.13.0
go: downloading github.com/yosida95/uritemplate/v3 v3.0.2
go: downloading go.etcd.io/bbolt v1.3.8
go: downloading github.com/dgraph-io/badger v1.6.2
go: downloading github.com/dgraph-io/badger/v2 v2.2007.4
go: downloading github.com/go-sql-driver/mysql v1.7.1
go: downloading github.com/jackc/pgx/v4 v4.18.1
go: downloading github.com/mitchellh/go-ps v1.0.0
go: downloading github.com/google/go-tspi v0.3.0
go: downloading github.com/dlclark/regexp2 v1.10.0
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/go-logr/logr v1.3.0
go: downloading github.com/golang/protobuf v1.5.3
go: downloading github.com/tidwall/match v1.1.1
go: downloading github.com/tidwall/pretty v1.2.1
go: downloading github.com/go-openapi/jsonpointer v0.20.0
go: downloading github.com/invopop/yaml v0.2.0
go: downloading github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
go: downloading github.com/perimeterx/marshmallow v1.1.5
go: downloading github.com/cenkalti/backoff/v4 v4.2.1
go: downloading github.com/go-logr/stdr v1.2.2
go: downloading github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1
go: downloading github.com/go-kit/kit v0.13.0
go: downloading github.com/fsnotify/fsnotify v1.7.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/spf13/afero v1.10.0
go: downloading github.com/MauriceGit/skiplist v0.0.0-20211105230623-77f5c8d3e145
go: downloading github.com/RoaringBitmap/roaring v1.6.0
go: downloading github.com/quic-go/qtls-go1-20 v0.4.1
go: downloading github.com/jackc/pgconn v1.14.1
go: downloading github.com/jackc/pgtype v1.14.0
go: downloading github.com/jackc/pgio v1.0.0
go: downloading github.com/jackc/pgproto3/v2 v2.3.2
go: downloading github.com/google/certificate-transparency-go v1.1.7
go: downloading github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13
go: downloading github.com/go-openapi/swag v0.22.4
go: downloading github.com/mailru/easyjson v0.7.7
go: downloading github.com/golang/glog v1.1.2
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/magiconair/properties v1.8.7
go: downloading github.com/pelletier/go-toml/v2 v2.1.0
go: downloading github.com/go-kit/log v0.2.1
go: downloading github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96
go: downloading github.com/jackc/chunkreader/v2 v2.0.1
go: downloading github.com/jackc/pgpassfile v1.0.0
go: downloading github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
go: downloading github.com/josharian/intern v1.0.0
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading github.com/go-logfmt/logfmt v0.6.0
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/mattn/go-isatty v0.0.20
# github.com/dunglas/frankenphp/caddy/frankenphp
ld: warning: directory not found for option '-L/lib'
ld: warning: directory not found for option '-L/lib'
FrankenPHP d427f552987428c9d204d3c2589a807a0b2febce PHP 8.3.0 Caddy v2.7.5 h1:HoysvZkLcN2xJExEepaFHK92Qgs7xAiCFydN5x5Hs6Q=
```

なっがいコンパイル実行のあと、`dist/` 配下に `frankenphp-mac-arm64` ができてた。
これを実行したら良さそうなので、動かしてみる.

```
$ ls dist
frankenphp-mac-arm64 static-php-cli

$ ./frankenphp-mac-arm64 php-server
2023/12/08 04:41:41.149 WARN    admin   admin endpoint disabled
2023/12/08 04:41:41.149 WARN    http.auto_https server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server {"server_name": "php", "http_port": 80}
2023/12/08 04:41:41.149 INFO    tls.cache.maintenance   started background certificate maintenance      {"cache": "0x14000817700"}
2023/12/08 04:41:41.149 INFO    tls     cleaning storage unit   {"description": "FileStorage:/Users/myuser/Library/Application Support/Caddy"}
2023/12/08 04:41:41.150 INFO    tls     finished cleaning storage units
2023/12/08 04:41:41.150 INFO    http.log        server running  {"name": "php", "protocols": ["h1", "h2", "h3"]}
2023/12/08 04:41:41.150 INFO    FrankenPHP started 🐘   {"php_version": "8.3.0"}
2023/12/08 04:41:41.150 INFO    Caddy serving PHP app on :80
```

動いたっぽい❓一応curl実行したらレスポンス４０４だけどありました。

```
$ curl -v localhost:80
*   Trying 127.0.0.1:80...
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: localhost
> User-Agent: curl/7.87.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Server: Caddy
< Date: Fri, 08 Dec 2023 04:44:45 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact

### phpinfo.phpを作成してアクセスしてみたらphp自体は動作せず、、、、
$ curl -v localhost:80/phpinfo.php
*   Trying 127.0.0.1:80...
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET /phpinfo.php HTTP/1.1
> Host: localhost
> User-Agent: curl/7.87.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: text/html; charset=UTF-8
< Server: Caddy
< X-Powered-By: PHP/8.3.0
< Date: Fri, 08 Dec 2023 04:48:15 GMT
< Content-Length: 293
<
<br />
<b>Warning</b>:  Unknown: Failed to open stream: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Fatal error</b>:  Failed opening required '/Users/myuser/work/frankenphp-test/frankenphp/dist/php' (include_path='.:') in <b>Unknown</b> on line <b>0</b><br />
* Connection #0 to host localhost left intact
```

phpinfo.phpを作成してアクセスしてみたらphp自体は動作せず、、、、💦
ま、でもDockerで動いたからいっか❗
ビルドしてバイナリ作ったらGo言語のようにファイル１つになってソース管理は簡単になりそう🤔

# 参考サイト
- [caddyで簡単にhttpsサイト #http2 - Qiita](https://qiita.com/mmotoi/items/1af28e2e62a4e344eb6c#caddy%E3%81%A8%E3%81%AF)
- [HTTPステータスコード「103 Early Hints」について – ラボラジアン](https://laboradian.com/103-early-hints/)
- [Mercure.rocks: Real-time APIs Made Easy](https://mercure.rocks/)