I've made an OOT module that uses a dynamic shared library.
The library files are located at "/home/username/intel/oneapi/ipp/2021.6.0/lib/intel64"
.
I've added to the module_folder/lib/CMakeFile.txt the line:
target_link_libraries(module_name -L/home/username/intel/oneapi/ipp/2021.6.0/lib/intel64 ipp_iw ippch ippcore ippcv ippdc ippi ipps ippvm)
to link all the libraries I need.
I've then used make && sudo make install
to install the OOT module.
I've also added the line:
export LD_LIBRARY_PATH=~/intel/oneapi/ipp/2021.6.0/lib/intel64:$LD_LIBRARY_PATH
to ~/.bashrc
.
When I try to run a flow graph in gnuradio companion that uses the block from the OOT module i get the error: "ImportError: libippcore.so.10: cannot open shared object file: No such file or directory
"
However if I try to run what gnuradio companion runs through the terminal:
/usr/bin/python3 -u /home/username/Documents/oot_test.py
I'm able to find the shared object file and it runs without any problems.
My question is how can i make gnuradio companion look for the shared object files in the given folder? (From my understanding the use of export LD_LIBRARY_PATH in .bashrc only executes when opening a terminal).
Classic problem of setting paths, especially LD_LIBRARY_PATH
. In the shell you're manually starting python from, it's set correctly, the way you started GRC it's not.
Solution: Start GRC from the same shell, or make sure LD_LIBRARY_PATH
is set for your whole session correctly, not just in a shell.