LoginSignup
3
0

More than 3 years have passed since last update.

macOS上でphp-buildからmasterをビルドする(PHP 7.4+編)

Posted at

php-srcのmasterブランチをビルドするのって毎度苦労するので、今回ビルドした手順を記録しておきます。

最近configureが何か変わったのか、ライブラリを探すのにPKG_CONFIGを指定してやらないと色々見つけてくれなくなりました。

$ brew install bison re2c libxml2 libjpeg libpng icu4c libzip autoconf \
 automake krb5 oniguruma libedit
$ PKG_CONFIG_PATH="/usr/local/opt/krb5/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libedit/lib/pkgconfig" \
 YACC=$(brew --prefix bison)/bin/bison PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j4" \
 phpenv install master

これで無事ビルドできました。

$ php -v
PHP 8.0.0-dev (cli) (built: Oct  3 2019 13:55:49) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.0-dev, Copyright (c), by Zend Technologies

7.4snapshotも同様にビルドできます。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0