GNURADIO AttributeError when instantiating OSMOSDR source in my OOT module (C++)

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.

Thabet GHARBI gharbi.thabet at gmail.com
Fri Sep 13 20:51:41 UTC 2019


Hello,

I'm creating a GNU Radio OOT module in C++ language, in which I instantiate
an osmosdr source. The syntax is : osmosdr::source ::sptr m_source =
osmosdr::source::make();
I also implement other blocks in my design.

In CMakeLists.txt file, I specify all these components:
set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS FFT OSMOSDR)
find_package(Gnuradio-osdmosdr REQUIRED)
include_directories(
...
${GNURADIO_OSMOSDR_INCLUDE_DIRS}
)
link_directories(
...
${GNURADIO_OSMOSDR_LIBRARY_DIRS}
)

In cmake/Modules folder, I copied the FindGnuradio-osmosdr.cmake file from
gqrx project.

The logs of cmake command show that the osmosdr library is found:
-- checking for module 'gnuradio-osmosdr'
-- Found gnuradio-osmosdr, version v0.1.4-127-g4d83c606
-- Found GNURADIO_OSMOSDR: /usr/local/lib/libgnuradio-osmosdr.so

After compiling the module (cmake .. -> make -> make install -> ldconfig),
I got the error 'AttributeError: 'module' object has no attribute 'test'. I
analysed the undefined symbol, and it was due to osmosdr module.

Any suggestion to solve this problem?

PS:
- I'm working on Ubuntu 16.04 (VM), gnuradio 3.7.9, cmake 3.5.1
- In GRC, the osmosdr source and sink work fine

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20190913/24f601aa/attachment.htm>


More information about the osmocom-sdr mailing list