commit:     e9c56fed4a8d8aae7e9786665778086949ce778a
Author:     Brahmajit Das <listout <AT> listout <DOT> xyz>
AuthorDate: Sun Nov  9 07:39:06 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 11 04:46:29 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9c56fed

sys-cluster/ucx: add 1.19.0

Fix build w/ clang >= 21. The clang fix is gentoo specific, we are
removing -Werror, and upstream should make the final decision.

[sam: Added Closes tag because of -Werror.]

Closes: https://bugs.gentoo.org/969618
Signed-off-by: Brahmajit Das <listout <AT> listout.xyz>
Part-of: https://github.com/gentoo/gentoo/pull/44548
Closes: https://github.com/gentoo/gentoo/pull/44548
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-cluster/ucx/Manifest                           |  1 +
 sys-cluster/ucx/files/ucx-1.19.0-clang21-fix.patch | 57 +++++++++++++++++++++
 sys-cluster/ucx/ucx-1.19.0.ebuild                  | 59 ++++++++++++++++++++++
 3 files changed, 117 insertions(+)

diff --git a/sys-cluster/ucx/Manifest b/sys-cluster/ucx/Manifest
index 7f7043e8457d..1be6c3b83926 100644
--- a/sys-cluster/ucx/Manifest
+++ b/sys-cluster/ucx/Manifest
@@ -1 +1,2 @@
 DIST ucx-1.18.1.tar.gz 3313043 BLAKE2B 
6769ee77c58934fa765d2df841e3b32ba0d6c05ba0e90bd2e7aa8803ab1be3802773aab6088eb8f8ff0a1eee838f27aadd841f8210c6bcf45c02edcd8b4dbadc
 SHA512 
bcab4a93c1fbf154275c6cdedfc981600cbac43d850f70e2cbfa0dfc73160be8808442acb86154ea964aaea0364aa9a37c41f4c643fa143f54e9d238b13820c7
+DIST ucx-1.19.0.tar.gz 3391294 BLAKE2B 
ca9d81861354f695d679504dbbc79d7c9d18ec7ff520e503df5e22eedfafe20095c802f5d4c9ee8e460998b5aa1e19dac0ce7f91fb8dd51e4ecd1926b66d0d9a
 SHA512 
bcd727df3e3e281424bc8da5247bd5396b7b1b0f3113265d4dc2e401442710776aa3c251e05db633321171359c63e3166c95d21b2296207a37eb6e2e29845f90

diff --git a/sys-cluster/ucx/files/ucx-1.19.0-clang21-fix.patch 
b/sys-cluster/ucx/files/ucx-1.19.0-clang21-fix.patch
new file mode 100644
index 000000000000..398c5ad7ca39
--- /dev/null
+++ b/sys-cluster/ucx/files/ucx-1.19.0-clang21-fix.patch
@@ -0,0 +1,57 @@
+https://github.com/openucx/ucx/pull/10998
+From: Brahmajit Das <[email protected]>
+Date: Sun, 9 Nov 2025 12:37:47 +0530
+Subject: [PATCH 1/2] UCS/BITMAP/TEST: Fix build with >= Clang 21
+
+First caught on Gentoo LLVM with Clang 21.1.5 and LLVM 21.1.5
+Build with fail with the following error message
+
+This is cause due to Clang enabling default-const-init-var-unsafe by default,
+and -Werror makes it treat as an warning. This is better fixed by upstream
+developer so this commit mostly a RFC from upstream.
+
+Signed-off-by: Brahmajit Das <[email protected]>
+--- a/config/m4/compiler.m4
++++ b/config/m4/compiler.m4
+@@ -10,7 +10,7 @@
+ #
+ # Initialize CFLAGS
+ #
+-BASE_CFLAGS="-g -Wall -Werror"
++BASE_CFLAGS="-g -Wall"
+ 
+ # Prevent libtool from suppression of warnings
+ LT_CFLAGS="-no-suppress"
+
+From 9ac4c2c6d8935c251f5eeda53634817946f6c794 Mon Sep 17 00:00:00 2001
+From: Brahmajit Das <[email protected]>
+Date: Sun, 9 Nov 2025 12:42:29 +0530
+Subject: [PATCH 2/2] TEST/IODEMO: Use std::shuffle when available
+
+random_shuffle was deprecated in C++14 and completely removed in C++17.
+With newer compilers like Clang 21, the build fails. This commit should
+preserve older behavior and use std::shuffle when available.
+
+Signed-off-by: Brahmajit Das <[email protected]>
+--- a/test/apps/iodemo/io_demo.cc
++++ b/test/apps/iodemo/io_demo.cc
+@@ -19,6 +19,7 @@
+ #include <csignal>
+ #include <cerrno>
+ #include <vector>
++#include <random>
+ #include <map>
+ #include <queue>
+ #include <algorithm>
+@@ -2999,8 +3000,9 @@ static int do_client(options_t& test_opts)
+     LOG << "random seed: " << test_opts.random_seed;
+ 
+     // randomize servers to optimize startup
+-    std::random_shuffle(test_opts.servers.begin(), test_opts.servers.end(),
+-                        IoDemoRandom::urand<size_t>);
++    std::random_device rd;
++    std::mt19937 rng(rd());
++    std::shuffle(test_opts.servers.begin(), test_opts.servers.end(), rng);
+ 
+     UcxLog vlog(LOG_PREFIX, test_opts.verbose);
+     vlog << "List of servers:";

diff --git a/sys-cluster/ucx/ucx-1.19.0.ebuild 
b/sys-cluster/ucx/ucx-1.19.0.ebuild
new file mode 100644
index 000000000000..859e7ec96179
--- /dev/null
+++ b/sys-cluster/ucx/ucx-1.19.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic toolchain-funcs
+
+MY_PV=${PV/_/-}
+DESCRIPTION="Unified Communication X"
+HOMEPAGE="https://openucx.org";
+SRC_URI="https://github.com/openucx/ucx/releases/download/v${PV}/${P}.tar.gz";
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 -riscv ~x86 ~amd64-linux ~x86-linux"
+IUSE="+openmp"
+
+RDEPEND="
+       sys-libs/binutils-libs:=
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.19.0-clang21-fix.patch
+)
+
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+
+       BASE_CFLAGS="" econf \
+               --disable-doxygen-doc \
+               --disable-compiler-opt \
+               --without-fuse3 \
+               --without-go \
+               --without-java \
+               $(use_enable openmp)
+}
+
+src_compile() {
+       BASE_CFLAGS="" emake
+}
+
+src_install() {
+       default
+       find "${ED}" -type f -name '*.la' -delete || die
+}

Reply via email to