目录
参考资料
Ubuntu台机编译
Ubuntu 16.04.4 LTS系统, 使用cmake编译,禁用AIO、DNS_SD。
$ git clone https://github.com/analogdevicesinc/libiio.git
$ cd libiio
$ git log -1
commit 1e9e1647809bc0bdeab22753d7e61a22e4030d07
Author: Michael Hennerich <michael.hennerich@analog.com>
Date: Thu Jul 22 13:37:57 2021 +0200
bindings: python iio.py: find_device() also use label
When multiple devices with the same name exist, label is used to
differentiate them. Update find_device to also support labels.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
$ mkdir build
$ cd build
$ cmake ../ -DWITH_AIO=OFF -DHAVE_DNS_SD=OFF
-- cmake version: 3.5.1
-- The C compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test HAS_WPEDANTIC
-- Performing Test HAS_WPEDANTIC - Success
-- Performing Test HAS_WSHADOW
-- Performing Test HAS_WSHADOW - Success
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for newlocale
-- Looking for newlocale - found
-- Looking for in6addr_any
-- Looking for in6addr_any - found
-- Looking for libusb-1.0 : Found
-- Looking for libusb_get_version
-- Looking for libusb_get_version - found
-- Found Git: /usr/bin/git (found version "2.7.4")
-- Building with Network back end support
-- Performing Test WITH_NETWORK_EVENTFD
-- Performing Test WITH_NETWORK_EVENTFD - Success
-- Building without DNS-SD (ZeroConf) support
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.3")
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Found FLEX: /usr/bin/flex (found version "2.6.0")
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - found
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/work/libiio/build
$ make
Scanning dependencies of target iio
[ 2%] Building C object CMakeFiles/iio.dir/backend.c.o
[ 4%] Building C object CMakeFiles/iio.dir/channel.c.o
[ 6%] Building C object CMakeFiles/iio.dir/device.c.o
[ 9%] Building C object CMakeFiles/iio.dir/context.c.o
[ 11%] Building C object CMakeFiles/iio.dir/buffer.c.o
[ 13%] Building C object CMakeFiles/iio.dir/utilities.c.o
[ 15%] Building C object CMakeFiles/iio.dir/scan.c.o
[ 18%] Building C object CMakeFiles/iio.dir/sort.c.o
[ 20%] Building C object CMakeFiles/iio.dir/usb.c.o
[ 22%] Building C object CMakeFiles/iio.dir/local.c.o
[ 25%] Building C object CMakeFiles/iio.dir/libini/libini.c.o
[ 27%] Building C object CMakeFiles/iio.dir/network.c.o
[ 29%] Building C object CMakeFiles/iio.dir/network-unix.c.o
[ 31%] Building C object CMakeFiles/iio.dir/xml.c.o
[ 34%] Building C object CMakeFiles/iio.dir/lock.c.o
[ 36%] Building C object CMakeFiles/iio.dir/iiod-client.c.o
[ 38%] Linking C shared library libiio.so
[ 38%] Built target iio
Scanning dependencies of target iio_tests_helper
[ 40%] Building C object tests/CMakeFiles/iio_tests_helper.dir/iio_common.c.o
[ 43%] Building C object tests/CMakeFiles/iio_tests_helper.dir/gen_code.c.o
[ 45%] Linking C static library libiio_tests_helper.a
[ 45%] Built target iio_tests_helper
Scanning dependencies of target iio_attr
[ 47%] Building C object tests/CMakeFiles/iio_attr.dir/iio_attr.c.o
[ 50%] Linking C executable iio_attr
[ 50%] Built target iio_attr
Scanning dependencies of target iio_genxml
[ 52%] Building C object tests/CMakeFiles/iio