Building bladeRF on Arch

Having issues with the site, hardware, source code, or any other issues?

Moderator: robert.ghilduta

Post Reply
txjacob
Posts: 19
Joined: Fri Apr 14, 2017 10:12 am

Building bladeRF on Arch

Post by txjacob » Mon Jun 04, 2018 11:31 am

I'm trying to build the bladeRF source on arch, but I seem to be running into the some issues. Cmake seems to work fine:

Code: Select all

-- The C compiler identification is GNU 8.1.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
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.4.2") 
-- Checking libusb version...
-- libusb version: 1.0.22

-- Looking for clock_gettime in c
-- Looking for clock_gettime in c - found
-- Checking libc version...
-- libc version: 2.27

--
-- /usr/local/lib64 does not exist. Defaulting libbladeRF install location to /usr/local/lib.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- libbladeRF version: 1.9.0-git-23c6379e
-- The CXX compiler identification is GNU 8.1.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- nuand bladeRF udev rules will be installed to '/etc/udev/rules.d' upon running 'make install'
--
-- Will use pandoc to generate interactive help
-- Checking for module 'libtecla'
--   Package 'libtecla', required by 'virtual:world', not found
-- Found libtecla: /usr/include, /usr/lib/libtecla.so
-- libtecla support enabled
-- Not building man page for bladeRF-cli.  (BUILD_BLADERF_CLI_DOCUMENTATION is OFF)
-- Configured to build bladeRF-cli version: 1.5.1-git-23c6379e
-- Configuring done
-- Generating done
-- Build files have been written to: /home/-----/bladeRF/host/build
But when I try to build I get this error:

Code: Select all

[  0%] Building C object libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/src/async.c.o
[  1%] Building C object libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/src/backend/backend.c.o
[  1%] Building C object libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/src/bladerf.c.o
[  2%] Building C object libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/src/bladerf_priv.c.o
[  2%] Building C object libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/src/capabilities.c.o
[  2%] Building C object libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/src/config.c.o
[  3%] Building C object libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/src/dc_cal_table.c.o
[  3%] Building C object libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/src/device_identifier.c.o
In function ‘handle_serial’,
    inlined from ‘str2devinfo’ at /home/------/bladeRF/host/libraries/libbladeRF/src/device_identifier.c:229:30:
/home/------/bladeRF/host/libraries/libbladeRF/src/device_identifier.c:140:5: error: ‘strncpy’ destination unchanged after copying no bytes [-Werror=stringop-truncation]
     strncpy(d->serial, value, len);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/------/bladeRF/host/libraries/libbladeRF/src/device_identifier.c:140:5: error: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
/home/------/bladeRF/host/libraries/libbladeRF/src/device_identifier.c: In function ‘str2devinfo’:
/home/------/bladeRF/host/libraries/libbladeRF/src/device_identifier.c:119:11: note: length computed here
     len = strlen(value);
           ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/build.make:154: libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/src/device_identifier.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:141: libraries/libbladeRF/CMakeFiles/libbladerf_shared.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Anyone know what's going on here?

bglod
Posts: 128
Joined: Thu Jun 18, 2015 6:10 pm

Re: Building bladeRF on Arch

Post by bglod » Mon Jun 04, 2018 11:59 am

I have the same issue on Arch, gcc v8.1.0-1. We may already have a fix for this in our dev repo that we can push out soon. Please create an issue on GitHub so we can track it.

Thanks for reporting!
Electrical Engineer
Nuand, LLC.

txjacob
Posts: 19
Joined: Fri Apr 14, 2017 10:12 am

Re: Building bladeRF on Arch

Post by txjacob » Mon Jun 04, 2018 12:00 pm

Awesome! I've opened the issue on GitHub.

User avatar
rtucker
Posts: 47
Joined: Sun Jan 25, 2015 10:38 am

Re: Building bladeRF on Arch

Post by rtucker » Wed Jun 06, 2018 10:35 am

This should be fixed in master with commit https://github.com/Nuand/bladeRF/commit ... f2c0dd9bb0.

Thanks for the heads up :)
Rey Tucker (she/her)
Systems Engineer, Nuand LLC
Rochester, NY, USA

txjacob
Posts: 19
Joined: Fri Apr 14, 2017 10:12 am

Re: Building bladeRF on Arch

Post by txjacob » Wed Jun 06, 2018 11:29 am

Cool! I'll give it a try later tonight and let you know what happens.

Post Reply