diff --git a/src/SPC/builder/linux/LinuxBuilder.php b/src/SPC/builder/linux/LinuxBuilder.php index 88cb4692..6a652ad3 100644 --- a/src/SPC/builder/linux/LinuxBuilder.php +++ b/src/SPC/builder/linux/LinuxBuilder.php @@ -188,8 +188,10 @@ public function buildPHP(int $build_target = BUILD_TARGET_NONE): void $enableMicro = ($build_target & BUILD_TARGET_MICRO) === BUILD_TARGET_MICRO; $enableEmbed = ($build_target & BUILD_TARGET_EMBED) === BUILD_TARGET_EMBED; + $arch = arch2gnu(php_uname('m')) === 'x86_64' ? 'x86_64-linux-musl' : 'aarch64-linux-musl'; shell()->cd(SOURCE_PATH . '/php-src') ->exec( + 'LD_LIBRARY_PATH=/usr/local/musl/' . $arch . '/lib ' . './configure ' . '--prefix= ' . '--with-valgrind=no ' . diff --git a/src/SPC/builder/linux/library/libxml2.php b/src/SPC/builder/linux/library/libxml2.php index 9856f527..ae44b9eb 100644 --- a/src/SPC/builder/linux/library/libxml2.php +++ b/src/SPC/builder/linux/library/libxml2.php @@ -19,7 +19,7 @@ class libxml2 extends LinuxLibraryBase public function build(): void { $enable_zlib = $this->builder->getLib('zlib') ? 'ON' : 'OFF'; - // $enable_icu = $this->builder->getLib('icu') ? 'ON' : 'OFF'; + $enable_icu = $this->builder->getLib('icu') ? 'ON' : 'OFF'; $enable_xz = $this->builder->getLib('xz') ? 'ON' : 'OFF'; FileSystem::resetDir($this->source_dir . '/build'); @@ -34,7 +34,7 @@ public function build(): void '-DLIBXML2_WITH_ICONV=ON ' . '-DIconv_IS_BUILT_IN=OFF ' . "-DLIBXML2_WITH_ZLIB={$enable_zlib} " . - '-DLIBXML2_WITH_ICU=OFF ' . + "-DLIBXML2_WITH_ICU={$enable_icu} " . "-DLIBXML2_WITH_LZMA={$enable_xz} " . '-DLIBXML2_WITH_PYTHON=OFF ' . '-DLIBXML2_WITH_PROGRAMS=OFF ' . @@ -42,6 +42,8 @@ public function build(): void '..' ) ->exec("cmake --build . -j {$this->builder->concurrency}") - ->exec('make install'); + ->exec('make install') + ->exec('mv ' . BUILD_ROOT_PATH . '/lib64/pkgconfig/* ' . BUILD_ROOT_PATH . '/lib/pkgconfig/') + ->exec('mv ' . BUILD_ROOT_PATH . '/lib64/*.a ' . BUILD_ROOT_PATH . '/lib/'); } }