add error

This commit is contained in:
henderkes 2025-10-12 22:26:06 +02:00
parent 6e79401ab5
commit 19be5263b5

View File

@ -156,6 +156,9 @@ class LinuxBuilder extends UnixBuilderBase
}
$shared_extensions = array_map('trim', array_filter(explode(',', $this->getOption('build-shared'))));
if (!empty($shared_extensions)) {
if (SPCTarget::isStatic()) {
throw new WrongUsageException("You're building against musl libc statically, but you're trying to build shared extensions. Musl libc does not implement `dlopen`, so your php binary is not able to load shared extensions.");
}
logger()->info('Building shared extensions ...');
$this->buildSharedExts();
}