system-build-tools.html 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!DOCTYPE html>
  2. <html lang="en" dir="ltr">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <title>Compilation Tools | static-php-cli</title>
  7. <meta name="description" content="Build single static PHP binary, with PHP project together, with popular extensions included.">
  8. <meta name="generator" content="VitePress v1.2.3">
  9. <link rel="preload stylesheet" href="/assets/style.DdViOfjJ.css" as="style">
  10. <script type="module" src="/assets/app.D3H8Y1BO.js"></script>
  11. <link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
  12. <link rel="modulepreload" href="/assets/chunks/framework.gjrnbxUT.js">
  13. <link rel="modulepreload" href="/assets/chunks/theme.5IQMzWyn.js">
  14. <link rel="modulepreload" href="/assets/en_develop_system-build-tools.md.D6vaAwN3.lean.js">
  15. <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
  16. <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
  17. </head>
  18. <body>
  19. <div id="app"><div class="Layout" data-v-5d98c3a5><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5d98c3a5 data-v-ae24b3ad><div class="VPNavBar has-sidebar top" data-v-ae24b3ad data-v-ccf7ddec><div class="wrapper" data-v-ccf7ddec><div class="container" data-v-ccf7ddec><div class="title" data-v-ccf7ddec><div class="VPNavBarTitle has-sidebar" data-v-ccf7ddec data-v-ab179fa1><a class="title" href="/en/" data-v-ab179fa1><!--[--><!--]--><!----><span data-v-ab179fa1>static-php-cli</span><!--[--><!--]--></a></div></div><div class="content" data-v-ccf7ddec><div class="content-body" data-v-ccf7ddec><!--[--><!--]--><div class="VPNavBarSearch search" data-v-ccf7ddec><!----></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-ccf7ddec data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en/guide/" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>Guide</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en/develop/" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>Advanced</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en/contributing/" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>Contributing</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en/faq/" tabindex="0" data-v-7f418b0f data-v-9c663999><!--[--><span data-v-9c663999>FAQ</span><!--]--></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-ccf7ddec data-v-88af2de4 data-v-b6c34ac9><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-b6c34ac9><span class="text" data-v-b6c34ac9><span class="vpi-languages option-icon" data-v-b6c34ac9></span><!----><span class="vpi-chevron-down text-icon" data-v-b6c34ac9></span></span></button><div class="menu" data-v-b6c34ac9><div class="VPMenu" data-v-b6c34ac9 data-v-e7ea1737><!----><!--[--><!--[--><div class="items" data-v-88af2de4><p class="title" data-v-88af2de4>English</p><!--[--><div class="VPMenuLink" data-v-88af2de4 data-v-43f1e123><a class="VPLink link" href="/zh/develop/system-build-tools.html" data-v-43f1e123><!--[-->简体中文<!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-ccf7ddec data-v-e6aabb21><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-e6aabb21 data-v-d1f28634 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-d1f28634></span><span class="vpi-moon moon" data-v-d1f28634></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-ccf7ddec data-v-0394ad82 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/crazywhalecc/static-php-cli" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><span class="vpi-social-github" /></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-ccf7ddec data-v-d0bd9dde data-v-b6c34ac9><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-b6c34ac9><span class="vpi-more-horizontal icon" data-v-b6c34ac9></span></button><div class="menu" data-v-b6c34ac9><div class="VPMenu" data-v-b6c34ac9 data-v-e7ea1737><!----><!--[--><!--[--><div class="group translations" data-v-d0bd9dde><p class="trans-title" data-v-d0bd9dde>English</p><!--[--><div class="VPMenuLink" data-v-d0bd9dde data-v-43f1e123><a class="VPLink link" href="/zh/develop/system-build-tools.html" data-v-43f1e123><!--[-->简体中文<!--]--></a></div><!--]--></div><div class="group" data-v-d0bd9dde><div class="item appearance" data-v-d0bd9dde><p class="label" data-v-d0bd9dde>Appearance</p><div class="appearance-action" data-v-d0bd9dde><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-d0bd9dde data-v-d1f28634 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-d1f28634></span><span class="vpi-moon moon" data-v-d1f28634></span><!--]--></span></span></button></div></div></div><div class="group" data-v-d0bd9dde><div class="item social-links" data-v-d0bd9dde><div class="VPSocialLinks social-links-list" data-v-d0bd9dde data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/crazywhalecc/static-php-cli" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><span class="vpi-social-github" /></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-ccf7ddec data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><div class="divider" data-v-ccf7ddec><div class="divider-line" data-v-ccf7ddec></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-5d98c3a5 data-v-a6f0e41e><div class="container" data-v-a6f0e41e><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-a6f0e41e><span class="vpi-align-left menu-icon" data-v-a6f0e41e></span><span class="menu-text" data-v-a6f0e41e>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-a6f0e41e data-v-17a5e62e><button data-v-17a5e62e>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-5d98c3a5 data-v-575e6a36><div class="curtain" data-v-575e6a36></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-575e6a36><span class="visually-hidden" id="sidebar-aria-label" data-v-575e6a36> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0" data-v-575e6a36 data-v-b8d55f3b><div class="item" role="button" tabindex="0" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><h2 class="text" data-v-b8d55f3b>Development</h2><!----></div><div class="items" data-v-b8d55f3b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/en/develop/" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>Get Started</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/en/develop/structure.html" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>Project Structure</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/en/develop/php-src-changes.html" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>PHP Source Modification</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0" data-v-575e6a36 data-v-b8d55f3b><div class="item" role="button" tabindex="0" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><h2 class="text" data-v-b8d55f3b>Module</h2><!----></div><div class="items" data-v-b8d55f3b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/en/develop/doctor-module.html" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>Doctor </p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/en/develop/source-module.html" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>Source</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0 has-active" data-v-575e6a36 data-v-b8d55f3b><div class="item" role="button" tabindex="0" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><h2 class="text" data-v-b8d55f3b>Extra</h2><!----></div><div class="items" data-v-b8d55f3b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b8d55f3b data-v-b8d55f3b><div class="item" data-v-b8d55f3b><div class="indicator" data-v-b8d55f3b></div><a class="VPLink link link" href="/en/develop/system-build-tools.html" data-v-b8d55f3b><!--[--><p class="text" data-v-b8d55f3b>Compilation Tools</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5d98c3a5 data-v-1428d186><div class="VPDoc has-sidebar has-aside" data-v-1428d186 data-v-39a288b8><!--[--><!--]--><div class="container" data-v-39a288b8><div class="aside" data-v-39a288b8><div class="aside-curtain" data-v-39a288b8></div><div class="aside-container" data-v-39a288b8><div class="aside-content" data-v-39a288b8><div class="VPDocAside" data-v-39a288b8 data-v-3f215769><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-3f215769 data-v-a5bbad30><div class="content" data-v-a5bbad30><div class="outline-marker" data-v-a5bbad30></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-a5bbad30>On this page</div><ul class="VPDocOutlineItem root" data-v-a5bbad30 data-v-b933a997><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-39a288b8><div class="content-container" data-v-39a288b8><!--[--><!--]--><main class="main" data-v-39a288b8><div style="position:relative;" class="vp-doc _en_develop_system-build-tools" data-v-39a288b8><div><h1 id="compilation-tools" tabindex="-1">Compilation Tools <a class="header-anchor" href="#compilation-tools" aria-label="Permalink to &quot;Compilation Tools&quot;">​</a></h1><p>static-php-cli uses many system compilation tools when building static PHP. These tools mainly include:</p><ul><li><code>autoconf</code>: used to generate <code>configure</code> scripts.</li><li><code>make</code>: used to execute <code>Makefile</code>.</li><li><code>cmake</code>: used to execute <code>CMakeLists.txt</code>.</li><li><code>pkg-config</code>: Used to find the installation path of dependent libraries.</li><li><code>gcc</code>: used to compile C/C++ projects under Linux.</li><li><code>clang</code>: used to compile C/C++ projects under macOS.</li></ul><p>For Linux and macOS operating systems, these tools can usually be installed through the package manager, which is written in the doctor module. Theoretically we can also compile and download these tools manually, but this will increase the complexity of compilation, so we do not recommend this.</p><h2 id="linux-compilation-tools" tabindex="-1">Linux Compilation Tools <a class="header-anchor" href="#linux-compilation-tools" aria-label="Permalink to &quot;Linux Compilation Tools&quot;">​</a></h2><p>For Linux systems, different distributions have different installation methods for compilation tools. And for static compilation, the package management of some distributions cannot install libraries and tools for pure static compilation. Therefore, for the Linux platform and its different distributions, we currently provide a variety of compilation environment preparations.</p><h3 id="glibc-environment" tabindex="-1">Glibc Environment <a class="header-anchor" href="#glibc-environment" aria-label="Permalink to &quot;Glibc Environment&quot;">​</a></h3><p>The glibc environment refers to the underlying <code>libc</code> library of the system (that is, the C standard library that all programs written in C language are dynamically linked to) uses <code>glibc</code>, which is the default environment for most distributions. For example: Ubuntu, Debian, CentOS, RHEL, openSUSE, Arch Linux, etc.</p><p>In the glibc environment, the package management and compiler we use point to glibc by default, and glibc cannot be statically linked well. One of the reasons it cannot be statically linked is that its network library <code>nss</code> cannot be compiled statically.</p><p>For the glibc environment, in static-php-cli and spc in 2.0-RC8 and later, you can choose two ways to build static PHP:</p><ol><li>Use Docker to build, you can use <code>bin/spc-alpine-docker</code> to build, it will build an Alpine Linux docker image.</li><li>Use <code>bin/spc doctor --auto-fix</code> to install the <code>musl-wrapper</code> and <code>musl-cross-make</code> packages, and then build directly. (<a href="https://github.com/crazywhalecc/static-php-cli/blob/main/src/SPC/doctor/item/LinuxMuslCheck.php" target="_blank" rel="noreferrer">Related source code</a>)</li></ol><p>Generally speaking, the build results in these two environments are consistent, and you can choose according to actual needs.</p><p>In the doctor module, static-php-cli will first detect the current Linux distribution. If the current distribution is a glibc environment, you will be prompted to install the musl-wrapper and musl-cross-make packages.</p><p>The process of installing <code>musl-wrapper</code> in the glibc environment is as follows:</p><ol><li>Download the specific version of <a href="https://musl.libc.org/releases/" target="_blank" rel="noreferrer">musl-wrapper source code</a> from the musl official website.</li><li>Use <code>gcc</code> installed from the package management to compile the musl-wrapper source code and generate <code>musl-libc</code> and other libraries: <code>./configure --disable-gcc-wrapper &amp;&amp; make -j &amp;&amp; sudo make install</code>.</li><li>The musl-wrapper related libraries will be installed in the <code>/usr/local/musl</code> directory.</li></ol><p>The process of installing <code>musl-cross-make</code> in the glibc environment is as follows:</p><ol><li>Download the precompiled <a href="https://dl.static-php.dev/static-php-cli/deps/musl-toolchain/" target="_blank" rel="noreferrer">musl-cross-make</a> compressed package from dl.static-php.dev .</li><li>Unzip to the <code>/usr/local/musl</code> directory.</li></ol><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>In the glibc environment, static compilation can be achieved by directly installing musl-wrapper, but musl-wrapper only contains <code>musl-gcc</code> and not <code>musl-g++</code>, which means that C++ code cannot be compiled. So we need musl-cross-make to provide <code>musl-g++</code>.</p><p>The reason why the musl-cross-make package cannot be compiled directly locally is that its compilation environment requirements are relatively high (requires more than 36GB of memory, compiled under Alpine Linux), so we provide precompiled binary packages that can be used for all Linux distributions.</p><p>At the same time, the package management of some distributions provides musl-wrapper, but musl-cross-make needs to match the corresponding musl-wrapper version, so we do not use package management to install musl-wrapper.</p><p>Compiling musl-cross-make will be introduced in the <strong>musl-cross-make Toolchain Compilation</strong> section of this chapter.</p></div><h3 id="musl-environment" tabindex="-1">Musl Environment <a class="header-anchor" href="#musl-environment" aria-label="Permalink to &quot;Musl Environment&quot;">​</a></h3><p>The musl environment refers to the system&#39;s underlying <code>libc</code> library that uses <code>musl</code>, which is a lightweight C standard library that can be well statically linked.</p><p>For the currently popular Linux distributions, Alpine Linux uses the musl environment, so static-php-cli can directly build static PHP under Alpine Linux. You only need to install basic compilation tools (such as <code>gcc</code>, <code>cmake</code>, etc.) directly from the package management.</p><p>For other distributions, if your distribution uses the musl environment, you can also use static-php-cli to build static PHP directly after installing the necessary compilation tools.</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>In the musl environment, static-php-cli will automatically skip the installation of musl-wrapper and musl-cross-make.</p></div><h3 id="docker-environment" tabindex="-1">Docker Environment <a class="header-anchor" href="#docker-environment" aria-label="Permalink to &quot;Docker Environment&quot;">​</a></h3><p>The Docker environment refers to using Docker containers to build static PHP. You can use <code>bin/spc-alpine-docker</code> to build. Before executing this command, you need to install Docker first, and then execute <code>bin/spc-alpine-docker</code> in the project root directory.</p><p>After executing <code>bin/spc-alpine-docker</code>, static-php-cli will automatically download the Alpine Linux image and then build a <code>cwcc-spc-x86_64</code> or <code>cwcc-spc-aarch64</code> image. Then all build process is performed within this image, which is equivalent to compiling in Alpine Linux.</p><h2 id="musl-cross-make-toolchain-compilation" tabindex="-1">musl-cross-make Toolchain Compilation <a class="header-anchor" href="#musl-cross-make-toolchain-compilation" aria-label="Permalink to &quot;musl-cross-make Toolchain Compilation&quot;">​</a></h2><p>In Linux, although you do not need to manually compile the musl-cross-make tool, if you want to understand its compilation process, you can refer here. Another important reason is that this may not be compiled using automated tools such as CI and Actions, because the existing CI service compilation environment does not meet the compilation requirements of musl-cross-make, and the configuration that meets the requirements is too expensive.</p><p>The compilation process of musl-cross-make is as follows:</p><p>Prepare an Alpine Linux environment (either directly installed or using Docker). The compilation process requires more than <strong>36GB</strong> of memory, so you need to compile on a machine with larger memory. Without this much memory, compilation may fail.</p><p>Then write the following content into the <code>config.mak</code> file:</p><div class="language-makefile vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">makefile</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STAT = -static --static</span></span>
  20. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">FLAG = -g0 -Os -Wno-error</span></span>
  21. <span class="line"></span>
  22. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">ifneq</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">$(</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NATIVE</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,)</span></span>
  23. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">COMMON_CONFIG += CC=&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">$(</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">HOST</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">-gcc </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STAT</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&quot; CXX=&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">$(</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">HOST</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">-g++ </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STAT</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&quot;</span></span>
  24. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">else</span></span>
  25. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">COMMON_CONFIG += CC=&quot;gcc </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STAT</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&quot; CXX=&quot;g++ </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STAT</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&quot;</span></span>
  26. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">endif</span></span>
  27. <span class="line"></span>
  28. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">COMMON_CONFIG += CFLAGS=&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">FLAG</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&quot; CXXFLAGS=&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">FLAG</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&quot; LDFLAGS=&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">STAT</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&quot;</span></span>
  29. <span class="line"></span>
  30. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">BINUTILS_CONFIG += --enable-gold=yes --enable-gprofng=no</span></span>
  31. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">GCC_CONFIG += --enable-static-pie --disable-cet --enable-default-pie </span></span>
  32. <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#--enable-default-pie</span></span>
  33. <span class="line"></span>
  34. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">CONFIG_SUB_REV = 888c8e3d5f7b</span></span>
  35. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">GCC_VER = 13.2.0</span></span>
  36. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">BINUTILS_VER = 2.40</span></span>
  37. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">MUSL_VER = 1.2.4</span></span>
  38. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">GMP_VER = 6.2.1</span></span>
  39. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">MPC_VER = 1.2.1</span></span>
  40. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">MPFR_VER = 4.2.0</span></span>
  41. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">LINUX_VER = 6.1.36</span></span></code></pre></div><p>And also you need to add <code>gcc-13.2.0.tar.xz.sha1</code> file, contents here:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>5f95b6d042fb37d45c6cbebfc91decfbc4fb493c gcc-13.2.0.tar.xz</span></span></code></pre></div><p>If you are using Docker to build, create a new <code>Dockerfile</code> file and write the following content:</p><div class="language-dockerfile vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">dockerfile</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">FROM</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> alpine:edge</span></span>
  42. <span class="line"></span>
  43. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">RUN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> apk add --no-cache \</span></span>
  44. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">gcc g++ git make curl perl \</span></span>
  45. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">rsync patch wget libtool \</span></span>
  46. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">texinfo autoconf automake \</span></span>
  47. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">bison tar xz bzip2 zlib \</span></span>
  48. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">file binutils flex \</span></span>
  49. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">linux-headers libintl \</span></span>
  50. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">gettext gettext-dev icu-libs pkgconf \</span></span>
  51. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">pkgconfig icu-dev bash \</span></span>
  52. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">ccache libarchive-tools zip</span></span>
  53. <span class="line"></span>
  54. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">WORKDIR</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /opt</span></span>
  55. <span class="line"></span>
  56. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">RUN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> git clone https://git.zv.io/toolchains/musl-cross-make.git</span></span>
  57. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">WORKDIR</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /opt/musl-cross-make</span></span>
  58. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">COPY</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> config.mak /opt/musl-cross-make</span></span>
  59. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">COPY</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> gcc-13.2.0.tar.xz.sha1 /opt/musl-cross-make/hashes</span></span>
  60. <span class="line"></span>
  61. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">RUN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> make TARGET=x86_64-linux-musl -j || :</span></span>
  62. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">RUN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> sed -i </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;s/poison calloc/poison/g&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ./gcc-13.2.0/gcc/system.h</span></span>
  63. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">RUN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> make TARGET=x86_64-linux-musl -j</span></span>
  64. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">RUN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> make TARGET=x86_64-linux-musl install -j</span></span>
  65. <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">RUN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tar cvzf x86_64-musl-toolchain.tgz output/*</span></span></code></pre></div><p>If you are using Alpine Linux in a non-Docker environment, you can directly execute the commands in the Dockerfile, for example:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">apk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-cache</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
  66. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">gcc </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">g++</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> make</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> perl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
  67. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">rsync </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">patch</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> wget</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> libtool</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
  68. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">texinfo </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">autoconf</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> automake</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
  69. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">bison </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">tar</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xz</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bzip2</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> zlib</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
  70. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">file </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">binutils</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> flex</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
  71. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">linux-headers </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">libintl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
  72. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">gettext </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">gettext-dev</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> icu-libs</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pkgconf</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
  73. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">pkgconfig </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">icu-dev</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
  74. <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">ccache </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">libarchive-tools</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> zip</span></span>
  75. <span class="line"></span>
  76. <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://git.zv.io/toolchains/musl-cross-make.git</span></span>
  77. <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Copy config.mak to the working directory of musl-cross-make.</span></span>
  78. <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># You need to replace /path/to/config.mak with your config.mak file path.</span></span>
  79. <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/config.mak</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> musl-cross-make/</span></span>
  80. <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/gcc-13.2.0.tar.xz.sha1</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> musl-cross-make/hashes</span></span>
  81. <span class="line"></span>
  82. <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">make</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> TARGET=x86_64-linux-musl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -j</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ||</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> :</span></span>
  83. <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sed</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -i</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;s/poison calloc/poison/g&#39;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./gcc-13.2.0/gcc/system.h</span></span>
  84. <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">make</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> TARGET=x86_64-linux-musl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -j</span></span>
  85. <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">make</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> TARGET=x86_64-linux-musl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -j</span></span>
  86. <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">tar</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> cvzf</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x86_64-musl-toolchain.tgz</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> output/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">*</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>All the above scripts are suitable for x86_64 architecture Linux. If you need to build musl-cross-make for the ARM environment, just replace all <code>x86_64</code> above with <code>aarch64</code>.</p></div><p>This compilation process may fail due to insufficient memory, network problems, etc. You can try a few more times, or use a machine with larger memory to compile. If you encounter problems or you have better improvement solutions, go to <a href="https://github.com/crazywhalecc/static-php-cli-hosted/issues/1" target="_blank" rel="noreferrer">Discussion</a>.</p><h2 id="macos-environment" tabindex="-1">macOS Environment <a class="header-anchor" href="#macos-environment" aria-label="Permalink to &quot;macOS Environment&quot;">​</a></h2><p>For macOS systems, the main compilation tool we use is <code>clang</code>, which is the default compiler for macOS systems and is also the compiler of Xcode.</p><p>Compiling under macOS mainly relies on Xcode or Xcode Command Line Tools. You can download Xcode from the App Store, or execute <code>xcode-select --install</code> in the terminal to install Xcode Command Line Tools.</p><p>In addition, in the <code>doctor</code> environment check module, static-php-cli will check whether Homebrew, compilation tools, etc. are installed on the macOS system. If not, you will be prompted to install them. I will not go into details here.</p><h2 id="freebsd-environment" tabindex="-1">FreeBSD Environment <a class="header-anchor" href="#freebsd-environment" aria-label="Permalink to &quot;FreeBSD Environment&quot;">​</a></h2><p>FreeBSD is also a Unix system, and its compilation tools are similar to macOS. You can directly use the package management <code>pkg</code> to install <code>clang</code> and other compilation tools through the <code>doctor</code> command.</p><h2 id="pkg-config-compilation-nix-only" tabindex="-1">pkg-config Compilation (*nix only) <a class="header-anchor" href="#pkg-config-compilation-nix-only" aria-label="Permalink to &quot;pkg-config Compilation (*nix only)&quot;">​</a></h2><p>If you observe the compilation log when using static-php-cli to build static PHP, you will find that no matter what is compiled, <code>pkg-config</code> will be compiled first. This is because <code>pkg-config</code> is a library used to find dependencies. In earlier versions of static-php-cli, we directly used the <code>pkg-config</code> tool installed by package management, but this would cause some problems, such as:</p><ul><li>Even if <code>PKG_CONFIG_PATH</code> is specified, <code>pkg-config</code> will try to find dependent packages from the system path.</li><li>Since <code>pkg-config</code> will look for dependent packages from the system path, if a dependent package with the same name exists in the system, compilation may fail.</li></ul><p>In order to avoid the above problems, we compile <code>pkg-config</code> into <code>buildroot/bin</code> in user mode and use it. We use parameters such as <code>--without-sysroot</code> to avoid looking for dependent packages from the system path.</p></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-d4a0bba5><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-d4a0bba5><span class="visually-hidden" id="doc-footer-aria-label" data-v-d4a0bba5>Pager</span><div class="pager" data-v-d4a0bba5><a class="VPLink link pager-link prev" href="/en/develop/source-module.html" data-v-d4a0bba5><!--[--><span class="desc" data-v-d4a0bba5>Previous page</span><span class="title" data-v-d4a0bba5>Source</span><!--]--></a></div><div class="pager" data-v-d4a0bba5><!----></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-5d98c3a5 data-v-e315a0ad><div class="container" data-v-e315a0ad><p class="message" data-v-e315a0ad>Released under the MIT License.</p><p class="copyright" data-v-e315a0ad>Copyright © 2023-present crazywhalecc</p></div></footer><!--[--><!--]--></div></div>
  87. <script>window.__VP_HASH_MAP__=JSON.parse("{\"en_guide_extensions.md\":\"C5vF7yDY\",\"zh_develop_index.md\":\"-CPpDfMx\",\"en_guide_index.md\":\"CjOUKFgy\",\"en_contributing_index.md\":\"CsY8mx8F\",\"zh_contributing_index.md\":\"BvgdahxO\",\"en_guide_extension-notes.md\":\"BaBSDnpT\",\"en_index.md\":\"Cbpb4iAg\",\"zh_develop_structure.md\":\"B-0RMSSw\",\"en_guide_troubleshooting.md\":\"9z66WsuC\",\"en_develop_system-build-tools.md\":\"D6vaAwN3\",\"extension-notes.md\":\"Bw8xYOie\",\"extensions.md\":\"BOvD4zE9\",\"zh_guide_action-build.md\":\"DWMlBDvT\",\"zh_guide_env-vars.md\":\"CfYA93uA\",\"zh_guide_cli-generator.md\":\"B7mYo4Lw\",\"zh_guide_deps-map.md\":\"b1yfT0cS\",\"en_faq_index.md\":\"DLWPz-7S\",\"zh_develop_system-build-tools.md\":\"Ds53VEw1\",\"deps-map-ext.md\":\"Ct90_tZH\",\"zh_develop_php-src-changes.md\":\"Df0-NcBw\",\"deps-map-lib.md\":\"CHkEUaxl\",\"zh_guide_build-on-windows.md\":\"BxVEYT8r\",\"en_develop_php-src-changes.md\":\"DLlooohw\",\"en_develop_source-module.md\":\"CdOHR0ez\",\"en_guide_cli-generator.md\":\"DsQUY_G0\",\"index.md\":\"mKXtywCA\",\"en_guide_env-vars.md\":\"DXDG6yvH\",\"en_guide_manual-build.md\":\"cuxk79AG\",\"en_guide_build-on-windows.md\":\"0XosmiyO\",\"zh_guide_troubleshooting.md\":\"DsBZI1Y4\",\"en_develop_structure.md\":\"BA5PDIse\",\"zh_guide_manual-build.md\":\"CPnjjhB_\",\"en_develop_index.md\":\"B7_c9YYa\",\"zh_guide_extension-notes.md\":\"Bk8p1Uuk\",\"zh_guide_extensions.md\":\"A3n52TMR\",\"zh_guide_index.md\":\"20ged7P4\",\"zh_index.md\":\"LslJ1UMp\",\"zh_faq_index.md\":\"DL8Ncj95\",\"en_develop_doctor-module.md\":\"DGd8PeM_\",\"en_guide_action-build.md\":\"BKamBazh\",\"zh_develop_doctor-module.md\":\"DgFAPT6E\",\"zh_develop_source-module.md\":\"D0odLsHX\",\"en_guide_deps-map.md\":\"BMawLo1f\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"static-php-cli\",\"description\":\"Build single static PHP binary, with PHP project together, with popular extensions included.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/crazywhalecc/static-php-cli\"}]},\"locales\":{\"en\":{\"label\":\"English\",\"lang\":\"en\",\"themeConfig\":{\"nav\":[{\"text\":\"Guide\",\"link\":\"/en/guide/\"},{\"text\":\"Advanced\",\"link\":\"/en/develop/\"},{\"text\":\"Contributing\",\"link\":\"/en/contributing/\"},{\"text\":\"FAQ\",\"link\":\"/en/faq/\"}],\"sidebar\":{\"/en/guide/\":[{\"text\":\"Guide\",\"items\":[{\"text\":\"Guide\",\"link\":\"/en/guide/\"},{\"text\":\"Actions Build\",\"link\":\"/en/guide/action-build\"},{\"text\":\"Manual Build\",\"link\":\"/en/guide/manual-build\"},{\"text\":\"Extension List\",\"link\":\"/en/guide/extensions\"},{\"text\":\"Extension Notes\",\"link\":\"/en/guide/extension-notes\"},{\"text\":\"Command Generator\",\"link\":\"/en/guide/cli-generator\"},{\"text\":\"Environment Variables\",\"link\":\"/en/guide/env-vars\",\"collapsed\":true},{\"text\":\"Dependency Table\",\"link\":\"/en/guide/deps-map\"}]},{\"items\":[{\"text\":\"Troubleshooting\",\"link\":\"/en/guide/troubleshooting\"},{\"text\":\"Build on Windows\",\"link\":\"/en/guide/build-on-windows\"}]}],\"/en/develop/\":[{\"text\":\"Development\",\"items\":[{\"text\":\"Get Started\",\"link\":\"/en/develop/\"},{\"text\":\"Project Structure\",\"link\":\"/en/develop/structure\"},{\"text\":\"PHP Source Modification\",\"link\":\"/en/develop/php-src-changes\"}]},{\"text\":\"Module\",\"items\":[{\"text\":\"Doctor \",\"link\":\"/en/develop/doctor-module\"},{\"text\":\"Source\",\"link\":\"/en/develop/source-module\"}]},{\"text\":\"Extra\",\"items\":[{\"text\":\"Compilation Tools\",\"link\":\"/en/develop/system-build-tools\"}]}],\"/en/contributing/\":[{\"text\":\"Contributing\",\"items\":[{\"text\":\"Contributing\",\"link\":\"/en/contributing/\"}]}]},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2023-present crazywhalecc\"}}},\"zh\":{\"label\":\"简体中文\",\"lang\":\"zh\",\"themeConfig\":{\"nav\":[{\"text\":\"构建指南\",\"link\":\"/zh/guide/\"},{\"text\":\"进阶\",\"link\":\"/zh/develop/\"},{\"text\":\"贡献\",\"link\":\"/zh/contributing/\"},{\"text\":\"FAQ\",\"link\":\"/zh/faq/\"}],\"sidebar\":{\"/zh/guide/\":[{\"text\":\"构建指南\",\"items\":[{\"text\":\"指南\",\"link\":\"/zh/guide/\"},{\"text\":\"Actions 构建\",\"link\":\"/zh/guide/action-build\"},{\"text\":\"本地构建\",\"link\":\"/zh/guide/manual-build\"},{\"text\":\"扩展列表\",\"link\":\"/zh/guide/extensions\"},{\"text\":\"扩展注意事项\",\"link\":\"/zh/guide/extension-notes\"},{\"text\":\"编译命令生成器\",\"link\":\"/zh/guide/cli-generator\"},{\"text\":\"环境变量列表\",\"link\":\"/zh/guide/env-vars\"},{\"text\":\"依赖关系图表\",\"link\":\"/zh/guide/deps-map\"}]},{\"items\":[{\"text\":\"故障排除\",\"link\":\"/zh/guide/troubleshooting\"},{\"text\":\"在 Windows 上构建\",\"link\":\"/zh/guide/build-on-windows\"}]}],\"/zh/develop/\":[{\"text\":\"开发指南\",\"items\":[{\"text\":\"开发简介\",\"link\":\"/zh/develop/\"},{\"text\":\"项目结构简介\",\"link\":\"/zh/develop/structure\"},{\"text\":\"对 PHP 源码的修改\",\"link\":\"/zh/develop/php-src-changes\"}]},{\"text\":\"模块\",\"items\":[{\"text\":\"Doctor 环境检查工具\",\"link\":\"/zh/develop/doctor-module\"},{\"text\":\"资源模块\",\"link\":\"/zh/develop/source-module\"}]},{\"text\":\"其他\",\"items\":[{\"text\":\"系统编译工具\",\"link\":\"/zh/develop/system-build-tools\"}]}],\"/zh/contributing/\":[{\"text\":\"贡献指南\",\"items\":[{\"text\":\"贡献指南\",\"link\":\"/zh/contributing/\"}]}]},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2023-present crazywhalecc\"}}}},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
  88. </body>
  89. </html>