|Subject:||[Discuss-gnuradio] JIT integration and undefined symbol|
|Date:||Tue, 9 Jul 2019 14:39:35 +0200 (CEST)|
I'm actually doing my bachelor thesis about Just In Time compiler and I want to integrate this technology in GNURadio. I've already created OOT module with integrated JIT functionality. I'm now trying to add an in-tree module. I'm trying to do that by copying the dvbt viterbi decoder block. The JIT compiler that I use is : ClangJIT . For testing, I use the example dvbt_rx_8k. I’m working from the maint-3.7 branch. I added my new block and replace the original viterbi decoder in the example. Unfortunately, when running the application, I have the following error :
Traceback (most recent call last):
File "/home/pacco/TB/gnuRadio_perf/dvbt_rx_demo_8k_jit.py", line 21, in <module>
from gnuradio import dtv
File "/opt/gnuradioClangJit/lib/python2.7/dist-packages/gnuradio/dtv/__init__.py", line 34, in <module>
from dtv_swig import *
File "/opt/gnuradioClangJit/lib/python2.7/dist-packages/gnuradio/dtv/dtv_swig.py", line 17, in <module>
_dtv_swig = swig_import_helper()
File "/opt/gnuradioClangJit/lib/python2.7/dist-packages/gnuradio/dtv/dtv_swig.py", line 14, in swig_import_helper
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
ImportError: /opt/gnuradioClangJit/lib/libgnuradio-dtv-184.108.40.206.so.0.0.0: undefined symbol: _ZN2gr3dtv29dvbt_viterbi_decoder_jit_impl28dvbt_viterbi_get_output_sse2IXdtdefpT12d_ntracebackEEEhPDv2_xS4_Ph
I’ve already search in the mailing list for solution, but all the solution that I’ve found are for OOT module.
When running c++filt, I get the following result :
unsigned char gr::dtv::dvbt_viterbi_decoder_jit_impl::dvbt_viterbi_get_output_sse2<(*this).d_ntraceback>(long long __vector(2)*, long long __vector(2)*, unsigned char*)
Which is the result I wanted to see.
I use the following cmake command when building from source :
cmake -DCMAKE_C_COMPILER=/opt/release/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/release/llvm/bin/clang++ -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so -DCMAKE_INSTALL_PREFIX=/opt/gnuradioClangJit -DJIT_ENABLE=ON -DENABLE_GR_UHD=OFF ../
CMAKE_C_COMPILER and CMAKE_CXX_COMPILER points to the llvm version with clangJIT (see link above). JIT_ENABLE enable the flags for the JIT compiler.
Every change that I’ve made are on the following git (and commit ): https://github.com/Pacco1217/gnuradio/commit/14d656e5aecc998bb1cda9259de8a639dabf6d04
About the computer :
Kernel : 4.18.0-25-generic
OS : Ubuntu 18.10
Does anyone has already faced the same difficulties or having a possible solution to this problem ?
Thanks in advance for your answers,
|[Prev in Thread]||Current Thread||[Next in Thread]|