Post Go back to editing

Installing FMCOMMS5 DOA estimation GNU Radio tool -- gr-doa

Category: Software

Hi all,

I want to do DOA estimation experiments with FMComms5 board with the help of GNU radio. I am trying to install the gr-doa tool found at -  https://github.com/tfcollins/gr-doa/tree/adi. However I am facing some problems:

cmake ..

-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "2")
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2")
CMake Error at cmake/Modules/GrPython.cmake:113 (file):
  file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
  exactly three arguments.
Call Stack (most recent call first):
  python/CMakeLists.txt:23 (include)


-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2")
CMake Error at cmake/Modules/GrPython.cmake:113 (file):
  file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
  exactly three arguments.
Call Stack (most recent call first):
  apps/CMakeLists.txt:20 (include)


-- Configuring incomplete, errors occurred!

Hence, I specify the python libraries, include directories and executable to the cmake command, but the problem remains the same:

cmake -DPYTHON_LIBRARIES=/usr/include/python3.10 -DPYTHON_INCLUDE_DIRS=/usr/lib/x86_64-linux-gnu/libpython3.10.so -DPYTHON_EXECUTABLE=/usr/bin/python3 -Wno-dev ..

-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "2")
  File "<string>", line 3
    print sysconfig.get_python_lib(plat_specific=True, prefix='')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
CMake Error at cmake/Modules/GrPython.cmake:113 (file):
  file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
  exactly three arguments.
Call Stack (most recent call first):
  python/CMakeLists.txt:23 (include)


Traceback (most recent call last):
  File "<string>", line 2, in <module>
TypeError: Strings must be encoded before hashing
  File "<string>", line 3
    print sysconfig.get_python_lib(plat_specific=True, prefix='')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
CMake Error at cmake/Modules/GrPython.cmake:113 (file):
  file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
  exactly three arguments.
Call Stack (most recent call first):
  apps/CMakeLists.txt:20 (include)


Traceback (most recent call last):
  File "<string>", line 2, in <module>
TypeError: Strings must be encoded before hashing
CMake Error at cmake/Modules/GrPython.cmake:125 (add_custom_target):
  add_custom_target cannot create target "ALL" because another target with
  the same name already exists.  The existing target is a custom target
  created in source directory "/home/ennio/github/gr-doa/python".  See
  documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  cmake/Modules/GrPython.cmake:228 (GR_UNIQUE_TARGET)
  apps/CMakeLists.txt:22 (GR_PYTHON_INSTALL)


-- Configuring incomplete, errors occurred!

How can I fix this?

Thanks,

Ennio

