When using gr-osmosdr with an xtrx board
Executing: /usr/bin/python3 -u /home/gwe/sources/nop.py
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/osmosdr/osmosdr_swig.py", line 14, in
swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in
_find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
File "<frozen importlib._bootstrap>", line 583, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1043, in
create_module
File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
ImportError: /usr/lib/libgnuradio-osmosdr.so.0.2.0: undefined symbol:
xtrx_tune_rx_bandwidth
libgnuradio-osmosdr has no references to libxtrx*.so*:
$ ldd /usr/lib/libgnuradio-osmosdr.so.0.2.0.0 | grep xtrx
$
After adding the mandatory library in CMakeLists.txt, flowgraph start
correctly:
Executing: /usr/bin/python3 -u /home/gwe/sources/nop.py
CPU Features: SSE2+ SSE4.1+ AVX- FMA-
Using sse2 for xtrxdsp_iq16_sc32
Using sse2 for xtrxdsp_iq8_ic16
Using sse2 for xtrxdsp_iq16_ic16i
Using sse2 for xtrxdsp_iq8_ic8i
Using sse2 for xtrxdsp_sc32i_iq16
Using sse2 for xtrxdsp_iq8_sc32
Using sse2 for xtrxdsp_iq8_sc32i
Using sse2 for xtrxdsp_iq16_sc32i
Using sse2 for xtrxdsp_sc32_iq16
Using sse2 for xtrxdsp_iq8_ic16i
Using sse2 for xtrxdsp_ic16i_iq16
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.8.2.0
built-in source types: file xtrx
xtrx
xtrx_obj::xtrx_obj = 4
And the libgnuradio-osmosdr is correctly linked to libxtrx*.so*
$ ldd /usr/lib/libgnuradio-osmosdr.so.0.2.0.0 | grep xtrx
libxtrx.so.0 => /usr/local/lib/libxtrx.so.0 (0x00007f0cf7188000)
libxtrxll.so.0 => /usr/local/lib/libxtrxll.so.0 (0x00007f0cf6535000)
libxtrxdsp.so.0 => /usr/local/lib/libxtrxdsp.so.0 (0x00007f0cf6526000)
$
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou(a)trabucayre.com>
---
lib/xtrx/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/xtrx/CMakeLists.txt b/lib/xtrx/CMakeLists.txt
index 9297bf0..7f31829 100644
--- a/lib/xtrx/CMakeLists.txt
+++ b/lib/xtrx/CMakeLists.txt
@@ -26,6 +26,10 @@ target_include_directories(gnuradio-osmosdr PRIVATE
${LIBXTRX_INCLUDE_DIRS}
)
+APPEND_LIB_LIST(
+ ${LIBXTRX_LIBRARIES}
+)
+
list(APPEND gr_osmosdr_srcs
${CMAKE_CURRENT_SOURCE_DIR}/xtrx_obj.cc
${CMAKE_CURRENT_SOURCE_DIR}/xtrx_source_c.cc
--
2.26.2
Show replies by date