Skip to content

Commit d789b1a

Browse files
committed
fix musl toolchain (needs LD_LIBRARY_PATH)
1 parent 17a25b4 commit d789b1a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,16 @@ protected function build(): void
9595
'$(OBJS_FRONTEND): CPPFLAGS += -UUSE_PRIVATE_ENCODING_FUNCS -DFRONTEND',
9696
);
9797

98+
$env = [
99+
'CFLAGS' => $cflags,
100+
];
101+
if ($ldLibraryPath = getenv('SPC_LD_LIBRARY_PATH')) {
102+
$env['LD_LIBRARY_PATH'] = $ldLibraryPath;
103+
}
104+
98105
// configure
99106
shell()->cd($this->source_dir . '/build')->initializeEnv($this)
100-
->appendEnv(['CFLAGS' => $cflags])
107+
->appendEnv($env)
101108
->exec(
102109
"{$envs} ../configure " .
103110
"--prefix={$builddir} " .

0 commit comments

Comments
 (0)