Parents
  • That gr-doa build was based on GR 3.7 which requires python 2. You cannot simply change the pointed to python version and make things function in python 3.

    -Travis

  • Hi Travis,

    Thanks for your reply.

    Now I am running GR 3.7.14 and python 2.7.17. The code seems to build well, but I have problems when running the "make test" command.
    First, this is the output of cmake:

    -- The CXX compiler identification is GNU 7.5.0
    -- The C compiler identification is GNU 7.5.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
    -- 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
    -- Build type not specified: defaulting to release.
    -- Boost version: 1.65.1
    -- Found the following Boost libraries:
    --   filesystem
    --   system
    -- Found Armadillo: /usr/lib/x86_64-linux-gnu/libarmadillo.so (found suitable version "12.0.1", minimum required is "7.300") 
    -- Armadillo found
    -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
    -- Checking for module 'cppunit'
    --   Found cppunit, version 1.14.0
    -- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so;dl  
    -- Found Doxygen: /usr/bin/doxygen (found version "1.8.13") found components:  doxygen missing components:  dot
    Checking for GNU Radio Module: RUNTIME
    -- Checking for module 'gnuradio-runtime'
    --   Found gnuradio-runtime, version 3.7.14.0
     * 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
    -- 
    -- Checking for module SWIG
    -- Found SWIG version 3.0.12.
    -- Found SWIG: /usr/bin/swig3.0  
    -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.17", 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
    -- Build files have been written to: /home/ennio/github/gr-doa/build

    Then make:

    Scanning dependencies of target gnuradio-doa
    Scanning dependencies of target _doa_swig_doc_tag
    Scanning dependencies of target pygen_python_a88e3
    [  4%] Building CXX object swig/CMakeFiles/_doa_swig_doc_tag.dir/_doa_swig_doc_tag.cpp.o
    [  8%] Generating __init__.pyc, phase_correct_hier.pyc, average_and_save.pyc, compass.pyc, save_antenna_calib.pyc, twinrx_phase_offset_est.pyc, findmax_and_save.pyc
    [ 13%] Linking CXX executable _doa_swig_doc_tag
    [ 17%] Generating __init__.pyo, phase_correct_hier.pyo, average_and_save.pyo, compass.pyo, save_antenna_calib.pyo, twinrx_phase_offset_est.pyo, findmax_and_save.pyo
    [ 21%] Building CXX object lib/CMakeFiles/gnuradio-doa.dir/autocorrelate_impl.cc.o
    [ 21%] Built target _doa_swig_doc_tag
    Scanning dependencies of target pygen_apps_9a6dd
    [ 21%] Built target pygen_apps_9a6dd
    Scanning dependencies of target doxygen_target
    [ 26%] Generating documentation with doxygen
    warning: Tag `XML_SCHEMA' at line 1511 of file `/home/ennio/github/gr-doa/build/docs/doxygen/Doxyfile' has become obsolete.
             To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
    warning: Tag `XML_DTD' at line 1517 of file `/home/ennio/github/gr-doa/build/docs/doxygen/Doxyfile' has become obsolete.
             To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
    [ 26%] Built target pygen_python_a88e3
    Scanning dependencies of target doa_swig_swig_doc
    [ 30%] Generating doxygen xml for doa_swig_doc docs
    This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex)
     restricted \write18 enabled.
    entering extended mode
    (./_formulas.tex
    LaTeX2e <2017-04-15>
    Babel <3.18> and hyphenation patterns for 3 language(s) loaded.
    warning: Tag `XML_SCHEMA' at line 1478 of file `/home/ennio/github/gr-doa/build/swig/doa_swig_doc_swig_docs/Doxyfile' has become obsolete.
             To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
    warning: Tag `XML_DTD' at line 1484 of file `/home/ennio/github/gr-doa/build/swig/doa_swig_doc_swig_docs/Doxyfile' has become obsolete.
             To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
    (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
    Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
    (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/epsfig.sty
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
    (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
    (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
    (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/dvips.def))))
    No file _formulas.aux.
    [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]
    [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32]
    [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47]
    [48] [49] [50] [51] (./_formulas.aux) )
    Output written on _formulas.dvi (51 pages, 7460 bytes).
    Transcript written on _formulas.log.
    [ 34%] Generating python docstrings for doa_swig_doc
    [ 34%] Built target doa_swig_swig_doc
    Scanning dependencies of target _doa_swig_swig_tag
    [ 39%] Building CXX object swig/CMakeFiles/_doa_swig_swig_tag.dir/_doa_swig_swig_tag.cpp.o
    [ 43%] Linking CXX executable _doa_swig_swig_tag
    [ 43%] Built target _doa_swig_swig_tag
    [ 47%] Generating doa_swig.tag
    Scanning dependencies of target doa_swig_swig_2d0df
    [ 52%] Building CXX object swig/CMakeFiles/doa_swig_swig_2d0df.dir/doa_swig_swig_2d0df.cpp.o
    [ 56%] Linking CXX executable doa_swig_swig_2d0df
    Swig source
    [ 56%] Built target doa_swig_swig_2d0df
    Scanning dependencies of target pygen_swig_13be6
    [ 60%] Generating doa_swig.pyc
    [ 65%] Generating doa_swig.pyo
    [ 65%] Built target pygen_swig_13be6
    [ 69%] Building CXX object lib/CMakeFiles/gnuradio-doa.dir/MUSIC_lin_array_impl.cc.o
    [ 69%] Built target doxygen_target
    [ 73%] Building CXX object lib/CMakeFiles/gnuradio-doa.dir/rootMUSIC_linear_array_impl.cc.o
    [ 78%] Building CXX object lib/CMakeFiles/gnuradio-doa.dir/antenna_correction_impl.cc.o
    [ 82%] Building CXX object lib/CMakeFiles/gnuradio-doa.dir/find_local_max_impl.cc.o
    [ 86%] Building CXX object lib/CMakeFiles/gnuradio-doa.dir/calibrate_lin_array_impl.cc.o
    [ 91%] Linking CXX shared library libgnuradio-doa.so
    [ 91%] Built target gnuradio-doa
    Scanning dependencies of target _doa_swig
    [ 95%] Building CXX object swig/CMakeFiles/_doa_swig.dir/doa_swigPYTHON_wrap.cxx.o
    [100%] Linking CXX shared module _doa_swig.so
    [100%] Built target _doa_swig
    

    Finally, make test

    Running tests...
    Test project /home/ennio/github/gr-doa/build
        Start 1: qa_autocorrelate
    1/5 Test #1: qa_autocorrelate .................***Failed    5.90 sec
        Start 2: qa_MUSIC_lin_array
    2/5 Test #2: qa_MUSIC_lin_array ...............   Passed   11.93 sec
        Start 3: qa_rootMUSIC_linear_array
    3/5 Test #3: qa_rootMUSIC_linear_array ........   Passed    6.66 sec
        Start 4: qa_find_local_max
    4/5 Test #4: qa_find_local_max ................***Failed    2.36 sec
        Start 5: qa_calibrate_lin_array
    5/5 Test #5: qa_calibrate_lin_array ...........***Failed   22.09 sec
    
    40% tests passed, 3 tests failed out of 5
    
    Total Test time (real) =  48.95 sec
    
    The following tests FAILED:
    	  1 - qa_autocorrelate (Failed)
    	  4 - qa_find_local_max (Failed)
    	  5 - qa_calibrate_lin_array (Failed)
    Errors while running CTest
    Makefile:85: recipe for target 'test' failed
    make: *** [test] Error 8

    Is this something I have to worry about?

    Thanks

    Ennio

  • The tests were simply forked from the upstream repo and never touched. From what I remember you need very specific versions of octave and its toolboxes for that tests to function. Those versions are in the readme.

    -Travis

  • Ok, the tool seems to be installed correctly.

    Now I want to check the RX stream from channels 1 and 2 but when running this simple flowgraph

    GR returns the following errors:

    Unable to write attribute in_voltage0_hardwaregain: -95
    Unable to write attribute in_voltage1_hardwaregain: -95
    Unable to write attribute in_voltage0_hardwaregain: -95
    Unable to write attribute in_voltage1_hardwaregain: -95
    ERROR: WRITE ALL: -9

    I have libiio v0.24-20-gfdecc362 and libad9361 checked out on 2018_R2.

Reply
  • Ok, the tool seems to be installed correctly.

    Now I want to check the RX stream from channels 1 and 2 but when running this simple flowgraph

    GR returns the following errors:

    Unable to write attribute in_voltage0_hardwaregain: -95
    Unable to write attribute in_voltage1_hardwaregain: -95
    Unable to write attribute in_voltage0_hardwaregain: -95
    Unable to write attribute in_voltage1_hardwaregain: -95
    ERROR: WRITE ALL: -9

    I have libiio v0.24-20-gfdecc362 and libad9361 checked out on 2018_R2.

Children