AnsweredAssumed Answered

Math.h error gnuradio with libiio

Question asked by daxez12 on May 22, 2017
Latest reply on May 26, 2017 by daxez12

Hi, so I'm making a OOT block in GNU Radio for the FMCOMMS1. I've been able to link libiio to the block, but there's a problem when I run the make command getting something like this (full output in file attached):

In file included from /usr/local/include/gnuradio/math.h:30:0,
                 from /usr/include/c++/5/cmath:44,
                 from /usr/include/c++/5/complex:44,
                 from /usr/local/include/pmt/pmt.h:30,
                 from /usr/local/include/gnuradio/messages/msg_accepter.h:26,
                 from /usr/local/include/gnuradio/msg_accepter.h:26,
                 from /usr/local/include/gnuradio/basic_block.h:28,
                 from /usr/local/include/gnuradio/block.h:27,
                 from /usr/local/include/gnuradio/sync_block.h:27,
                 from /home/daniel/gr-ebz/include/ebz/fmcomms1_source.h:27,
                 from /home/daniel/gr-ebz/lib/fmcomms1_source_impl.h:25,
                 from /home/daniel/gr-ebz/lib/fmcomms1_source_impl.cc:29

 

It's important to say that I just did a 'blank' OOT block without any call to math library or libiio, neither I've called this libraries in the block's code so there's no apparent reason for this to happen.

 

This the output from the cmake, where it finds the IIO library:

-- Found the following Boost libraries:
--   filesystem
--   system
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'cppunit'
--   Found cppunit, version 1.13.2
-- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so;dl  
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.11")
Checking for GNU Radio Module: RUNTIME
-- Checking for module 'gnuradio-runtime'
--   Found gnuradio-runtime, version 3.7.12git
 * INCLUDES=/usr/local/include
 * LIBS=/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
-- Found GNURADIO_RUNTIME: /usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so  
GNURADIO_RUNTIME_FOUND = TRUE
-- Found Git: /usr/bin/git  
-- Found IIO: /usr/local/lib/libgnuradio-iio.so  
-- Found FLEX: /usr/bin/flex (found version "2.6.0")
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Using install prefix: /usr/local
-- Building for version: v1.0-compat-xxx-xunknown / 1.0.0git
--
-- Checking for module SWIG
-- Found SWIG version 3.0.8.
-- Found SWIG: /usr/bin/swig3.0  
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.12", minimum required is "2")
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.12", minimum required is "2")
-- 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 size_t
-- Check size of size_t - done
-- Check size of unsigned int
-- Check size of unsigned int - done
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Configuring done
-- Generating done

 

And this is the cmake file for search libiio:

INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_IIO QUIET gnuradio-core)

 

FIND_PATH(
    IIO_INCLUDE_DIRS
    NAMES iio/api.h
    HINTS $ENV{ITPP_DIR}/include
        ${PC_IIO_INCLUDE_DIR}
    PATHS /usr/local/include/gnuradio
      /usr/src/gr-iio/include/gnuradio
)

 

FIND_LIBRARY(
    IIO_LIBRARIES
    NAMES gnuradio-iio
    HINTS $ENV{IIO_DIR}/lib
        ${PC_IIO_LIBDIR}
    PATHS /usr/local/lib
          /usr/local/lib64
          /usr/lib
          /usr/lib64
      /usr/pkgs64/lib
)

 

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IIO DEFAULT_MSG IIO_LIBRARIES IIO_INCLUDE_DIRS)
MARK_AS_ADVANCED(IIO_LIBRARIES IIO_INCLUDE_DIRS)

I have tested with another OOT blocks without libiio linking and this problem didn't appear. So I'm pretty sure there's something between libiio and gnuradio that I'm missing.

 

I'm using the GNU Radio v3.7.12, and libiio 0.7 both installed from pybombs.

Thanks.

Attachments

Outcomes