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@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@gentoo.org>
This commit is contained in:
Brahmajit Das
2025-11-09 13:09:06 +05:30
committed by Sam James
parent 98e5db18d3
commit e9c56fed4a
3 changed files with 117 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1,57 @@
https://github.com/openucx/ucx/pull/10998
From: Brahmajit Das <listout@listout.xyz>
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 <listout@listout.xyz>
--- 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 <listout@listout.xyz>
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 <listout@listout.xyz>
--- 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:";

View File

@@ -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
}