Skip to contentSkip to conversation

libiio: update to version 0.23

PATCH Superseded Christian Eggers 2 participants 2 messages Mar 8, 2022 – Mar 9, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libiio: update to version 0.23

- drop 0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch (integrated upstream)
- new PACKAGECONFIG "xml_backend" (WITH_XML_BACKEND=off must be explicitly provided if libxml2 is not available)
- new PACKAGECONFIG "dnssd" (HAVE_DNS_SD=off must be explicitly provided if libavahi is not available)
- python library has been renamed (libiio --> pylibiio)

---
 ...rify-whether-libiio-is-installed-whe.patch | 34 -------------------
 meta-oe/recipes-support/libiio/libiio_git.bb  | 21 ++++++------
 2 files changed, 10 insertions(+), 45 deletions(-)
 delete mode 100644 meta-oe/recipes-support/libiio/files/0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch
meta-oe/recipes-support/libiio/files/0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch deleted +0 -34
deleted file mode 100644
index 4d3dcd5cedd4..000000000000
@@ -1,34 +0,0 @@
-From 717b0f46b23ddc042da481d1d446bdd1c6c49142 Mon Sep 17 00:00:00 2001
-From: Julien Malik <[email protected]>
-Date: Mon, 27 Jul 2020 14:34:44 +0200
-Subject: [PATCH] python: Do not verify whether libiio is installed when
- cross-compiling
-
-This should fix #561
-
-Signed-off-by: Julien Malik <[email protected]>
----
- bindings/python/setup.py.cmakein | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/bindings/python/setup.py.cmakein b/bindings/python/setup.py.cmakein
-index cd14e2e..96d58a8 100644
---- a/bindings/python/setup.py.cmakein
-+++ b/bindings/python/setup.py.cmakein
-@@ -54,6 +54,13 @@ class InstallWrapper(install):
-         install.run(self)
- 
-     def _check_libiio_installed(self):
-+        cross_compiling = ("${CMAKE_CROSSCOMPILING}" == "TRUE")
-+        if cross_compiling:
-+            # When cross-compiling, we generally cannot dlopen
-+            # the libiio shared lib from the build platform.
-+            # Simply skip this check in that case.
-+            return
-+
-         from platform import system as _system
-         from ctypes import CDLL as _cdll
-         from ctypes.util import find_library
--- 
-2.25.1
-
meta-oe/recipes-support/libiio/libiio_git.bb +10 -11
index 2c22838bbf21..918ab277481c 100644
@@ -4,12 +4,10 @@ SECTION = "libs"
 LICENSE = "LGPL-2.1-or-later"
 LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7c13b3376cea0ce68d2d2da0a1b3a72c"
 
-SRCREV = "565bf68eccfdbbf22cf5cb6d792e23de564665c7"
-PV = "0.21+git${SRCPV}"
+SRCREV = "92d6a35f3d8d721cda7d6fe664b435311dd368b4"
+PV = "0.23"
 
-SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https;branch=master \
-           file://0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch \
-"
+SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https;branch=master"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 
 S = "${WORKDIR}/git"
@@ -28,16 +26,16 @@ EXTRA_OECMAKE = " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DWITH_SYSTEMD=ON -DSYSTEMD_UNIT_INSTALL_DIR=${systemd_system_unitdir}', '', d)} \
 "
 
-PACKAGECONFIG ??= "usb_backend network_backend serial_backend"
-
-NETWORK_BACKEND_DEPENDENCIES = "\
-    libxml2 \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+PACKAGECONFIG ??= " \
+    usb_backend network_backend serial_backend xml_backend \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'dnssd', '', d)} \
 "
 
 PACKAGECONFIG[usb_backend] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1 libxml2"
-PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF, ${NETWORK_BACKEND_DEPENDENCIES}"
+PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
 PACKAGECONFIG[serial_backend] = "-DWITH_SERIAL_BACKEND=ON,-DWITH_SERIAL_BACKEND=off,libserialport libxml2"
+PACKAGECONFIG[xml_backend] = "-DWITH_XML_BACKEND=ON,-DWITH_XML_BACKEND=off,libxml2"
+PACKAGECONFIG[dnssd] = "-DHAVE_DNS_SD=ON,-DHAVE_DNS_SD=off,avahi"
 PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"
 
 PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}"
@@ -70,6 +68,7 @@ do_compile() {
     cmake_do_compile
 }
 
+PIP_INSTALL_PACKAGE = "pylibiio"
 do_install() {
     if ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'true', 'false', d)}; then
         setuptools3_do_install
Signature · 1 line
2.34.1
#1 lore raw

this fails to configure see

https://errors.yoctoproject.org/Errors/Details/651289/

I think you need a patch something on these lines

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 91db382a..eed83a46 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -291,7 +291,7 @@ if (WITH_ZSTD)
endif (WITH_ZSTD)

