Compare commits

..

1 commit

Author SHA1 Message Date
David Abdurachmanov
4144d9af16 Enable riscv64
This seems to be available since 1.16 version.

https://github.com/openucx/ucx/pull/9168

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-10-30 14:02:03 +01:00
6 changed files with 39 additions and 210 deletions

2
.gitignore vendored
View file

@ -23,5 +23,3 @@
/ucx-1.15.0.tar.gz
/ucx-1.16.0.tar.gz
/ucx-1.17.0.tar.gz
/ucx-1.18.1.tar.gz
/ucx-1.19.0.tar.gz

View file

@ -1,19 +0,0 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/
jobs:
- job: pull_from_upstream
trigger: release
dist_git_branches:
- fedora-rawhide
- job: koji_build
trigger: commit
dist_git_branches:
- fedora-rawhide
- job: bodhi_update
trigger: commit
dist_git_branches:
- fedora-branched

29
9558.patch Normal file
View file

@ -0,0 +1,29 @@
From 99264b7352e9b89bfa8cfb2862a9fabd9eb5d764 Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Tue, 19 Dec 2023 13:13:25 -0500
Subject: [PATCH] BUILD/CONFIG: Keep CFLAGS and CXXFLAGS separate
If configured with CFLAGS containing flags which are specific to C and invalid in CXX, this results in errors when compiling src/tools/perf/lib/uc[pt]_tests.cc:
```
cc1plus: error: '-Werror=' argument '-Werror=implicit-function-declaration' is not valid for C++ [-Werror]
cc1plus: error: '-Werror=' argument '-Werror=implicit-int' is not valid for C++ [-Werror]
```
This is currently breaking the build in Fedora 40 (rawhide) and ELN (the future RHEL 10).
---
config/m4/compiler.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/m4/compiler.m4 b/config/m4/compiler.m4
index 6aa3360e76a..2719e98983b 100644
--- a/config/m4/compiler.m4
+++ b/config/m4/compiler.m4
@@ -222,7 +222,7 @@ AC_DEFUN([CHECK_COMPILER_FLAG],
[
AC_MSG_CHECKING([compiler flag $1])
SAVE_CFLAGS="$CFLAGS"
- SAVE_CXXFLAGS="$CFLAGS"
+ SAVE_CXXFLAGS="$CXXFLAGS"
CFLAGS="$BASE_CFLAGS $CFLAGS $2"
CXXFLAGS="$BASE_CXXFLAGS $CXXFLAGS $2"
AC_LINK_IFELSE([$3],

View file

@ -1,66 +0,0 @@
From 0ee91e1c571668732ee05b1525e7fa8f72427c0f Mon Sep 17 00:00:00 2001
From: Kamal Heib <kheib@redhat.com>
Date: Fri, 5 Dec 2025 12:00:49 -0500
Subject: [PATCH] Avoid build failure
Signed-off-by: Kamal Heib <kheib@redhat.com>
---
src/tools/perf/perftest_params.c | 2 +-
src/ucs/config/parser.c | 2 +-
src/uct/ib/base/ib_device.c | 7 ++++---
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/tools/perf/perftest_params.c b/src/tools/perf/perftest_params.c
index 9098cdaed2f6..b7a5dcde01e2 100644
--- a/src/tools/perf/perftest_params.c
+++ b/src/tools/perf/perftest_params.c
@@ -560,7 +560,7 @@ static ucs_status_t init_daemon_params(ucx_perf_params_t *params)
ucs_status_t parse_test_params(perftest_params_t *params, char opt,
const char *opt_arg)
{
- char *optarg2 = NULL;
+ const char *optarg2 = NULL;
test_type_t *test;
unsigned i;
diff --git a/src/ucs/config/parser.c b/src/ucs/config/parser.c
index 696a4ebd2186..2338ceab0380 100644
--- a/src/ucs/config/parser.c
+++ b/src/ucs/config/parser.c
@@ -644,7 +644,7 @@ int ucs_config_sprintf_bw(char *buf, size_t max, const void *src,
int ucs_config_sscanf_bw_spec(const char *buf, void *dest, const void *arg)
{
ucs_config_bw_spec_t *dst = (ucs_config_bw_spec_t*)dest;
- char *delim;
+ const char *delim;
delim = strchr(buf, ':');
if (!delim) {
diff --git a/src/uct/ib/base/ib_device.c b/src/uct/ib/base/ib_device.c
index bcef1b0a4025..f77809be5a9a 100644
--- a/src/uct/ib/base/ib_device.c
+++ b/src/uct/ib/base/ib_device.c
@@ -1305,7 +1305,8 @@ ucs_status_t uct_ib_device_find_port(uct_ib_device_t *dev,
const char *ibdev_name;
unsigned port_num;
size_t devname_len;
- char *p;
+ const char *p;
+ char *endptr;
p = strrchr(resource_dev_name, ':');
if (p == NULL) {
@@ -1320,8 +1321,8 @@ ucs_status_t uct_ib_device_find_port(uct_ib_device_t *dev,
goto err; /* Device name is wrong */
}
- port_num = strtod(p + 1, &p);
- if (*p != '\0') {
+ port_num = strtod(p + 1, &endptr);
+ if (*endptr != '\0') {
goto err; /* Failed to parse port number */
}
if ((port_num < dev->first_port) || (port_num >= dev->first_port + dev->num_ports)) {
--
2.51.1

View file

@ -1 +1 @@
SHA512 (ucx-1.19.0.tar.gz) = bcd727df3e3e281424bc8da5247bd5396b7b1b0f3113265d4dc2e401442710776aa3c251e05db633321171359c63e3166c95d21b2296207a37eb6e2e29845f90
SHA512 (ucx-1.17.0.tar.gz) = 1033959bd223d1b4507b2a159e6ce65e76c1c5f231afc166bb0ed2e5c6c4aaa3db96b7c35c97c8b332e6e11f4ab24deb66d484009b7dc2af52b73981c1e72a25

131
ucx.spec
View file

@ -5,25 +5,13 @@
%bcond_without ib
%bcond_with knem
%bcond_without rdmacm
%bcond_with rocm
%bcond_with ugni
%bcond_with xpmem
%bcond_with vfs
%bcond_with mad
%bcond_without mlx5
%bcond_with efa
%ifarch x86_64
%if 0%{?fedora} <= 42
%bcond_with rocm
%else
%bcond_without rocm
%endif
%else
%bcond_with rocm
%endif
Name: ucx
Version: 1.19.0
Version: 1.17.0
Release: 3%{?dist}
Summary: UCX is a communication library implementing high-performance messaging
@ -40,7 +28,10 @@ License: BSD-3-Clause AND MIT AND CC-PDDC AND (BSD-3-Clause OR Apache-2.0)
URL: http://www.openucx.org
Source: https://github.com/openucx/%{name}/releases/download/v%{version}/ucx-%{version}.tar.gz
Patch: Avoid-build-failure.patch
# BUILD/CONFIG: Keep CFLAGS and CXXFLAGS separate
# Fixes build for https://fedoraproject.org/wiki/Changes/PortingToModernC
Patch0: https://github.com/openucx/%{name}/pull/9558.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Prefix: %{_prefix}
@ -67,12 +58,6 @@ BuildRequires: gdrcopy
%if %{with ib}
BuildRequires: libibverbs-devel
%endif
%if %{with mlx5}
BuildRequires: rdma-core-devel
%endif
%if %{with efa}
BuildRequires: rdma-core-devel
%endif
%if %{with knem}
BuildRequires: knem
%endif
@ -80,8 +65,7 @@ BuildRequires: knem
BuildRequires: librdmacm-devel
%endif
%if %{with rocm}
BuildRequires: rocm-hip-devel
BuildRequires: chrpath
BuildRequires: hsa-rocr-dev
%endif
%if %{with xpmem}
BuildRequires: xpmem-devel
@ -89,10 +73,6 @@ BuildRequires: xpmem-devel
%if %{with vfs}
BuildRequires: fuse3-devel
%endif
%if %{with mad}
BuildRequires: libibmad-devel libibumad-devel
%endif
%description
UCX is an optimized communication framework for high-performance distributed
@ -119,23 +99,12 @@ Provides header files and examples for developing with UCX.
%prep
%setup -q
%patch -P0 -p1
# https://github.com/openucx/ucx/issues/10542
# With ROCm 6.3+ libhsakmt is bundled with libhsa-runtime64
# Remove this nonexistent library
sed -i 's@-lhsakmt@@' config/m4/rocm.m4
# Relax use of -Werror
sed -i 's@-Werror@@' config/m4/compiler.m4
autoreconf -fiv
# https://github.com/openucx/ucx/commit/b0a275a5492125a13020cd095fe9934e0b5e7c6a
# can be removed on release after 1.17.0
sed -i '/#include <limits.h>/a #include <math.h>' src/ucs/time/time.h
%build
# may be fixed in 1.19.0
%set_build_flags
export CFLAGS="$CFLAGS -std=gnu17"
%define _with_arg() %{expand:%%{?with_%{1}:--with-%{2}}%%{!?with_%{1}:--without-%{2}}}
%define _enable_arg() %{expand:%%{?with_%{1}:--enable-%{2}}%%{!?with_%{1}:--disable-%{2}}}
@ -145,21 +114,16 @@ export CFLAGS="$CFLAGS -std=gnu17"
--disable-assertions \
--disable-params-check \
--without-java \
%if %{with rocm}
--with-rocm=%{_prefix} \
%endif
%_enable_arg cma cma \
%_with_arg cuda cuda \
%_with_arg gdrcopy gdrcopy \
%_with_arg ib verbs \
%_with_arg mlx5 mlx5 \
%_with_arg efa efa \
%_with_arg knem knem \
%_with_arg rdmacm rdmacm \
%_with_arg rocm rocm \
%_with_arg xpmem xpmem \
%_with_arg vfs fuse3 \
%_with_arg ugni ugni \
%_with_arg mad mad \
%{?configure_options}
make %{?_smp_mflags} V=1
@ -171,16 +135,6 @@ rm -f %{buildroot}%{_libdir}/ucx/*.la
rm -f %{buildroot}%{_libdir}/ucx/lib*.so
rm -f %{buildroot}%{_libdir}/ucx/lib*.a
%if %{with rocm}
# ERROR 0002: file '/usr/lib64/ucx/libucx_perftest_rocm.so.0.0.0' contains an
# invalid runpath '/usr/hip/lib' in [/usr/hip/lib:/usr/lib:/usr/lib64]
# Build is confused, assumes rocm is part of AMD's release to /opt/rocm/hip/lib
# We install ROCm to system locations, so rpath is not needed, delete them
chrpath -d %{buildroot}%{_libdir}/ucx/libucx_perftest_rocm.so.0.0.0
chrpath -d %{buildroot}%{_libdir}/ucx/libucm_rocm.so.0.0.0
chrpath -d %{buildroot}%{_libdir}/ucx/libuct_rocm.so.0.0.0
%endif
%files
%{_libdir}/lib*.so.*
%{_bindir}/ucx_info
@ -307,9 +261,8 @@ Provides Radeon Open Compute (ROCm) Runtime support for UCX.
%files rocm
%dir %{_libdir}/ucx
%{_libdir}/ucx/libucm_rocm.so.*
%{_libdir}/ucx/libuct_rocm.so.*
%{_libdir}/ucx/libucx_perftest_rocm.so.*
%{_libdir}/ucx/libucm_rocm.so.*
%if %{with gdrcopy}
%package rocmgdr
@ -370,73 +323,7 @@ status, and more.
%{_bindir}/ucx_vfs
%endif
%if %{with mlx5}
%package ib-mlx5
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: UCX IB MLX5 RDMA provider support
Group: System Environment/Libraries
%description ib-mlx5
Provides support for DevX, Direct Verbs and DC transports for Infiniband
devices.
%files ib-mlx5
%{_libdir}/ucx/libuct_ib_mlx5.so.*
%endif
%if %{with efa}
%package ib-efa
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: UCX EFA device RDMA support
Group: System Environment/Libraries
%description ib-efa
Provides support for EFA device as an IBTA transport for UCX.
%files ib-efa
%{_libdir}/ucx/libuct_ib_efa.so.*
%endif
%if %{with mad}
%package mad
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: UCX Infiniband MAD support
Group: System Environment/Libraries
%description mad
Provide Infiniband MAD support for UCX. Enables running perftest using
Infiniband datagrams for out-of-band communications.
%files mad
%{_libdir}/ucx/libucx_perftest_mad.so.*
%endif
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Fri Jan 16 2026 Tom Rix <Tom.Rix@amd.com> - 1.19.0-2
- Relax use of -Werror
* Fri Dec 05 2025 Kamal Heib <kheib@redhat.com> - 1.19.0-1
- Update to version 1.19.0
* Mon Nov 24 2025 Tom Rix <Tom.Rix@amd.com> - 1.18.1-3
- Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Wed Jun 25 2025 Kamal Heib <kheib@redhat.com> - 1.18.1-1
- Update to version 1.18.1
- Resolves: rhbz#2328935
* Sun Mar 9 2025 Tom Rix <Tom.Rix@amd.com> - 1.17.0-5
- ROCm is part of Fedora, so build it.
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.17.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Oct 30 2024 David Abdurachmanov <davidlt@rivosinc.com> - 1.17.0-3
- Enable riscv64