Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings on FreeBSD #336

Closed
rgetz opened this issue Jan 11, 2020 · 12 comments
Closed

warnings on FreeBSD #336

rgetz opened this issue Jan 11, 2020 · 12 comments
Labels

Comments

@rgetz
Copy link
Contributor

rgetz commented Jan 11, 2020

based on debian testing, on (kfreebsd-amd64)
https://buildd.debian.org/status/fetch.php?pkg=libiio&arch=kfreebsd-amd64&ver=0.18-1&stamp=1565884272&raw=0

/usr/bin/cc -DLIBIIO_EXPORTS=1 -DMATLAB_BINDINGS_API=1 -DNETWORK_BACKEND=1 -DSERIAL_BACKEND=1 -DXML_BACKEND=1 -D_POSIX_C_SOURCE=200809L -D__XSI_VISIBLE=500 -Diio_EXPORTS -I/<<PKGBUILDDIR>> -I/<<PKGBUILDDIR>>/build -I/usr/include/libxml2  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wpedantic -fPIC   -std=c99 -o CMakeFiles/iio.dir/network.c.o   -c /<<PKGBUILDDIR>>/network.c
/<<PKGBUILDDIR>>/network.c: In function ‘create_cancel_fd’:
/<<PKGBUILDDIR>>/network.c:240:8: warning: implicit declaration of function ‘pipe2’; did you mean ‘pipe’? [-Wimplicit-function-declaration]
  ret = pipe2(io_ctx->cancel_fd, O_CLOEXEC | O_NONBLOCK);
        ^~~~~
        pipe

based on the freebsd pipe2 man page,https://www.freebsd.org/cgi/man.cgi?pipe(2)

       #include <unistd.h>
       int pipe2(int pipefd[2], int flags);

which we are - but we are still getting the warning...

