Skip to content

Commit 00e50bb

Browse files
committed
protobuf and grpc don't conflict when they're built shared
1 parent 16a4245 commit 00e50bb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

config/env.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force"
8686
; configure command
8787
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --disable-shared --enable-static --disable-all --disable-cgi --disable-phpdbg --with-pic"
8888
; make command
89-
SPC_CMD_PREFIX_PHP_MAKE="make -j${CPU_COUNT}"
89+
SPC_CMD_PREFIX_PHP_MAKE="make"
9090
; embed type for php, static (libphp.a) or shared (libphp.so)
9191
SPC_CMD_VAR_PHP_EMBED_TYPE="static"
9292

src/SPC/builder/extension/protobuf.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ public function validate(): void
1515
if ($this->builder->getPHPVersionID() < 80000 && getenv('SPC_SKIP_PHP_VERSION_CHECK') !== 'yes') {
1616
throw new \RuntimeException('The latest protobuf extension requires PHP 8.0 or later');
1717
}
18+
$grpc = $this->builder->getExt('grpc');
1819
// protobuf conflicts with grpc
19-
if ($this->builder->getExt('grpc') !== null) {
20+
if ($grpc?->isBuildStatic()) {
2021
throw new \RuntimeException('protobuf conflicts with grpc, please remove grpc or protobuf extension');
2122
}
2223
}

0 commit comments

Comments
 (0)