Skip to content

Commit

Permalink
fix opcache loading wrong libstdc++.so.6
Browse files Browse the repository at this point in the history
  • Loading branch information
DubbleClick committed Oct 1, 2023
1 parent 611af0d commit f583948
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/SPC/builder/linux/LinuxBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ' .
Expand Down
8 changes: 5 additions & 3 deletions src/SPC/builder/linux/library/libxml2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -34,14 +34,16 @@ 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 ' .
'-DLIBXML2_WITH_TESTS=OFF ' .
'..'
)
->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/');
}
}

0 comments on commit f583948

Please sign in to comment.