For Linux - pipe2 only shows up with _GNU_SOURCE, which we only do on Linux, not on freebsd (so I'm not familiar enough with freebsd to know if that is the problem or not).

-Robin

@rgetz rgetz added the bug label Jan 11, 2020
@rgetz
Copy link
Contributor Author

rgetz commented Jan 16, 2020

OK - this specific bug report is on Debian GNU/kFreeBSD, which is a port that consists of GNU userland using the GNU C library on top of FreeBSD's kernel, coupled with the regular Debian package set; and is no longer an officially supported Debian architecture.
https://www.debian.org/ports/kfreebsd-gnu/

FreeBSD works fine - and builds without changes (except for not including the bindings?)
https://www.freebsd.org/cgi/ports.cgi?query=libiio&stype=all

I will install FreeBSD, and try to see when they don't build the bindings, but other than that - I think this is non a bug.

@rgetz
Copy link
Contributor Author

rgetz commented Jan 16, 2020

Looks like FreeBSD 12 puts libusb in a different directory, I needed to do:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 552dcf7..0f4a218 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -163,8 +163,13 @@ if(WITH_LOCAL_BACKEND)
        endif()
 endif()
 
-find_library(LIBUSB_LIBRARIES usb-1.0)
-find_path(LIBUSB_INCLUDE_DIR libusb-1.0/libusb.h)
+if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+       find_library(LIBUSB_LIBRARIES usb)
+       find_path(LIBUSB_INCLUDE_DIR libusb.h)
+else()
+       find_library(LIBUSB_LIBRARIES usb-1.0)
+       find_path(LIBUSB_INCLUDE_DIR libusb-1.0/libusb.h)
+endif()
 if (LIBUSB_LIBRARIES AND LIBUSB_INCLUDE_DIR)
        message(STATUS "Looking for libusb-1.0 : Found")
        option(WITH_USB_BACKEND "Enable the libusb backend" ON)
diff --git a/usb.c b/usb.c
index 141bd41..c8a3b81 100644
--- a/usb.c
+++ b/usb.c
@@ -22,7 +22,11 @@
 
 #include <ctype.h>
 #include <errno.h>
+#ifdef __FreeBSD__
+#include <libusb.h>
+#else
 #include <libusb-1.0/libusb.h>
+#endif
 #include <stdbool.h>
 #include <string.h>

to get it to build with USB...

@rgetz
Copy link
Contributor Author

rgetz commented Jan 16, 2020

I still get this warning on FreeBSD

[ 37%] Building C object CMakeFiles/iio.dir/network.c.o
/root/github/libiio/network.c:240:8: warning: implicit declaration of function 'pipe2' is invalid in C99 [-Wimplicit-function-declaration]
        ret = pipe2(io_ctx->cancel_fd, O_CLOEXEC | O_NONBLOCK);
              ^

to resolve that, I need to do:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 552dcf7..de64eeb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,6 +97,10 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
        set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE=1")
        add_definitions(-D_GNU_SOURCE=1)
 endif()
+if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+       set(CMAKE_REQUIRED_DEFINITIONS "-D__BSD_VISIBLE")
+       add_definitions(-D__BSD_VISIBLE=1)
+endif()

@rgetz rgetz changed the title warnings on some arch warnings on some FreeBSD Jan 16, 2020
@rgetz rgetz changed the title warnings on some FreeBSD warnings on FreeBSD Jan 16, 2020
rgetz added a commit that referenced this issue Jan 16, 2020
Previously, building libiio on FreeBSD would warn with:
network.c:240:8: warning: implicit declaration of function 'pipe2' is invalid in C99

This fixes that, since pipe2 (inside <unistd.h>) is protected by __BSD_VISIBLE. 
On Linux, it's protected by _GNU_SOURCE (which is already defined in the cmake).

Signed-off-by: Robin Getz <[email protected]>
@rgetz
Copy link
Contributor Author

rgetz commented Jan 16, 2020

I confirmed with Yuri (maintainer for libiio in FreeBSD https://www.freshports.org/misc/libiio ), that this was the correct approach for the pipe2 warning, so made a pull request for that.

The libusb might be a little more complex - so I that will be a separate pull request.

@pcercuei
Copy link
Contributor

Looks good to me.

rgetz added a commit that referenced this issue Jan 17, 2020
Previously, building libiio on FreeBSD would warn with:
network.c:240:8: warning: implicit declaration of function 'pipe2' is invalid in C99

This fixes that for all BSDs, since pipe2 (inside <unistd.h>) is protected by __BSD_VISIBLE.
On Linux, it's protected by _GNU_SOURCE (which is already defined in the cmake).

Signed-off-by: Robin Getz <[email protected]>
rgetz added a commit that referenced this issue Jan 17, 2020
FreeBSD doesn't call it libusb-1,0 like linux does - it calls it libusb
and just installs it into /usr/include/*, not /usr/include/libusb-1.0/*
like Linux, Apple and Windows does... so handle these differences.

Tested on FreeBSD 12.1 (Release) & Debian 10 (Buster)

Signed-off-by: Robin Getz [email protected]
@rgetz
Copy link
Contributor Author

rgetz commented Jan 17, 2020

Ok - these are in process in the different pull requests, so close this.

@rgetz rgetz closed this as completed Jan 17, 2020
rgetz added a commit that referenced this issue Jan 17, 2020
FreeBSD doesn't call it libusb-1,0 like linux does - it calls it libusb
and just installs it into /usr/include/*, not /usr/include/libusb-1.0/*
like Linux, Apple and Windows does... so handle these differences.

Tested on FreeBSD 12.1 (Release) & Debian 10 (Buster)

Signed-off-by: Robin Getz [email protected]
rgetz added a commit that referenced this issue Jan 20, 2020
rgetz added a commit that referenced this issue Jan 20, 2020
Fix #336, make sure libusb can be found on FreeBSD variants
@mhennerich
Copy link
Contributor

ok - the fix in 645391b causes a failure on my Ubuntu 16.04.6 LTS.

michael@mhenneri-D06:~/devel/git/libiio$ cmake .
-- Looking for libusb-1.0 : Found
CMake Warning at CMakeLists.txt:213 (message):
The installed version of libserialport is too old. The minimum version
supported is 0.1.1. Disabling Serial support.

-- Building with Network back end support
-- Building with Avahi, a zero-configuration networking (zeroconf) implementation
-- Found Python: Building bindings
-- Check for case-sensitive file systems
-- File system is case-sensitive
-- Configuring done
-- Generating done
-- Build files have been written to: /home/michael/devel/git/libiio
michael@mhenneri-D06:/devel/git/libiio$ make
Scanning dependencies of target iio
[ 2%] Building C object CMakeFiles/iio.dir/backend.c.o
[ 5%] Building C object CMakeFiles/iio.dir/channel.c.o
[ 7%] Building C object CMakeFiles/iio.dir/device.c.o
[ 10%] Building C object CMakeFiles/iio.dir/context.c.o
[ 13%] Building C object CMakeFiles/iio.dir/buffer.c.o
[ 15%] Building C object CMakeFiles/iio.dir/utilities.c.o
[ 18%] Building C object CMakeFiles/iio.dir/scan.c.o
[ 21%] Building C object CMakeFiles/iio.dir/sort.c.o
[ 23%] Building C object CMakeFiles/iio.dir/local.c.o
[ 26%] Building C object CMakeFiles/iio.dir/usb.c.o
/home/michael/devel/git/libiio/usb.c:25:20: fatal error: libusb.h: No such file or directory
compilation terminated.
CMakeFiles/iio.dir/build.make:278: recipe for target 'CMakeFiles/iio.dir/usb.c.o' failed
make[2]: *** [CMakeFiles/iio.dir/usb.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/iio.dir/all' failed
make[1]: *** [CMakeFiles/iio.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
michael@mhenneri-D06:
/devel/git/libiio$

@mhennerich mhennerich reopened this Jan 28, 2020
@rgetz
Copy link
Contributor Author

rgetz commented Jan 28, 2020

Ok - will spin up a vm, and try it out....

@mhennerich
Copy link
Contributor

I have both versions of libusb installed on my system:
libusb-dev and libusb-1.0-0-dev

michael@mhenneri-D06:~/devel/git/libiio$ dpkg-query -l libusb-1.0-0-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version          Architecture     Description
+++-======================-================-================-==================================================
ii  libusb-1.0-0-dev:amd64 2:1.0.20-1       amd64            userspace USB programming library development file
michael@mhenneri-D06:~/devel/git/libiio$ dpkg-query -l libusb-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version          Architecture     Description
+++-======================-================-================-==================================================
ii  libusb-dev             2:0.1.12-28      amd64            userspace USB programming library development file
michael@mhenneri-D06:~/devel/git/libiio$ 

Restoring the previous include path fixes it

michael@mhenneri-D06:~/devel/git/libiio$ git diff
diff --git a/usb.c b/usb.c
index 49af0cc..141bd41 100644
--- a/usb.c
+++ b/usb.c
@@ -22,7 +22,7 @@
 
 #include <ctype.h>
 #include <errno.h>
-#include <libusb.h>
+#include <libusb-1.0/libusb.h>
 #include <stdbool.h>
 #include <string.h>

@pcercuei
Copy link
Contributor

I do have both installed too, and it builds fine here.
Check in the CMake GUI (or the CMakeCache.txt) what's the value of LIBUSB_INCLUDE_DIR, it should be something like /usr/include/libusb-1.0.

@mhennerich
Copy link
Contributor

michael@mhenneri-D06:~/devel/git/libiio$ grep -R LIBUSB_INCLUDE_DIR
CMakeCache.txt:LIBUSB_INCLUDE_DIR:PATH=/usr/include

After:
michael@mhenneri-D06:~/devel/git/libiio$ git clean -f -d -x

michael@mhenneri-D06:~/devel/git/libiio$ grep -R LIBUSB_INCLUDE_DIR
CMakeCache.txt:LIBUSB_INCLUDE_DIR:PATH=/usr/include/libusb-1.0

my fault - sorry for the noise - closed

@rgetz
Copy link
Contributor Author

rgetz commented Jan 29, 2020

OK - thanks for double checking, and letting us know.. (I was puzzled, since we build on Ubunut 16 on Travis-CI still).

BTW - Ubuntu 16.04 LTS "End of Standard Support" is April 2021, time to upgrade...

dNechita added a commit that referenced this issue Feb 14, 2020
Changelog:

09bb1ba Bump to version v0.19
497d3da (origin/rgetz-verbose-iiod-errors) network: Fix typo in error message related to iiod client open
abdd072 Increase error reporting on iiod and network backend
ce10854 iio_attr : Add a feature which auto-generates C code
6c40e8c iio_info: warn when iio_channel_get_type = IIO_CHAN_TYPE_UNKNOWN
e8206c9 Create Code of Conduct.md
ec2f079 Create Contributing.md
6360902 iio_info: use malloc rather than stack buffers
d7838e4 Handle channel IDs without index or modifier correctly
f7c5e7f iio_readdev: Fix corrupt data that was being captured on Windows
49f999c Create README_BUILD.md
6a777b7 (origin/rgetz-fix-licenses) Licences: fix #350, and clean up license.
2914675 (origin/fix-iio_buffer_push_partial) local: Fix the checking of the buffer size returned by kernel
7f96e80 (origin/rgetz-add-man-pages) man: add some default man pages
e8c1291 csharp/IOBuffer.cs: Add a read() function to extract data from the IIO buffer.
22486dc csharp/IOBuffer.cs: Change IntPtr cast to long instead of int.
2abe5f7 Global differential attributes code review requests.
17148ef Improved matching on global attributes for differential channels
a9ac553 cmake : on the CI, turn on WITH_DOC, so gh-pages is updated
d0faf30 cmake: Make the WITH_DOC (Doxygen) optional, defaulting off
a225401 iio.h: improve consistancy of doxygen generated content
bffde86 iio.h: Fix whitespace differences/inconsistances
b079f9d (origin/rgetz-update-svg) doc: update code model picture
d94e149 #352 First attempt to match global attributes for differential channels.
55976f3 Improve URI documentation for iio_create_context_from_uri
dcf3582 (origin/rgetz-add-flags-for-bindings) CI: Make the CI systems respect the new binding flags
f1faa28 Bindings : **NB** Add Cmake flags to turn on bindings (Default=off)
cc9b3c7 ./tests/iio_attr : move from allocating space on stack to malloc
645391b Fix #336, make sure libusb can be found on FreeBSD variants
100f910 fix #336, remove warnings on FreeBSD
3ede102 Update .gitignore in the examples dir
846613c fix #59 - add a readme to the examples directory
df51cc1 ci,lib.sh: print Github API rate limits
423d20d (origin/rgetz-fix-325) Fix #325, remove dead code/compiler warning
8b57196 bindings/csharp/CMakeLists.txt: Fix the install step for CSharp bindings.
673f922 Fix #307 by accepting avahi null names, and install avahi service file
e641094 Python3: fixed string type checking in iio.NetworkContext to be compatible with Python 2 and Python 3.
8a82417 Fixed loading of libiio on non-Windows systems where find_library shall find it in the path if the specified name is 'iio'.
5ca77b1 gh-327: Use "include(FindPythinInterp)" when compiling with CMake older than 3.12.
4470593 Making the printfs in dummy-iiostream portable.
dc3684c Fixing dummy-iiostream read method help message.
1036e51 ci,os-x: disable brew's default install cleanup
a3a4c08 ci,lib: fix typo; correct is `brew list --versions`
4540f7e build,ci: os-x: install packages if they don't exist
c9a854f utilities.c: Consider OS X a platform that has locale support
812cfd2 (origin/context_cmd_line_args) Fixed indentation issues.
ef82d7b ad9361-iiostream.c example takes Command line arguments to select local context vs uri context.
4655780 Python: More robust loading of IIO library that works on different platforms.
e31a4e2 Python: More robust loading of IIO library that works on different platforms.
96a9689 CMake python bindings: "use find_package (Python COMPONENTS Interpreter)" instead of deprecated "include(FindPythonInterp)"
c3bed86 CMake: added option OSX_INSTALL_FRAMEWORKSDIR (default /Library/Frameworks) to specify custom install path. rpath of tools is corrected to reference the library relative to the binary's location.
0fbb31f network: only resolve interface name on ipv6 ll
915adbb README.md: fix OS X High Sierra alternative package link
78170b1 README.md: remove OS X El Capitan (10.11) from readme
c4833c5 build,.travis.yml: add support for Xcode 11
b48d91f .travis.yml: remove/retire Trusty builds
48808dd General: Rework the Windows installer and the zip artifact.
76083a7 travis-ci: recent upgrades in the travis-ci infrastructure caused some breakages in deployments
1773c52 Add example for ADRV9009
6abaaec local.c: make sure dst is null-terminated if fread fails
5090603 fix install of binaries with a static only library
b8f3bf9 Update README.md to include the arm packages
bb9831a iiod: usbd: Fix wrong null pointer check

Adrian Suciu (1):
      local.c: make sure dst is null-terminated if fread fails

Alexandra Trifan (2):
      General: Rework the Windows installer and the zip artifact.
      bindings/csharp/CMakeLists.txt: Fix the install step for CSharp bindings.

Alexandra.Trifan (2):
      csharp/IOBuffer.cs: Change IntPtr cast to long instead of int.
      csharp/IOBuffer.cs: Add a read() function to extract data from the IIO buffer.

Alexandru Ardelean (8):
      .travis.yml: remove/retire Trusty builds
      build,.travis.yml: add support for Xcode 11
      README.md: remove OS X El Capitan (10.11) from readme
      README.md: fix OS X High Sierra alternative package link
      build,ci: os-x: install packages if they don't exist
      ci,lib: fix typo; correct is `brew list --versions`
      ci,os-x: disable brew's default install cleanup
      ci,lib.sh: print Github API rate limits

Dan Nechita (22):
      utilities.c: Consider OS X a platform that has locale support
      Merge pull request #304 from dimasad/master
      Merge pull request #332 from matejk/fix-linux-load-library
      Merge pull request #333 from matejk/fix-python-2-3-string-check
      Merge pull request #341 from analogdevicesinc/build-print-remaining-api-limits
      Merge pull request #348 from analogdevicesinc/rgetz-move-to-malloc
      Merge pull request #347 from analogdevicesinc/rgetz-add-flags-for-bindings
      Merge pull request #356 from analogdevicesinc/rgetz-fix-iio.h
      Merge pull request #353 from analogdevicesinc/rgetz-promote-WITH-DOC
      Merge pull request #354 from fpagliughi/differential-global-attr
      Merge pull request #360 from analogdevicesinc/csharp_fixes
      local: Fix the checking of the buffer size returned by kernel
      Merge pull request #362 from analogdevicesinc/fix-iio_buffer_push_partial
      Merge pull request #361 from analogdevicesinc/rgetz-patch-1
      iio_readdev: Fix corrupt data that was being captured on Windows
      Merge pull request #358 from analogdevicesinc/rgetz-fix-licenses
      Merge pull request #366 from hshmt/type
      Merge pull request #369 from analogdevicesinc/rgetz-malloc-iio-info
      Merge pull request #375 from analogdevicesinc/rgetz-iio_attr-gen-code2
      network: Fix typo in error message related to iiod client open
      Merge pull request #376 from analogdevicesinc/rgetz-verbose-iiod-errors
      Bump to version v0.19

Dimas Abreu Archanjo Dutra (2):
      Fixing dummy-iiostream read method help message.
      Making the printfs in dummy-iiostream portable.

Edward Kigwana (1):
      Improve URI documentation for iio_create_context_from_uri

Jorik Jonker (1):
      network: only resolve interface name on ipv6 ll

Matej Kenda (8):
      CMake: added option OSX_INSTALL_FRAMEWORKSDIR (default /Library/Frameworks) to specify custom install path. rpath of tools is corrected to reference the library relative to the binary's location.
      CMake python bindings: "use find_package (Python COMPONENTS Interpreter)" instead of deprecated "include(FindPythonInterp)"
      Python: More robust loading of IIO library that works on different platforms.
      Python: More robust loading of IIO library that works on different platforms.
      Merge branch 'python-find-library' of github.com:matejk/libiio into python-find-library
      gh-327: Use "include(FindPythinInterp)" when compiling with CMake older than 3.12.
      Fixed loading of libiio on non-Windows systems where find_library shall find it in the path if the specified name is 'iio'.
      Python3: fixed string type checking in iio.NetworkContext to be compatible with Python 2 and Python 3.

Michael Hennerich (7):
      Merge pull request #279 from analogdevicesinc/iiod-nullptr-fix
      Merge pull request #290 from analogdevicesinc/coverity_fix_cid343595
      Merge pull request #297 from jonkerj/fix-network-global-ipv6
      Merge pull request #314 from matejk/python-find-library
      Merge pull request #312 from matejk/osx-install-frameworksdir
      Merge pull request #313 from matejk/cmake-find-python
      Merge pull request #319 from analogdevicesinc/context_cmd_line_args

Paul Cercueil (1):
      iiod: usbd: Fix wrong null pointer check

Pierre-Jean Texier (1):
      fix install of binaries with a static only library

Robin Getz (38):
      Update README.md to include the arm packages
      travis-ci: recent upgrades in the travis-ci infrastructure caused some breakages in deployments
      Merge pull request #283 from texierp/fix/rpath
      Merge pull request #328 from matejk/gh-327-python-not-found
      Fix #307 by accepting avahi null names, and install avahi service file
      Merge pull request #338 from analogdevicesinc/rgetz-avahi-install
      Merge pull request #337 from analogdevicesinc/fix_install_csharp
      Fix #325, remove dead code/compiler warning
      Merge pull request #340 from analogdevicesinc/rgetz-fix-325
      fix #59 - add a readme to the examples directory
      Update .gitignore in the examples dir
      Merge pull request #342 from analogdevicesinc/rgetz-patch-2
      fix #336, remove warnings on FreeBSD
      Merge pull request #339 from analogdevicesinc/rgetz-patch-1
      Fix #336, make sure libusb can be found on FreeBSD variants
      ./tests/iio_attr : move from allocating space on stack to malloc
      Merge pull request #343 from analogdevicesinc/rgetz-patch-2
      Merge pull request #346 from analogdevicesinc/rgetz-fix-freebsd-usb
      Bindings : **NB** Add Cmake flags to turn on bindings (Default=off)
      CI: Make the CI systems respect the new binding flags
      doc: update code model picture
      Merge pull request #351 from ekigwana/master
      iio.h: Fix whitespace differences/inconsistances
      iio.h: improve consistancy of doxygen generated content
      cmake: Make the WITH_DOC (Doxygen) optional, defaulting off
      cmake : on the CI, turn on WITH_DOC, so gh-pages is updated
      man: add some default man pages
      Licences: fix #350, and clean up license.
      Create README_BUILD.md
      iio_info: use malloc rather than stack buffers
      Create Contributing.md
      Create Code of Conduct.md
      iio_info: warn when iio_channel_get_type = IIO_CHAN_TYPE_UNKNOWN
      Merge pull request #374 from analogdevicesinc/rgetz-iio-info-add-warn-on-IIO_CHAN_TYPE_UNKNOWN
      Merge pull request #371 from analogdevicesinc/rgetz-create-contributing.md
      Merge pull request #372 from analogdevicesinc/add-code-of-conduct-1
      iio_attr : Add a feature which auto-generates C code
      Increase error reporting on iiod and network backend

Ryo Hashimoto (1):
      Handle channel IDs without index or modifier correctly

SrikanthPagadarai (2):
      ad9361-iiostream.c example takes Command line arguments to select local context vs uri context.
      Fixed indentation issues.

Travis Collins (2):
      Merge pull request #355 from analogdevicesinc/rgetz-update-svg
      Merge pull request #359 from analogdevicesinc/rgetz-add-man-pages

Travis F. Collins (1):
      Add example for ADRV9009

fpagliughi (3):
      #352 First attempt to match global attributes for differential channels.
      Improved matching on global attributes for differential channels
      Global differential attributes code review requests.

Signed-off-by: Dan Nechita <[email protected]>
cristi-iacob pushed a commit to cristi-iacob/libiio that referenced this issue Feb 18, 2020
Previously, building libiio on FreeBSD would warn with:
network.c:240:8: warning: implicit declaration of function 'pipe2' is invalid in C99

This fixes that for all BSDs, since pipe2 (inside <unistd.h>) is protected by __BSD_VISIBLE.
On Linux, it's protected by _GNU_SOURCE (which is already defined in the cmake).

Signed-off-by: Robin Getz <[email protected]>
cristi-iacob pushed a commit to cristi-iacob/libiio that referenced this issue Feb 18, 2020
…riants

FreeBSD doesn't call it libusb-1,0 like linux does - it calls it libusb
and just installs it into /usr/include/*, not /usr/include/libusb-1.0/*
like Linux, Apple and Windows does... so handle these differences.

Tested on FreeBSD 12.1 (Release) & Debian 10 (Buster)

Signed-off-by: Robin Getz [email protected]
cristi-iacob pushed a commit to cristi-iacob/libiio that referenced this issue Feb 18, 2020
Changelog:

09bb1ba Bump to version v0.19
497d3da (origin/rgetz-verbose-iiod-errors) network: Fix typo in error message related to iiod client open
abdd072 Increase error reporting on iiod and network backend
ce10854 iio_attr : Add a feature which auto-generates C code
6c40e8c iio_info: warn when iio_channel_get_type = IIO_CHAN_TYPE_UNKNOWN
e8206c9 Create Code of Conduct.md
ec2f079 Create Contributing.md
6360902 iio_info: use malloc rather than stack buffers
d7838e4 Handle channel IDs without index or modifier correctly
f7c5e7f iio_readdev: Fix corrupt data that was being captured on Windows
49f999c Create README_BUILD.md
6a777b7 (origin/rgetz-fix-licenses) Licences: fix analogdevicesinc#350, and clean up license.
2914675 (origin/fix-iio_buffer_push_partial) local: Fix the checking of the buffer size returned by kernel
7f96e80 (origin/rgetz-add-man-pages) man: add some default man pages
e8c1291 csharp/IOBuffer.cs: Add a read() function to extract data from the IIO buffer.
22486dc csharp/IOBuffer.cs: Change IntPtr cast to long instead of int.
2abe5f7 Global differential attributes code review requests.
17148ef Improved matching on global attributes for differential channels
a9ac553 cmake : on the CI, turn on WITH_DOC, so gh-pages is updated
d0faf30 cmake: Make the WITH_DOC (Doxygen) optional, defaulting off
a225401 iio.h: improve consistancy of doxygen generated content
bffde86 iio.h: Fix whitespace differences/inconsistances
b079f9d (origin/rgetz-update-svg) doc: update code model picture
d94e149 analogdevicesinc#352 First attempt to match global attributes for differential channels.
55976f3 Improve URI documentation for iio_create_context_from_uri
dcf3582 (origin/rgetz-add-flags-for-bindings) CI: Make the CI systems respect the new binding flags
f1faa28 Bindings : **NB** Add Cmake flags to turn on bindings (Default=off)
cc9b3c7 ./tests/iio_attr : move from allocating space on stack to malloc
645391b Fix analogdevicesinc#336, make sure libusb can be found on FreeBSD variants
100f910 fix analogdevicesinc#336, remove warnings on FreeBSD
3ede102 Update .gitignore in the examples dir
846613c fix analogdevicesinc#59 - add a readme to the examples directory
df51cc1 ci,lib.sh: print Github API rate limits
423d20d (origin/rgetz-fix-325) Fix analogdevicesinc#325, remove dead code/compiler warning
8b57196 bindings/csharp/CMakeLists.txt: Fix the install step for CSharp bindings.
673f922 Fix analogdevicesinc#307 by accepting avahi null names, and install avahi service file
e641094 Python3: fixed string type checking in iio.NetworkContext to be compatible with Python 2 and Python 3.
8a82417 Fixed loading of libiio on non-Windows systems where find_library shall find it in the path if the specified name is 'iio'.
5ca77b1 analogdevicesincgh-327: Use "include(FindPythinInterp)" when compiling with CMake older than 3.12.
4470593 Making the printfs in dummy-iiostream portable.
dc3684c Fixing dummy-iiostream read method help message.
1036e51 ci,os-x: disable brew's default install cleanup
a3a4c08 ci,lib: fix typo; correct is `brew list --versions`
4540f7e build,ci: os-x: install packages if they don't exist
c9a854f utilities.c: Consider OS X a platform that has locale support
812cfd2 (origin/context_cmd_line_args) Fixed indentation issues.
ef82d7b ad9361-iiostream.c example takes Command line arguments to select local context vs uri context.
4655780 Python: More robust loading of IIO library that works on different platforms.
e31a4e2 Python: More robust loading of IIO library that works on different platforms.
96a9689 CMake python bindings: "use find_package (Python COMPONENTS Interpreter)" instead of deprecated "include(FindPythonInterp)"
c3bed86 CMake: added option OSX_INSTALL_FRAMEWORKSDIR (default /Library/Frameworks) to specify custom install path. rpath of tools is corrected to reference the library relative to the binary's location.
0fbb31f network: only resolve interface name on ipv6 ll
915adbb README.md: fix OS X High Sierra alternative package link
78170b1 README.md: remove OS X El Capitan (10.11) from readme
c4833c5 build,.travis.yml: add support for Xcode 11
b48d91f .travis.yml: remove/retire Trusty builds
48808dd General: Rework the Windows installer and the zip artifact.
76083a7 travis-ci: recent upgrades in the travis-ci infrastructure caused some breakages in deployments
1773c52 Add example for ADRV9009
6abaaec local.c: make sure dst is null-terminated if fread fails
5090603 fix install of binaries with a static only library
b8f3bf9 Update README.md to include the arm packages
bb9831a iiod: usbd: Fix wrong null pointer check

Adrian Suciu (1):
      local.c: make sure dst is null-terminated if fread fails

Alexandra Trifan (2):
      General: Rework the Windows installer and the zip artifact.
      bindings/csharp/CMakeLists.txt: Fix the install step for CSharp bindings.

Alexandra.Trifan (2):
      csharp/IOBuffer.cs: Change IntPtr cast to long instead of int.
      csharp/IOBuffer.cs: Add a read() function to extract data from the IIO buffer.

Alexandru Ardelean (8):
      .travis.yml: remove/retire Trusty builds
      build,.travis.yml: add support for Xcode 11
      README.md: remove OS X El Capitan (10.11) from readme
      README.md: fix OS X High Sierra alternative package link
      build,ci: os-x: install packages if they don't exist
      ci,lib: fix typo; correct is `brew list --versions`
      ci,os-x: disable brew's default install cleanup
      ci,lib.sh: print Github API rate limits

Dan Nechita (22):
      utilities.c: Consider OS X a platform that has locale support
      Merge pull request analogdevicesinc#304 from dimasad/master
      Merge pull request analogdevicesinc#332 from matejk/fix-linux-load-library
      Merge pull request analogdevicesinc#333 from matejk/fix-python-2-3-string-check
      Merge pull request analogdevicesinc#341 from analogdevicesinc/build-print-remaining-api-limits
      Merge pull request analogdevicesinc#348 from analogdevicesinc/rgetz-move-to-malloc
      Merge pull request analogdevicesinc#347 from analogdevicesinc/rgetz-add-flags-for-bindings
      Merge pull request analogdevicesinc#356 from analogdevicesinc/rgetz-fix-iio.h
      Merge pull request analogdevicesinc#353 from analogdevicesinc/rgetz-promote-WITH-DOC
      Merge pull request analogdevicesinc#354 from fpagliughi/differential-global-attr
      Merge pull request analogdevicesinc#360 from analogdevicesinc/csharp_fixes
      local: Fix the checking of the buffer size returned by kernel
      Merge pull request analogdevicesinc#362 from analogdevicesinc/fix-iio_buffer_push_partial
      Merge pull request analogdevicesinc#361 from analogdevicesinc/rgetz-patch-1
      iio_readdev: Fix corrupt data that was being captured on Windows
      Merge pull request analogdevicesinc#358 from analogdevicesinc/rgetz-fix-licenses
      Merge pull request analogdevicesinc#366 from hshmt/type
      Merge pull request analogdevicesinc#369 from analogdevicesinc/rgetz-malloc-iio-info
      Merge pull request analogdevicesinc#375 from analogdevicesinc/rgetz-iio_attr-gen-code2
      network: Fix typo in error message related to iiod client open
      Merge pull request analogdevicesinc#376 from analogdevicesinc/rgetz-verbose-iiod-errors
      Bump to version v0.19

Dimas Abreu Archanjo Dutra (2):
      Fixing dummy-iiostream read method help message.
      Making the printfs in dummy-iiostream portable.

Edward Kigwana (1):
      Improve URI documentation for iio_create_context_from_uri

Jorik Jonker (1):
      network: only resolve interface name on ipv6 ll

Matej Kenda (8):
      CMake: added option OSX_INSTALL_FRAMEWORKSDIR (default /Library/Frameworks) to specify custom install path. rpath of tools is corrected to reference the library relative to the binary's location.
      CMake python bindings: "use find_package (Python COMPONENTS Interpreter)" instead of deprecated "include(FindPythonInterp)"
      Python: More robust loading of IIO library that works on different platforms.
      Python: More robust loading of IIO library that works on different platforms.
      Merge branch 'python-find-library' of github.com:matejk/libiio into python-find-library
      analogdevicesincgh-327: Use "include(FindPythinInterp)" when compiling with CMake older than 3.12.
      Fixed loading of libiio on non-Windows systems where find_library shall find it in the path if the specified name is 'iio'.
      Python3: fixed string type checking in iio.NetworkContext to be compatible with Python 2 and Python 3.

Michael Hennerich (7):
      Merge pull request analogdevicesinc#279 from analogdevicesinc/iiod-nullptr-fix
      Merge pull request analogdevicesinc#290 from analogdevicesinc/coverity_fix_cid343595
      Merge pull request analogdevicesinc#297 from jonkerj/fix-network-global-ipv6
      Merge pull request analogdevicesinc#314 from matejk/python-find-library
      Merge pull request analogdevicesinc#312 from matejk/osx-install-frameworksdir
      Merge pull request analogdevicesinc#313 from matejk/cmake-find-python
      Merge pull request analogdevicesinc#319 from analogdevicesinc/context_cmd_line_args

Paul Cercueil (1):
      iiod: usbd: Fix wrong null pointer check

Pierre-Jean Texier (1):
      fix install of binaries with a static only library

Robin Getz (38):
      Update README.md to include the arm packages
      travis-ci: recent upgrades in the travis-ci infrastructure caused some breakages in deployments
      Merge pull request analogdevicesinc#283 from texierp/fix/rpath
      Merge pull request analogdevicesinc#328 from matejk/analogdevicesincgh-327-python-not-found
      Fix analogdevicesinc#307 by accepting avahi null names, and install avahi service file
      Merge pull request analogdevicesinc#338 from analogdevicesinc/rgetz-avahi-install
      Merge pull request analogdevicesinc#337 from analogdevicesinc/fix_install_csharp
      Fix analogdevicesinc#325, remove dead code/compiler warning
      Merge pull request analogdevicesinc#340 from analogdevicesinc/rgetz-fix-325
      fix analogdevicesinc#59 - add a readme to the examples directory
      Update .gitignore in the examples dir
      Merge pull request analogdevicesinc#342 from analogdevicesinc/rgetz-patch-2
      fix analogdevicesinc#336, remove warnings on FreeBSD
      Merge pull request analogdevicesinc#339 from analogdevicesinc/rgetz-patch-1
      Fix analogdevicesinc#336, make sure libusb can be found on FreeBSD variants
      ./tests/iio_attr : move from allocating space on stack to malloc
      Merge pull request analogdevicesinc#343 from analogdevicesinc/rgetz-patch-2
      Merge pull request analogdevicesinc#346 from analogdevicesinc/rgetz-fix-freebsd-usb
      Bindings : **NB** Add Cmake flags to turn on bindings (Default=off)
      CI: Make the CI systems respect the new binding flags
      doc: update code model picture
      Merge pull request analogdevicesinc#351 from ekigwana/master
      iio.h: Fix whitespace differences/inconsistances
      iio.h: improve consistancy of doxygen generated content
      cmake: Make the WITH_DOC (Doxygen) optional, defaulting off
      cmake : on the CI, turn on WITH_DOC, so gh-pages is updated
      man: add some default man pages
      Licences: fix analogdevicesinc#350, and clean up license.
      Create README_BUILD.md
      iio_info: use malloc rather than stack buffers
      Create Contributing.md
      Create Code of Conduct.md
      iio_info: warn when iio_channel_get_type = IIO_CHAN_TYPE_UNKNOWN
      Merge pull request analogdevicesinc#374 from analogdevicesinc/rgetz-iio-info-add-warn-on-IIO_CHAN_TYPE_UNKNOWN
      Merge pull request analogdevicesinc#371 from analogdevicesinc/rgetz-create-contributing.md
      Merge pull request analogdevicesinc#372 from analogdevicesinc/add-code-of-conduct-1
      iio_attr : Add a feature which auto-generates C code
      Increase error reporting on iiod and network backend

Ryo Hashimoto (1):
      Handle channel IDs without index or modifier correctly

SrikanthPagadarai (2):
      ad9361-iiostream.c example takes Command line arguments to select local context vs uri context.
      Fixed indentation issues.

Travis Collins (2):
      Merge pull request analogdevicesinc#355 from analogdevicesinc/rgetz-update-svg
      Merge pull request analogdevicesinc#359 from analogdevicesinc/rgetz-add-man-pages

Travis F. Collins (1):
      Add example for ADRV9009

fpagliughi (3):
      analogdevicesinc#352 First attempt to match global attributes for differential channels.
      Improved matching on global attributes for differential channels
      Global differential attributes code review requests.

Signed-off-by: Dan Nechita <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants