Re: gr-osmosdr xtrx_obj.cc:71:13: error: ‘xtrx_open_string’ was not declared in this scope

Eric Wild ewild at sysmocom.de
Tue Jan 19 16:37:38 UTC 2021


Check your paths, your native system prefix appears to be /usr, but you 
chose /usr/local, see 
https://wiki.gnuradio.org/index.php/ModuleNotFoundError

-Eric

Am 19.01.2021 um 08:41 schrieb 雪碧 0xroot:
> Hi, I build gr-osmocom + XTRX again. And compile successfully
> But when I run osmocom_fft :
>
>
>     osmocom_fft -F -f 850e6 -s 4e6
>     Traceback (most recent call last):
>       File "/usr/local/bin/osmocom_fft", line 23, in <module>
>         import osmosdr
>     ModuleNotFoundError: No module named 'osmosdr'
>
>
>
> clone gr-osmosdr from https://github.com/osmocom/gr-osmosdr 
> <https://github.com/osmocom/gr-osmosdr>
>  Try master and gr-3.8 branch, get the same result
>
>     gnuradio-config-info -v
>     3.8.2.0
>
>
>
> output of cmake:
>
> cmake ..
> -- Build type not specified: defaulting to release.
> -- Checking for module 'gmp'
> --   No package 'gmp' found
> -- Checking for module 'mpir >= 3.0'
> --   No package 'mpir' found
> -- Could NOT find MPIR (missing: MPIRXX_LIBRARY MPIR_LIBRARY 
> MPIR_INCLUDE_DIR)
> -- Boost version: 1.65.1
> -- Found the following Boost libraries:
> --   date_time
> --   program_options
> --   filesystem
> --   system
> --   regex
> --   thread
> --   unit_test_framework
> --   chrono
> --   atomic
> -- User set python executable /usr/bin/python3
> -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so 
> <http://libpython3.6m.so> (found suitable exact version "3.6.9")
> -- Extracting version information from git describe...
> -- Boost version: 1.65.1
> -- Found the following Boost libraries:
> --   chrono
> --   thread
> --   system
> --   date_time
> --   atomic
> -- 
> -- The build system will automatically enable all components.
> -- Use -DENABLE_DEFAULT=OFF to disable components by default.
> -- Searching for GNURadio-Blocks...
> --  Found GNURadio-Blocks: 1
> -- Searching for IQ Balance...
> -- Could NOT find gnuradio-iqbalance (missing: gnuradio-iqbalance_DIR)
> --  Found IQ Balance: 0
> -- Searching for UHD Drivers...
> --  Found UHD Driver: TRUE
> -- Searching for UHD Block...
> --  Found UHD Block: 1
> -- Searching for Volk...
> --  Found Volk: 1
> -- Checking for module 'libairspyhf'
> --   No package 'libairspyhf' found
> -- Could NOT find LIBAIRSPYHF (missing: LIBAIRSPYHF_LIBRARIES 
> LIBAIRSPYHF_INCLUDE_DIRS)
> -- Checking for module 'libgnuradio-fcdproplus'
> --   No package 'libgnuradio-fcdproplus' found
> -- gnuradio-fcdproplus not found.
> -- Checking for module 'libfreesrp'
> --   No package 'libfreesrp' found
> -- libfreesrp not found.
> -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so 
> <http://libpython3.6m.so> (found suitable version "3.6.9", minimum 
> required is "3")
> -- 
> -- Checking for module SWIG
> -- Found SWIG version 3.0.12.
> -- Minimum SWIG version required is 1.3.31
> -- 
> -- Configuring Python support support...
> --   Dependency PYTHONLIBS_FOUND = TRUE
> --   Dependency SWIG_FOUND = TRUE
> --   Dependency SWIG_VERSION_CHECK = TRUE
> --   Enabling Python support support.
> --   Override with -DENABLE_PYTHON=ON/OFF
> CMake Warning (dev) in lib/CMakeLists.txt:
>   A logical block opening on the line
>
>     /home/init3/SDR/gr-osmosdr/lib/CMakeLists.txt:45 (MACRO)
>
>   closes on the line
>
>     /home/init3/SDR/gr-osmosdr/lib/CMakeLists.txt:47 (ENDMACRO)
>
>   with mis-matching arguments.
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> You have called ADD_LIBRARY for library gnuradio-osmosdr without any 
> source files. This typically indicates a problem with your 
> CMakeLists.txt file
> -- 
> -- Configuring high resolution timing...
> --   High resolution timing supported through clock_gettime.
> -- 
> -- Configuring Osmocom IQ Imbalance Correction support...
> --   Dependency gnuradio-iqbalance_FOUND = 0
> --   Disabling Osmocom IQ Imbalance Correction support.
> --   Override with -DENABLE_IQBALANCE=ON/OFF
> -- 
> -- Configuring FUNcube Dongle support...
> --   Dependency GNURADIO_FCDPP_FOUND = FALSE
> --   Disabling FUNcube Dongle support.
> --   Override with -DENABLE_FCD=ON/OFF
> -- 
> -- Configuring IQ File Source & Sink support...
> --   Dependency gnuradio-blocks_FOUND = 1
> --   Enabling IQ File Source & Sink support.
> --   Override with -DENABLE_FILE=ON/OFF
> -- 
> -- 
> -- Configuring Osmocom RTLSDR support...
> --   Dependency LIBRTLSDR_FOUND = TRUE
> --   Enabling Osmocom RTLSDR support.
> --   Override with -DENABLE_RTL=ON/OFF
> -- 
> -- Configuring RTLSDR TCP Client support...
> --   Dependency gnuradio-blocks_FOUND = 1
> --   Enabling RTLSDR TCP Client support.
> --   Override with -DENABLE_RTL_TCP=ON/OFF
> -- 
> -- Configuring Ettus USRP Devices support...
> --   Dependency UHD_FOUND = TRUE
> --   Dependency gnuradio-uhd_FOUND = 1
> --   Enabling Ettus USRP Devices support.
> --   Override with -DENABLE_UHD=ON/OFF
> -- 
> -- Configuring HackRF & rad1o Badge support...
> --   Dependency LIBHACKRF_FOUND = TRUE
> --   Enabling HackRF & rad1o Badge support.
> --   Override with -DENABLE_HACKRF=ON/OFF
> -- 
> -- Configuring nuand bladeRF support...
> --   Dependency LIBBLADERF_FOUND = TRUE
> --   Enabling nuand bladeRF support.
> --   Override with -DENABLE_BLADERF=ON/OFF
> -- 
> -- Configuring RFSPACE Receivers support...
> --   Enabling RFSPACE Receivers support.
> --   Override with -DENABLE_RFSPACE=ON/OFF
> -- 
> -- Configuring AIRSPY Receiver support...
> --   Dependency LIBAIRSPY_FOUND = TRUE
> --   Enabling AIRSPY Receiver support.
> --   Override with -DENABLE_AIRSPY=ON/OFF
> -- 
> -- Configuring AIRSPY HF+ Receiver support...
> --   Dependency LIBAIRSPYHF_FOUND = FALSE
> --   Disabling AIRSPY HF+ Receiver support.
> --   Override with -DENABLE_AIRSPYHF=ON/OFF
> -- 
> -- Configuring SoapySDR support support...
> --   Dependency SoapySDR_FOUND = 1
> --   Enabling SoapySDR support support.
> --   Override with -DENABLE_SOAPY=ON/OFF
> -- 
> -- Configuring Red Pitaya SDR support...
> --   Enabling Red Pitaya SDR support.
> --   Override with -DENABLE_REDPITAYA=ON/OFF
> -- 
> -- Configuring FreeSRP support support...
> --   Dependency LIBFREESRP_FOUND = FALSE
> --   Disabling FreeSRP support support.
> --   Override with -DENABLE_FREESRP=ON/OFF
> -- 
> -- Configuring XTRX SDR support...
> --   Dependency LIBXTRX_FOUND = TRUE
> --   Enabling XTRX SDR support.
> --   Override with -DENABLE_XTRX=ON/OFF
> -- 
> -- ######################################################
> -- # Gnuradio enabled components
> -- ######################################################
> --   * Python support
> --   * IQ File Source & Sink
> --   * Osmocom RTLSDR
> --   * RTLSDR TCP Client
> --   * Ettus USRP Devices
> --   * HackRF & rad1o Badge
> --   * nuand bladeRF
> --   * RFSPACE Receivers
> --   * AIRSPY Receiver
> --   * SoapySDR support
> --   * Red Pitaya SDR
> --   * XTRX SDR
> -- 
> -- ######################################################
> -- # Gnuradio disabled components
> -- ######################################################
> --   * Osmocom IQ Imbalance Correction
> --   * FUNcube Dongle
> --   * AIRSPY HF+ Receiver
> --   * FreeSRP support
> -- 
> -- Building for version: 0.2.0.0 / 0.2.0
> -- Using install prefix: /usr/local
> -- Configuring done
> -- Generating done
>
>     -- Build files have been written to: /home/init3/SDR/gr-osmosdr/build 
>
>
> Clayton Smith <argilo at gmail.com <mailto:argilo at gmail.com>> 
> 于2021年1月18日周一 下午10:10写道:
>
>     Are you using the latest version of libxtrx? The xtrx_open_list
>     function was removed from its API a couple years ago and replaced
>     with xtrx_open_string. I recently updated gr-osmosdr to use the
>     new function.
>
>     On Mon, Jan 18, 2021 at 8:43 AM 雪碧 0xroot <renxianyuanqi at gmail.com
>     <mailto:renxianyuanqi at gmail.com>> wrote:
>
>         Dear  osmocom community,
>         I am using XTRX + gr-osmosdr on ubuntu 18
>         when i try to build gr-osmosdr :
>
>             [ 81%] Building CXX object
>             lib/CMakeFiles/gnuradio-osmosdr.dir/redpitaya/redpitaya_sink_c.cc.o
>             [ 83%] Building CXX object
>             lib/CMakeFiles/gnuradio-osmosdr.dir/redpitaya/redpitaya_common.cc.o
>             [ 85%] Building CXX object
>             lib/CMakeFiles/gnuradio-osmosdr.dir/xtrx/xtrx_obj.cc.o
>             [ 87%] Building CXX object
>             lib/CMakeFiles/gnuradio-osmosdr.dir/xtrx/xtrx_source_c.cc.o
>             /home/init3/SDR/gr-osmosdr/lib/xtrx/xtrx_obj.cc: In
>             constructor ‘xtrx_obj::xtrx_obj(const string&, unsigned
>             int, bool)’:
>             /home/init3/SDR/gr-osmosdr/lib/xtrx/xtrx_obj.cc:71:13:
>             error: ‘xtrx_open_string’ was not declared in this scope
>                int res = xtrx_open_string(path.c_str(), &_obj);
>                          ^~~~~~~~~~~~~~~~
>             /home/init3/SDR/gr-osmosdr/lib/xtrx/xtrx_obj.cc:71:13:
>             note: suggested alternative: ‘xtrx_open_list’
>                int res = xtrx_open_string(path.c_str(), &_obj);
>                          ^~~~~~~~~~~~~~~~
>                          xtrx_open_list
>             lib/CMakeFiles/gnuradio-osmosdr.dir/build.make:662: recipe
>             for target
>             'lib/CMakeFiles/gnuradio-osmosdr.dir/xtrx/xtrx_obj.cc.o'
>             failed
>             make[2]: ***
>             [lib/CMakeFiles/gnuradio-osmosdr.dir/xtrx/xtrx_obj.cc.o]
>             Error 1
>             make[2]: *** 正在等待未完成的任务....
>             CMakeFiles/Makefile2:167: recipe for target
>             'lib/CMakeFiles/gnuradio-osmosdr.dir/all' failed
>             make[1]: *** [lib/CMakeFiles/gnuradio-osmosdr.dir/all] Error 2
>             Makefile:140: recipe for target 'all' failed
>             make: *** [all] Error 2
>
>
>         Info:
>
>             gnuradio 3.8.2.0
>             gr-osmosdr gr-3.8 
>
>
>         How to fix it?
>
>         cmake output:
>
>             cmake ..
>             -- Build type not specified: defaulting to release.
>             -- Checking for module 'gmp'
>             --   No package 'gmp' found
>             -- Checking for module 'mpir >= 3.0'
>             --   No package 'mpir' found
>             -- Could NOT find MPIR (missing: MPIRXX_LIBRARY
>             MPIR_LIBRARY MPIR_INCLUDE_DIR)
>             -- Boost version: 1.65.1
>             -- Found the following Boost libraries:
>             --   date_time
>             --   program_options
>             --   filesystem
>             --   system
>             --   regex
>             --   thread
>             --   unit_test_framework
>             --   chrono
>             --   atomic
>             -- User set python executable /usr/bin/python3.6
>             -- Found PythonLibs:
>             /usr/lib/x86_64-linux-gnu/libpython3.6m.so
>             <http://libpython3.6m.so> (found suitable exact version
>             "3.6.9")
>             -- Extracting version information from git describe...
>             -- Boost version: 1.65.1
>             -- Found the following Boost libraries:
>             --   chrono
>             --   thread
>             --   system
>             --   date_time
>             --   atomic
>             -- 
>             -- The build system will automatically enable all components.
>             -- Use -DENABLE_DEFAULT=OFF to disable components by default.
>             -- Searching for GNURadio-Blocks...
>             --  Found GNURadio-Blocks: 1
>             -- Searching for IQ Balance...
>             -- Could NOT find gnuradio-iqbalance (missing:
>             gnuradio-iqbalance_DIR)
>             --  Found IQ Balance: 0
>             -- Searching for UHD Drivers...
>             --  Found UHD Driver: TRUE
>             -- Searching for UHD Block...
>             --  Found UHD Block: 1
>             -- Searching for Volk...
>             --  Found Volk: 1
>             -- Checking for module 'libairspyhf'
>             --   No package 'libairspyhf' found
>             -- Could NOT find LIBAIRSPYHF (missing:
>             LIBAIRSPYHF_LIBRARIES LIBAIRSPYHF_INCLUDE_DIRS)
>             -- Checking for module 'libgnuradio-fcdproplus'
>             --   No package 'libgnuradio-fcdproplus' found
>             -- gnuradio-fcdproplus not found.
>             -- Checking for module 'libfreesrp'
>             --   No package 'libfreesrp' found
>             -- libfreesrp not found.
>             -- Found PythonLibs:
>             /usr/lib/x86_64-linux-gnu/libpython3.6m.so
>             <http://libpython3.6m.so> (found suitable version "3.6.9",
>             minimum required is "3")
>             -- 
>             -- Checking for module SWIG
>             -- Found SWIG version 3.0.12.
>             -- Minimum SWIG version required is 1.3.31
>             -- 
>             -- Configuring Python support support...
>             --   Dependency PYTHONLIBS_FOUND = TRUE
>             --   Dependency SWIG_FOUND = TRUE
>             --   Dependency SWIG_VERSION_CHECK = TRUE
>             --   Enabling Python support support.
>             --   Override with -DENABLE_PYTHON=ON/OFF
>             CMake Warning (dev) in lib/CMakeLists.txt:
>               A logical block opening on the line
>
>                 /home/init3/SDR/gr-osmosdr/lib/CMakeLists.txt:45 (MACRO)
>
>               closes on the line
>
>                 /home/init3/SDR/gr-osmosdr/lib/CMakeLists.txt:47
>             (ENDMACRO)
>
>               with mis-matching arguments.
>             This warning is for project developers.  Use -Wno-dev to
>             suppress it.
>
>             You have called ADD_LIBRARY for library gnuradio-osmosdr
>             without any source files. This typically indicates a
>             problem with your CMakeLists.txt file
>             -- 
>             -- Configuring high resolution timing...
>             --   High resolution timing supported through clock_gettime.
>             -- 
>             -- Configuring Osmocom IQ Imbalance Correction support...
>             --   Dependency gnuradio-iqbalance_FOUND = 0
>             --   Disabling Osmocom IQ Imbalance Correction support.
>             --   Override with -DENABLE_IQBALANCE=ON/OFF
>             -- 
>             -- Configuring FUNcube Dongle support...
>             --   Dependency GNURADIO_FCDPP_FOUND = FALSE
>             --   Disabling FUNcube Dongle support.
>             --   Override with -DENABLE_FCD=ON/OFF
>             -- 
>             -- Configuring IQ File Source & Sink support...
>             --   Dependency gnuradio-blocks_FOUND = 1
>             --   Enabling IQ File Source & Sink support.
>             --   Override with -DENABLE_FILE=ON/OFF
>             -- 
>             -- 
>             -- Configuring Osmocom RTLSDR support...
>             --   Dependency LIBRTLSDR_FOUND = TRUE
>             --   Enabling Osmocom RTLSDR support.
>             --   Override with -DENABLE_RTL=ON/OFF
>             -- 
>             -- Configuring RTLSDR TCP Client support...
>             --   Dependency gnuradio-blocks_FOUND = 1
>             --   Enabling RTLSDR TCP Client support.
>             --   Override with -DENABLE_RTL_TCP=ON/OFF
>             -- 
>             -- Configuring Ettus USRP Devices support...
>             --   Dependency UHD_FOUND = TRUE
>             --   Dependency gnuradio-uhd_FOUND = 1
>             --   Enabling Ettus USRP Devices support.
>             --   Override with -DENABLE_UHD=ON/OFF
>             -- 
>             -- Configuring HackRF & rad1o Badge support...
>             --   Dependency LIBHACKRF_FOUND = TRUE
>             --   Enabling HackRF & rad1o Badge support.
>             --   Override with -DENABLE_HACKRF=ON/OFF
>             -- 
>             -- Configuring nuand bladeRF support...
>             --   Dependency LIBBLADERF_FOUND = TRUE
>             --   Enabling nuand bladeRF support.
>             --   Override with -DENABLE_BLADERF=ON/OFF
>             -- 
>             -- Configuring RFSPACE Receivers support...
>             --   Enabling RFSPACE Receivers support.
>             --   Override with -DENABLE_RFSPACE=ON/OFF
>             -- 
>             -- Configuring AIRSPY Receiver support...
>             --   Dependency LIBAIRSPY_FOUND = TRUE
>             --   Enabling AIRSPY Receiver support.
>             --   Override with -DENABLE_AIRSPY=ON/OFF
>             -- 
>             -- Configuring AIRSPY HF+ Receiver support...
>             --   Dependency LIBAIRSPYHF_FOUND = FALSE
>             --   Disabling AIRSPY HF+ Receiver support.
>             --   Override with -DENABLE_AIRSPYHF=ON/OFF
>             -- 
>             -- Configuring SoapySDR support support...
>             --   Dependency SoapySDR_FOUND = 1
>             --   Enabling SoapySDR support support.
>             --   Override with -DENABLE_SOAPY=ON/OFF
>             -- 
>             -- Configuring Red Pitaya SDR support...
>             --   Enabling Red Pitaya SDR support.
>             --   Override with -DENABLE_REDPITAYA=ON/OFF
>             -- 
>             -- Configuring FreeSRP support support...
>             --   Dependency LIBFREESRP_FOUND = FALSE
>             --   Disabling FreeSRP support support.
>             --   Override with -DENABLE_FREESRP=ON/OFF
>             -- 
>             -- Configuring XTRX SDR support...
>             --   Dependency LIBXTRX_FOUND = TRUE
>             --   Enabling XTRX SDR support.
>             --   Override with -DENABLE_XTRX=ON/OFF
>             -- 
>             -- ######################################################
>             -- # Gnuradio enabled components
>             -- ######################################################
>             --   * Python support
>             --   * IQ File Source & Sink
>             --   * Osmocom RTLSDR
>             --   * RTLSDR TCP Client
>             --   * Ettus USRP Devices
>             --   * HackRF & rad1o Badge
>             --   * nuand bladeRF
>             --   * RFSPACE Receivers
>             --   * AIRSPY Receiver
>             --   * SoapySDR support
>             --   * Red Pitaya SDR
>             --   * XTRX SDR
>             -- 
>             -- ######################################################
>             -- # Gnuradio disabled components
>             -- ######################################################
>             --   * Osmocom IQ Imbalance Correction
>             --   * FUNcube Dongle
>             --   * AIRSPY HF+ Receiver
>             --   * FreeSRP support
>             -- 
>             -- Building for version: 0.2.0.0 / 0.2.0
>             -- Using install prefix: /usr/local
>             -- Configuring done
>             -- Generating done
>             -- Build files have been written to:
>             /home/init3/SDR/gr-osmosdr/build
>
>
>         --------------------------
>         Thanks
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20210119/ce7bd9ff/attachment-0001.htm>


More information about the osmocom-sdr mailing list