From 0f94aba18fe9eb09488f568190360f0ab06329f6 Mon Sep 17 00:00:00 2001 From: Kamal Heib Date: Mar 27 2024 15:29:16 +0000 Subject: Fix build failure for i686 Resolves: RHEL-30655 Signed-off-by: Kamal Heib --- diff --git a/0001-pyverbs-Fix-build-failure.patch b/0001-pyverbs-Fix-build-failure.patch new file mode 100644 index 0000000..1ab06ea --- /dev/null +++ b/0001-pyverbs-Fix-build-failure.patch @@ -0,0 +1,35 @@ +From 4d0e1a40d8662cf0e2b00ef944ddf6dcef27f7f2 Mon Sep 17 00:00:00 2001 +From: Kamal Heib +Date: Fri, 8 Mar 2024 21:46:56 -0500 +Subject: [PATCH] pyverbs: Fix build failure +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix the following error: + +rdma-core-50.0/pyverbs/dmabuf_alloc.c: In function ‘drm_open’: +rdma-core-50.0/pyverbs/dmabuf_alloc.c:122:28: error: assignment to ‘int (*)(struct drm *, uint64_t, uint32_t *, int)’ {aka ‘int (*)(struct drm *, long long unsigned int, unsigned int *, int)’} from incompatible pointer type ‘int (*)(struct drm *, size_t, uint32_t *, int)’ {aka ‘int (*)(struct drm *, unsigned int, unsigned int *, int)’} [-Wincompatible-pointer-types] + 122 | drm->alloc = amdgpu_alloc; + +Signed-off-by: Kamal Heib +--- + pyverbs/dmabuf_alloc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyverbs/dmabuf_alloc.c b/pyverbs/dmabuf_alloc.c +index e3ea0a44f3d5..68f25928a1b7 100644 +--- a/pyverbs/dmabuf_alloc.c ++++ b/pyverbs/dmabuf_alloc.c +@@ -43,7 +43,7 @@ static int i915_alloc(struct drm *drm, uint64_t size, uint32_t *handle, int gtt) + return 0; + } + +-static int amdgpu_alloc(struct drm *drm, size_t size, uint32_t *handle, int gtt) ++static int amdgpu_alloc(struct drm *drm, uint64_t size, uint32_t *handle, int gtt) + { + union drm_amdgpu_gem_create gem_create = {{}}; + int err; +-- +2.44.0 + diff --git a/rdma-core.spec b/rdma-core.spec index 7e8b204..692d820 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -10,6 +10,7 @@ Summary: RDMA core userspace libraries and daemons License: GPLv2 or BSD Url: https://github.com/linux-rdma/rdma-core Source: https://github.com/linux-rdma/rdma-core/releases/download/v%{version}/%{name}-%{version}.tar.gz +Patch0001: 0001-pyverbs-Fix-build-failure.patch Patch9998: 9998-kernel-boot-Do-not-perform-device-rename-on-OPA-devi.patch Patch9999: 9999-udev-keep-NAME_KERNEL-as-default-interface-naming-co.patch # Do not build static libs by default. @@ -280,6 +281,10 @@ easy, object-oriented access to IB verbs. %patch 9999 -p1 %endif +%if %{with_pyverbs} +%patch 0001 -p1 +%endif + %build # New RPM defines _rundir, usually as /run