analogdevicesinc / libiio

A cross platform library for interfacing with local and remote Linux IIO devices
http://analogdevicesinc.github.io/libiio/
GNU Lesser General Public License v2.1
484 stars 313 forks source link

Can't build 0.25 on Alpine Linux #1178

Closed jeffrizzo closed 1 month ago

jeffrizzo commented 3 months ago

When trying to build 0.25 under Docker using Alpine Linux (it built in version 0.23), I got this error, so I'm reporting it as requested:

#11 8.002 -- Looking for pthread_setname_np
#11 8.206 -- Looking for pthread_setname_np - found
#11 8.212 -- found unknown distribution Alpine Linux, Version : VERSION_ID=3.20.0
#11 8.212 CMake Error at cmake/LinuxPackaging.cmake:35 (message):
#11 8.212   please report an error to
#11 8.212   https:\/\/github.com\/analogdevicesinc\/libiio\/issues
#11 8.212 Call Stack (most recent call first):
#11 8.212   CMakeLists.txt:650 (include)
tfcollins commented 3 months ago

Can you provide your cmake command with arguments you are using? And Alpine version?

rgetz commented 1 month ago

@jeffrizzo This is expected - since the code doesn't support Alpine yet when building packages.

https://github.com/analogdevicesinc/libiio/blob/main/cmake/LinuxPackaging.cmake#L23-L33

Since Alpine doesn't use deb or rpm (it uses apk) - I assume you shouldn't build packages, and can just leave that off?

Thanks -Robin

cz172638 commented 1 month ago

https://git.alpinelinux.org/aports/tree/testing/libiio/APKBUILD

cz172638 commented 1 month ago
echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk add libiio-dev@testing
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
(1/10) Installing dbus-libs (1.14.8-r0)
(2/10) Installing libintl (0.21.1-r7)
(3/10) Installing avahi-libs (0.8-r13)
(4/10) Installing libserialport@testing (0.1.1-r1)
(5/10) Installing libusb (1.0.26-r2)
(6/10) Installing xz-libs (5.4.3-r0)
(7/10) Installing libxml2 (2.11.8-r0)
(8/10) Installing libiio@testing (0.25-r2)
(9/10) Installing pkgconf (1.9.5-r0)
(10/10) Installing libiio-dev@testing (0.25-r2)
Executing busybox-1.36.1-r7.trigger
OK: 10 MiB in 25 packages

tested with 3.18+ alpine

tfcollins commented 1 month ago

@cz172638 Can we close this issue? Assuming the package works...

cz172638 commented 1 month ago

i think so, i've put link to apkbuild, so @jeffrizzo can take inspiration and eventually lobby for getting libiio package from testing to community