Dependency Table
When compiling PHP, each extension and library has dependencies, which may be required or optional. You can choose whether to include these optional dependencies.
For example, when compiling the gd
extension under Linux, the zlib,libpng
libraries and the zlib
extension are forced to be compiled, while the libavif,libwebp,libjpeg,freetype
libraries are optional libraries and will not be compiled by default unless specified by the --with-libs=avif,webp,jpeg,freetype
option.
- For optional extensions (optional features of extensions), you need to specify them manually at compile time, for example, to enable igbinary support for Redis:
bin/spc build redis,igbinary
. - For optional libraries, you need to compile and specify them through the
--with-libs=XXX
option. - If you want to enable all optional extensions, you can use
bin/spc build redis --with-suggested-exts
. - If you want to enable all optional libraries, you can use
--with-suggested-libs
.
Extension Dependency Table
Linux
Extension Name | Required Extensions | Suggested Extensions | Required Libraries | Suggested Libraries |
---|---|---|---|---|
amqp | librabbitmq | |||
bz2 | bzip2 | |||
curl | curl | |||
dba | qdbm | |||
dom | libxml2 zlib | |||
event | openssl | sockets | libevent | |
ftp | openssl | |||
gd | zlib | zlib libpng | libavif libwebp libjpeg freetype | |
gettext | gettext | |||
gmp | gmp | |||
gmssl | gmssl | |||
grpc | grpc | |||
iconv | libiconv | |||
igbinary | session apcu | |||
imagick | imagemagick | |||
imap | openssl | imap | ||
intl | icu | |||
ldap | openssl | ldap | gmp libsodium | |
libxml | xml | |||
mbregex | mbstring | onig | ||
memcache | session | zlib | ||
mongodb | icu openssl zstd zlib | |||
mysqli | mysqlnd | |||
mysqlnd | zlib | |||
openssl | zlib | openssl zlib | ||
password-argon2 | libargon2 | |||
pdo_mysql | pdo mysqlnd | |||
pdo_pgsql | pdo pgsql | postgresql | ||
pdo_sqlite | pdo sqlite3 | sqlite | ||
pdo_sqlsrv | pdo sqlsrv | |||
pgsql | postgresql | |||
phar | zlib | |||
rdkafka | librdkafka | |||
readline | readline | |||
redis | session igbinary | zstd liblz4 | ||
simplexml | libxml2 | |||
snappy | apcu | snappy | ||
soap | libxml2 | |||
sodium | libsodium | |||
spx | zlib | |||
sqlite3 | sqlite | |||
sqlsrv | pcntl | unixodbc | ||
ssh2 | libssh2 | |||
swoole | openssl curl | swoole-hook-pgsql swoole-hook-mysql swoole-hook-sqlite | libcares brotli nghttp2 zlib | |
swoole-hook-mysql | mysqlnd pdo pdo_mysql | mysqli | ||
swoole-hook-pgsql | pgsql pdo | |||
swoole-hook-sqlite | sqlite3 pdo | |||
swow | openssl curl | openssl curl | ||
tidy | tidy | |||
uuid | libuuid | |||
uv | sockets | libuv | ||
xhprof | ctype | |||
xlswriter | zlib zip | openssl | ||
xml | libxml2 | |||
xmlreader | libxml2 | |||
xmlwriter | libxml2 | |||
xsl | xml dom | libxslt | ||
yac | igbinary | |||
yaml | libyaml | |||
zip | libzip | |||
zlib | zlib | |||
zstd | zstd |
macOS
Extension Name | Required Extensions | Suggested Extensions | Required Libraries | Suggested Libraries |
---|---|---|---|---|
amqp | librabbitmq | |||
bz2 | bzip2 | |||
curl | curl | |||
dba | qdbm | |||
dom | libxml2 zlib | |||
event | openssl | sockets | libevent | |
ffi | libffi | |||
ftp | openssl | |||
gd | zlib | zlib libpng | libavif libwebp libjpeg freetype | |
gettext | gettext | |||
glfw | glfw | |||
gmp | gmp | |||
gmssl | gmssl | |||
grpc | grpc | |||
iconv | libiconv | |||
igbinary | session apcu | |||
imagick | imagemagick | |||
imap | openssl | imap | ||
intl | icu | |||
ldap | openssl | ldap | gmp libsodium | |
libxml | xml | |||
mbregex | mbstring | onig | ||
memcache | session | zlib | ||
memcached | session zlib | libmemcached | ||
mongodb | icu openssl zstd zlib | |||
mysqli | mysqlnd | |||
mysqlnd | zlib | |||
openssl | zlib | openssl zlib | ||
password-argon2 | libargon2 | |||
pdo_mysql | pdo mysqlnd | |||
pdo_pgsql | pdo pgsql | postgresql | ||
pdo_sqlite | pdo sqlite3 | sqlite | ||
pdo_sqlsrv | pdo sqlsrv | |||
pgsql | postgresql | |||
phar | zlib | |||
rdkafka | librdkafka | |||
readline | readline | |||
redis | session igbinary | zstd liblz4 | ||
simplexml | libxml2 | |||
snappy | apcu | snappy | ||
soap | libxml2 | |||
sodium | libsodium | |||
spx | zlib | |||
sqlite3 | sqlite | |||
sqlsrv | unixodbc | |||
ssh2 | libssh2 | |||
swoole | openssl curl | swoole-hook-pgsql swoole-hook-mysql swoole-hook-sqlite | libcares brotli nghttp2 zlib | |
swoole-hook-mysql | mysqlnd pdo pdo_mysql | mysqli | ||
swoole-hook-pgsql | pgsql pdo | |||
swoole-hook-sqlite | sqlite3 pdo | |||
swow | openssl curl | openssl curl | ||
tidy | tidy | |||
uuid | libuuid | |||
uv | sockets | libuv | ||
xhprof | ctype | |||
xlswriter | zlib zip | openssl | ||
xml | libxml2 | |||
xmlreader | libxml2 | |||
xmlwriter | libxml2 | |||
xsl | xml dom | libxslt | ||
yac | igbinary | |||
yaml | libyaml | |||
zip | libzip | |||
zlib | zlib | |||
zstd | zstd |
Windows
Extension Name | Required Extensions | Suggested Extensions | Required Libraries | Suggested Libraries |
---|---|---|---|---|
amqp | openssl | librabbitmq | ||
bz2 | bzip2 | |||
curl | zlib openssl | curl | ||
dba | qdbm | |||
dom | xml | libxml2 zlib | ||
ffi | libffi-win | |||
ftp | openssl | |||
gd | zlib | zlib libpng | libavif libwebp libjpeg freetype | |
gmssl | gmssl | |||
iconv | libiconv-win | |||
igbinary | session apcu | |||
libxml | xml | |||
mbregex | mbstring | onig | ||
mysqli | mysqlnd | |||
mysqlnd | zlib | |||
openssl | zlib | openssl zlib | ||
parallel | pthreads4w | |||
pdo_mysql | pdo mysqlnd | |||
pdo_sqlite | pdo sqlite3 | sqlite | ||
pdo_sqlsrv | pdo sqlsrv | |||
phar | zlib | |||
redis | session igbinary | |||
simplexml | xml | libxml2 | ||
soap | xml | libxml2 | ||
sqlite3 | sqlite | |||
ssh2 | openssl zlib | libssh2 | ||
swow | openssl curl | openssl curl | ||
xml | iconv | libxml2 | ||
xmlreader | xml dom | libxml2 | ||
xmlwriter | xml | libxml2 | ||
yaml | libyaml | |||
zip | zlib bz2 | libzip zlib bzip2 xz | ||
zlib | zlib |
FreeBSD
Extension Name | Required Extensions | Suggested Extensions | Required Libraries | Suggested Libraries |
---|---|---|---|---|
bz2 | bzip2 | |||
curl | curl | |||
dba | qdbm | |||
ftp | openssl | |||
mbregex | mbstring | onig | ||
mysqli | mysqlnd | |||
mysqlnd | zlib | |||
openssl | zlib | openssl zlib | ||
pdo_mysql | pdo mysqlnd | |||
phar | zlib | |||
zlib | zlib |
Library Dependency Table
Linux
Library Name | Required Libraries | Suggested Libraries |
---|---|---|
curl | openssl zlib | libssh2 brotli nghttp2 zstd libcares |
freetype | zlib | libpng bzip2 brotli |
gettext | libiconv | ncurses libxml2 |
grpc | zlib openssl | |
imagemagick | zlib libpng libjpeg libwebp freetype libtiff libheif | zstd xz bzip2 libzip libxml2 |
imap | openssl | |
ldap | openssl zlib gmp libsodium | |
libevent | openssl | |
libheif | libde265 libwebp libaom zlib brotli | |
libpng | zlib | |
librabbitmq | openssl | |
librdkafka | zstd | |
libssh2 | openssl | zlib |
libxml2 | libiconv | xz icu zlib |
libxslt | libxml2 | |
libzip | zlib | bzip2 xz zstd openssl |
nghttp2 | zlib openssl | libxml2 |
openssl | zlib | |
postgresql | libiconv libxml2 openssl zlib readline | icu libxslt ldap zstd |
readline | ncurses | |
snappy | zlib | |
unixodbc | libiconv | |
xz | libiconv |
macOS
Library Name | Required Libraries | Suggested Libraries |
---|---|---|
curl | openssl zlib | libssh2 brotli nghttp2 zstd libcares |
freetype | zlib | libpng bzip2 brotli |
gettext | libiconv | ncurses libxml2 |
grpc | zlib openssl | |
imagemagick | zlib libpng libjpeg libwebp freetype libtiff libheif | zstd xz bzip2 libzip libxml2 |
imap | openssl | |
ldap | openssl zlib gmp libsodium | |
libevent | openssl | |
libheif | libde265 libwebp libaom zlib brotli | |
libpng | zlib | |
librabbitmq | openssl | |
librdkafka | zstd | |
libssh2 | openssl | zlib |
libxml2 | libiconv | xz icu zlib |
libxslt | libxml2 | |
libzip | zlib | bzip2 xz zstd openssl |
nghttp2 | zlib openssl | libxml2 |
openssl | zlib | |
postgresql | libiconv libxml2 openssl zlib readline | icu libxslt ldap zstd |
readline | ncurses | |
snappy | zlib | |
unixodbc | libiconv | |
xz | libiconv |
Windows
Library Name | Required Libraries | Suggested Libraries |
---|---|---|
curl | openssl zlib libssh2 nghttp2 | brotli zstd |
freetype | zlib | libpng bzip2 brotli |
libjpeg | zlib | |
libpng | zlib | |
librabbitmq | openssl | |
libssh2 | openssl | zlib |
libxml2 | libiconv-win | zlib |
libzip | zlib bzip2 xz | zstd openssl |
nghttp2 | zlib openssl | libxml2 |
openssl | zlib |
FreeBSD
Library Name | Required Libraries | Suggested Libraries |
---|---|---|
curl | openssl zlib | libssh2 brotli nghttp2 zstd libcares |
openssl | zlib |