Skip to content

Commit 55fd7ba

Browse files
committed
bring back static -lstdc++ for rhel 2.17
1 parent e34eb50 commit 55fd7ba

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/SPC/builder/extension/imagick.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace SPC\builder\extension;
66

77
use SPC\builder\Extension;
8+
use SPC\builder\linux\SystemUtil;
89
use SPC\util\CustomExt;
910

1011
#[CustomExt('imagick')]
@@ -15,4 +16,14 @@ public function getUnixConfigureArg(bool $shared = false): string
1516
$disable_omp = ' ac_cv_func_omp_pause_resource_all=no';
1617
return '--with-imagick=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . $disable_omp;
1718
}
19+
20+
protected function getStaticAndSharedLibs(): array
21+
{
22+
[$static, $shared] = parent::getStaticAndSharedLibs();
23+
if (SystemUtil::getLibcVersionIfExists('glibc') && SystemUtil::getLibcVersionIfExists('glibc') <= '2.17') {
24+
$static .= ' -lstdc++';
25+
$shared = str_replace('-lstdc++', '', $shared);
26+
}
27+
return [$static, $shared];
28+
}
1829
}

src/globals/test-extensions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// 'macos-13', // bin/spc for x86_64
2525
// 'macos-14', // bin/spc for arm64
2626
'macos-15', // bin/spc for arm64
27-
'ubuntu-latest', // bin/spc-alpine-docker for x86_64
27+
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
2828
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
2929
'ubuntu-24.04', // bin/spc for x86_64
3030
// 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64

0 commit comments

Comments
 (0)