Skip to content

Commit 7628847

Browse files
committed
suboptimal solutions, but a bit closer to building
1 parent 955b586 commit 7628847

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

config/env.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ CXX=${SPC_LINUX_DEFAULT_CXX}
7171
AR=${SPC_LINUX_DEFAULT_AR}
7272
LD=${SPC_LINUX_DEFAULT_LD}
7373
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
74-
SPC_DEFAULT_C_FLAGS="-fPIC -Os"
74+
SPC_DEFAULT_C_FLAGS="-fPIC -Os -Wno-error=date-time"
7575
SPC_DEFAULT_CXX_FLAGS="-fPIC -Os"
7676
; extra libs for building php executable, used in `make` command for building php (this value may changed by extension build process, space separated)
7777
SPC_EXTRA_LIBS=

src/SPC/builder/extension/amqp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function patchBeforeMake(): bool
2525

2626
public function getUnixConfigureArg(bool $shared = false): string
2727
{
28-
return '--with-amqp' . ($shared ? '=shared' : '') . ' --with-librabbitmq-dir=' . BUILD_ROOT_PATH;
28+
return '--with-amqp' . ($sh<ared ? '=shared' : '') . ' --with-librabbitmq-dir=' . BUILD_ROOT_PATH;
2929
}
3030

3131
public function getWindowsConfigureArg($shared = false): string

src/SPC/builder/extension/imagick.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function patchBeforeMake(): bool
1919
return false;
2020
}
2121
// imagick with calls omp_pause_all, which requires openmp, on non-musl we build imagick without openmp
22-
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lgomp');
22+
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lomp');
2323
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
2424
return true;
2525
}

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ protected function buildFrankenphp(): void
348348
'GOPATH' => PKG_ROOT_PATH . '/go',
349349
'CGO_ENABLED' => '1',
350350
'CGO_CFLAGS' => $config['cflags'],
351-
'CGO_LDFLAGS' => "{$config['ldflags']} {$config['libs']} {$lrt}",
351+
'CGO_LDFLAGS' => "{$config['ldflags']} {$config['libs']} {$lrt} -L/usr/lib64",
352352
'XCADDY_GO_BUILD_FLAGS' => '-buildmode=pie ' .
353353
'-ldflags \"-linkmode=external ' . $extLdFlags . ' ' . $debugFlags .
354354
'-X \'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP ' .

src/SPC/builder/unix/library/librdkafka.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use SPC\exception\FileSystemException;
88
use SPC\exception\RuntimeException;
9+
use SPC\store\FileSystem;
910
use SPC\util\executor\UnixAutoconfExecutor;
1011

1112
trait librdkafka
@@ -16,6 +17,7 @@ trait librdkafka
1617
*/
1718
protected function build(): void
1819
{
20+
FileSystem::replaceFileStr($this->source_dir . '/lds-gen.py', "funcs.append('rd_ut_coverage_check')", '');
1921
UnixAutoconfExecutor::create($this)
2022
->optionalLib(
2123
'zstd',

src/SPC/util/SPCConfigUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private function getLibsString(array $libraries, bool $withDependencies = false)
147147
}
148148
// patch: imagick (imagemagick wrapper) for linux needs libgomp
149149
if (in_array('imagemagick', $libraries) && PHP_OS_FAMILY === 'Linux' && !(getenv('SPC_LIBC') === 'glibc' && str_contains(getenv('CC'), 'devtoolset-10'))) {
150-
$short_name[] = '-lgomp';
150+
$short_name[] = '-lomp';
151151
}
152152
return implode(' ', $short_name);
153153
}

0 commit comments

Comments
 (0)