include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
-
+include(CheckCSourceCompiles)
if(WITH_NETWORK_BACKEND)
message(STATUS "Building with Network back end support")
if (WIN32)

Try it out and test and resend if it fixes the problem.

Quoted 119 lines · Christian Eggers

- drop 0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch (integrated upstream)
- new PACKAGECONFIG "xml_backend" (WITH_XML_BACKEND=off must be explicitly provided if libxml2 is not available)
- new PACKAGECONFIG "dnssd" (HAVE_DNS_SD=off must be explicitly provided if libavahi is not available)
- python library has been renamed (libiio --> pylibiio)

---
 ...rify-whether-libiio-is-installed-whe.patch | 34 -------------------
 meta-oe/recipes-support/libiio/libiio_git.bb  | 21 ++++++------
 2 files changed, 10 insertions(+), 45 deletions(-)
 delete mode 100644 meta-oe/recipes-support/libiio/files/0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch
meta-oe/recipes-support/libiio/files/0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch deleted +0 -34
deleted file mode 100644
index 4d3dcd5cedd4..000000000000
@@ -1,34 +0,0 @@
-From 717b0f46b23ddc042da481d1d446bdd1c6c49142 Mon Sep 17 00:00:00 2001
-From: Julien Malik <[email protected]>
-Date: Mon, 27 Jul 2020 14:34:44 +0200
-Subject: [PATCH] python: Do not verify whether libiio is installed when
- cross-compiling
-
-This should fix #561
-
-Signed-off-by: Julien Malik <[email protected]>
----
- bindings/python/setup.py.cmakein | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/bindings/python/setup.py.cmakein b/bindings/python/setup.py.cmakein
-index cd14e2e..96d58a8 100644
---- a/bindings/python/setup.py.cmakein
-+++ b/bindings/python/setup.py.cmakein
-@@ -54,6 +54,13 @@ class InstallWrapper(install):
-         install.run(self)
-
-     def _check_libiio_installed(self):
-+        cross_compiling = ("${CMAKE_CROSSCOMPILING}" == "TRUE")
-+        if cross_compiling:
-+            # When cross-compiling, we generally cannot dlopen
-+            # the libiio shared lib from the build platform.
-+            # Simply skip this check in that case.
-+            return
-+
-         from platform import system as _system
-         from ctypes import CDLL as _cdll
-         from ctypes.util import find_library
---
-2.25.1
-
meta-oe/recipes-support/libiio/libiio_git.bb +10 -12
index 2c22838bbf21..918ab277481c 100644
@@ -4,12 +4,10 @@ SECTION = "libs"
 LICENSE = "LGPL-2.1-or-later"
 LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7c13b3376cea0ce68d2d2da0a1b3a72c"
 
-SRCREV = "565bf68eccfdbbf22cf5cb6d792e23de564665c7"
-PV = "0.21+git${SRCPV}"
+SRCREV = "92d6a35f3d8d721cda7d6fe664b435311dd368b4"
+PV = "0.23"
 
-SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https;branch=master \
-           file://0001-python-Do-not-verify-whether-libiio-is-installed-whe.patch \
-"
+SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https;branch=master"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 
 S = "${WORKDIR}/git"
@@ -28,16 +26,16 @@ EXTRA_OECMAKE = " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DWITH_SYSTEMD=ON -DSYSTEMD_UNIT_INSTALL_DIR=${systemd_system_unitdir}', '', d)} \
 "
 
-PACKAGECONFIG ??= "usb_backend network_backend serial_backend"
-
-NETWORK_BACKEND_DEPENDENCIES = "\
-    libxml2 \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+PACKAGECONFIG ??= " \
+    usb_backend network_backend serial_backend xml_backend \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'dnssd', '', d)} \
 "
 
 PACKAGECONFIG[usb_backend] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1 libxml2"
-PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF, ${NETWORK_BACKEND_DEPENDENCIES}"
+PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
 PACKAGECONFIG[serial_backend] = "-DWITH_SERIAL_BACKEND=ON,-DWITH_SERIAL_BACKEND=off,libserialport libxml2"
+PACKAGECONFIG[xml_backend] = "-DWITH_XML_BACKEND=ON,-DWITH_XML_BACKEND=off,libxml2"
+PACKAGECONFIG[dnssd] = "-DHAVE_DNS_SD=ON,-DHAVE_DNS_SD=off,avahi"
 PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"
 
 PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}"
@@ -70,6 +68,7 @@ do_compile() {
     cmake_do_compile
 }
 
+PIP_INSTALL_PACKAGE = "pylibiio"
 do_install() {
     if ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'true', 'false', d)}; then
         setuptools3_do_install
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#95882): https://lists.openembedded.org/g/openembedded-devel/message/95882
Mute This Topic: https://lists.openembedded.org/mt/89639232/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-