Skip to content

Commit 8639614

Browse files
committed
devel:18/pg_tde: pull gcc-c++ into SUSE chroots for the C++ KMIP client
Upstream commit 844379e (post-2.2.1) made pg_tde need a C++ compiler for the new C++ KMIP client library. On openSUSE Tumbleweed and Leap 16 the spec never installed one, so meson fell back to clang++ (present only via the llvmjit BuildRequires) while C was still compiled by gcc. With SUSE's default -flto=auto that mixed toolchain cannot be linked: gcc-ar cannot index clang LLVM bitcode archives and clang's ld.bfd cannot read gcc LTO objects, failing with libkmipclient.a: error adding symbols: archive has no index plugin needed to handle lto object Add gcc-c++ to the suse_version BuildRequires so meson picks c++ (g++) and the whole build uses one toolchain. Verified in a Tumbleweed container against the published staging:18 repo with clang installed and -flto=auto in C/CXX/LDFLAGS: meson selects c++ (gcc 15.3.0), all targets link, pg_tde.so is produced. Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
1 parent 0f4b6f9 commit 8639614

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

root/ppg/devel/18/percona-pg_tde/rpm/pg_tde.spec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ BuildRequires: json-c-devel lz4-devel libzstd-devel numactl-devel
3838
%endif
3939
%if 0%{?suse_version}
4040
BuildRequires: libjson-c-devel liblz4-devel libzstd-devel >= 1.4.0 libnuma-devel
41+
# The C++ KMIP client needs a C++ compiler. Without gcc-c++ in the chroot
42+
# meson falls back to clang++ (pulled in via the llvmjit BuildRequires) while
43+
# C is compiled by gcc; with SUSE's default -flto=auto the mixed toolchain
44+
# produces archives/objects the linker cannot combine.
45+
BuildRequires: gcc-c++
4146
%endif
4247
Requires: postgresql%{pgmajorversion}-server curl openssl
4348

0 commit comments

Comments
 (0)