From 1d86b5317496f4f2fa524215389325fd7f32bd6b Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 28 Sep 2026 14:17:10 +0000 Subject: automatic import of ros-humble-adi-iio --- .gitignore | 1 + adi-iio.spec | 33 +++++++++++++++++++++------------ sources | 2 +- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index d66de5f..68d5a26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /adi-iio-1.0.1-3.tar.gz /libiio-1.0.0.tar.gz +/libiio-0.25.tar.gz diff --git a/adi-iio.spec b/adi-iio.spec index 8730e08..1474dfc 100644 --- a/adi-iio.spec +++ b/adi-iio.spec @@ -1,11 +1,11 @@ %define ros_distro humble %define RosPkgName adi-iio %define src_version 1.0.1-3 -%define libiio_version 1.0.0 +%define libiio_version 0.25 Name: ros-%{ros_distro}-%{RosPkgName} Version: 1.0.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: ROS package to interface with IIO devices License: Apache License, Version 2.0 URL: https://github.com/analogdevicesinc/iio_ros2/tree/humble @@ -49,11 +49,16 @@ Vendors libiio (userspace IIO library) as it is not available on openEuler. %autosetup -n %{RosPkgName}-%{src_version} -a 1 %build -# Build vendored libiio first (openEuler has no libiio package). -# Network backend disabled: it transitively pulls in libavahi/libxml2/libzstd -# (DNS-SD discovery + XML backend + ZSTD for IIOD async API). adi-iio only -# needs the local backend (iio_create_context_from_uri with "local:" URI) plus -# the libiio API, so WITH_NETWORK_BACKEND=OFF avoids the whole dependency chain. +# Build vendored libiio 0.25 first (openEuler has no libiio package). +# Using 0.25 (last 0.x release) because adi-iio 1.0.1 uses the libiio 0.x API +# (iio_buffer_cancel/destroy, iio_channel_enable/disable single-arg, +# iio_device_create_buffer, iio_buffer_refill/first/step/push) which was +# removed/changed in libiio 1.0. libiio 1.0.0 was tried in rounds 1-2 and +# caused compilation failures due to API mismatch. +# Network backend disabled: it transitively pulls in libavahi/libxml2 +# (DNS-SD discovery + XML backend). adi-iio only needs the local backend +# (iio_create_context_from_uri with "local:" URI) plus the libiio API, +# so WITH_NETWORK_BACKEND=OFF avoids the whole dependency chain. cd libiio-%{libiio_version} mkdir -p build && cd build cmake .. \ @@ -67,14 +72,12 @@ cmake .. \ -DWITH_NETWORK_BACKEND=OFF \ -DWITH_ZSTD=OFF \ -DWITH_IIOD=OFF \ - -DWITH_UTILS=OFF \ -DWITH_EXAMPLES=OFF \ -DWITH_TESTS=OFF \ - -DWITH_MAN=OFF \ - -DLIBIIO_COMPAT=OFF + -DWITH_MAN=OFF make %{?_smp_mflags} _LIBIIO_BUILD_DIR="$PWD" -_LIBIIO_INC_DIR="$(cd ../include/iio && pwd)" +_LIBIIO_INC_DIR="$(cd .. && pwd)" cd ../.. # Source ROS environment @@ -115,10 +118,16 @@ make install DESTDIR=%{buildroot} %files /usr/lib*/libiio.so* /usr/lib*/pkgconfig/libiio.pc -/usr/include/iio/ +/usr/include/iio.h /opt/ros/%{ros_distro} %changelog +* Mon Sep 28 2026 ai-importer - 1.0.1-4 +- Switch vendored libiio from 1.0.0 to 0.25: adi-iio 1.0.1 uses the libiio + 0.x API (iio_buffer_cancel/destroy, single-arg iio_channel_enable/disable, + iio_device_create_buffer, iio_buffer_refill/first/step/push) which was + removed/changed in libiio 1.0, causing compilation failures in iio_buffer.cpp. + libiio 0.25 header (iio.h) is at source root, not include/iio/ subdirectory. * Mon Sep 28 2026 ai-importer - 1.0.1-3 - Disable libiio network backend: it requires libavahi/libxml2/libzstd which are not pulled in; local backend suffices for adi-iio's iio_create_context_from_uri diff --git a/sources b/sources index 7f5de18..402555c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 0f7fb6a82cb6281185204bcbaeddee53 adi-iio-1.0.1-3.tar.gz -4991faf8b9da6ce3cb4cfd8eb236b93a libiio-1.0.0.tar.gz +c8d5ea5ab44c2e99fab82baea9c92c57 libiio-0.25.tar.gz -- cgit v1.2.3