1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.unix.source" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Installing from source on Unix and macOS systems</title>
<para>
Prerequisite software for compiling:
<simplelist>
<member>
<link xlink:href="&url.gnu.make;">GNU <command>make</command></link>
</member>
<member>
A C compiler (as of PHP 8.0.0, C99 compatibility is required; as of PHP 8.4.0, C11 compatibility is required)
</member>
<member>
A web server
</member>
<member>
Any module specific components (such as <acronym>GD</acronym>,
<acronym>PDF</acronym> libs, etc.)
</member>
</simplelist>
</para>
<para>
When building directly from Git sources or after custom modifications,
these additional tools may be necessary:
<itemizedlist>
<listitem>
<simpara>
<link xlink:href="&url.gnu.autoconf;">autoconf</link>:
</simpara>
<simplelist>
<member>
PHP 7.3 and later: 2.68+
</member>
<member>
PHP 7.2: 2.64+
</member>
<member>
PHP 7.1 and earlier: 2.59+
</member>
</simplelist>
</listitem>
<listitem>
<simpara>
<link xlink:href="&url.re2c;">re2c</link>:
</simpara>
<simplelist>
<member>
PHP 8.3 and later: 1.0.3+
</member>
<member>
PHP 8.2 and earlier: 0.13.4+
</member>
</simplelist>
</listitem>
<listitem>
<simpara>
<link xlink:href="&url.bison;">bison</link>:
</simpara>
<simplelist>
<member>
PHP 7.4 and later: 3.0.0+
</member>
<member>
PHP 7.3 and earlier: 2.4+ (including Bison 3.x)
</member>
</simplelist>
</listitem>
</itemizedlist>
</para>
<simpara>
The initial PHP setup and configuration process is controlled by the
use of the command line options of the <command>configure</command>
script. A list of available options along with short explanations can
be shown by running <command>./configure --help</command>.
This manual documents the different options separately.
The <link linkend="configure.about">core options can be found in the
appendix</link>, while the different extension specific options are
described on the reference pages.
</simpara>
<simpara>
After the configuration script was been run, PHP can be built using
the <command>make</command> command.
The <link linkend="faq.installation">Installation section of the
frequently asked questions</link> has further information about how
to handle build problems.
</simpara>
<note>
<simpara>
Some Unix systems (such as OpenBSD and SELinux) may disallow mapping
pages both writable and executable for security reasons, what is called
<link xlink:href="&url.install.unix.pax-mprotect;">PaX MPROTECT</link>
or <link xlink:href="&url.install.unix.w-x-violation;">W^X violation
protection</link>.
This kind of memory mapping is necessary for PCRE's JIT support, so
either PHP has to be built <link linkend="pcre.installation">without
PCRE's JIT support</link>, or the binary has to be whitelisted by
any means provided by the system.
</simpara>
</note>
<note>
<simpara>
Cross-compiling for ARM with the Android toolchain is currently not supported.
</simpara>
</note>
</sect1>
|