diff --git a/config/ext.json b/config/ext.json index af3c48bc..1cf99d1f 100644 --- a/config/ext.json +++ b/config/ext.json @@ -370,6 +370,9 @@ "ext-depends": [ "zlib", "session" + ], + "shared-ext-depends": [ + "session" ] }, "memcached": { @@ -388,6 +391,9 @@ "ext-depends": [ "session", "zlib" + ], + "shared-ext-depends": [ + "session" ] }, "mongodb": { @@ -692,7 +698,8 @@ ], "ext-depends-windows": [ "xml" - ] + ], + "build-with-php": true }, "snappy": { "support": { @@ -912,7 +919,8 @@ ] }, "tokenizer": { - "type": "builtin" + "type": "builtin", + "build-with-php": true }, "uuid": { "support": { @@ -995,7 +1003,8 @@ ], "ext-depends-windows": [ "iconv" - ] + ], + "build-with-php": true }, "xmlreader": { "support": { @@ -1009,7 +1018,8 @@ "ext-depends-windows": [ "xml", "dom" - ] + ], + "build-with-php": true }, "xmlwriter": { "support": { @@ -1022,7 +1032,8 @@ ], "ext-depends-windows": [ "xml" - ] + ], + "build-with-php": true }, "xsl": { "support": { diff --git a/src/SPC/builder/BuilderBase.php b/src/SPC/builder/BuilderBase.php index 08c580ea..599ccdc6 100644 --- a/src/SPC/builder/BuilderBase.php +++ b/src/SPC/builder/BuilderBase.php @@ -262,15 +262,17 @@ abstract class BuilderBase if (!$ext->isBuildShared()) { continue; } - if (Config::getExt($ext->getName(), 'type') === 'builtin') { + if (Config::getExt($ext->getName(), 'type') === 'builtin' || Config::getExt($ext->getName(), 'build-with-php') === true) { if (file_exists(BUILD_MODULES_PATH . '/' . $ext->getName() . '.so')) { logger()->info('Shared extension [' . $ext->getName() . '] was already built by php-src/configure (' . $ext->getName() . '.so)'); continue; } - logger()->warning('Shared extension [' . $ext->getName() . '] was built statically by php-src/configure'); - continue; + if (Config::getExt($ext->getName(), 'build-with-php') === true) { + logger()->warning('Shared extension [' . $ext->getName() . '] did not build with php-src/configure (' . $ext->getName() . '.so)'); + logger()->warning('Try deleting your build and source folders and running `spc build`` again.'); + continue; + } } - logger()->info('Building extension [' . $ext->getName() . '] as shared extension (' . $ext->getName() . '.so)'); $ext->buildShared(); } } catch (RuntimeException $e) { @@ -293,7 +295,11 @@ abstract class BuilderBase foreach ($this->getExts() as $ext) { $arg = $ext->getConfigureArg(); if ($ext->isBuildShared()) { - if (Config::getExt($ext->getName(), 'type') === 'builtin') { + if ( + (Config::getExt($ext->getName(), 'type') === 'builtin' && + !file_exists(SOURCE_PATH . '/php-src/ext/' . $ext->getName() . '/config.m4')) || + Config::getExt($ext->getName(), 'build-with-php') === true + ) { $arg = $ext->getConfigureArg(true); } else { continue;