Hi Till, Please always try to keep the mailing list in the loop and do not reply privately.
Here is how to demangle these undefined symbols $ c++filt _ZN3uhd4usrp10multi_usrp4makeERKNS_13device_addr_tE uhd::usrp::multi_usrp::make(uhd::device_addr_t const&) $ c++filt _ZN3uhd13device_addr_tC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE uhd::device_addr_t::device_addr_t(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) You need to link the uhd library to your OOT module. In your lib/CMakeLists.txt you need something like target_link_libraries(gnuradio-control UHD::UHD #other libraries ) Best Regards, Vasil On 17/02/2020 16.00, "Till Hülder" wrote: > Hi Vasil, > i do get any undefined symbols: > iheamira@iheamira-MS-7885:~/Dokumente/BA_Huelder/GPIO_modul/gr-control/build$ > ldd -r lib/lib*.so > lib/libgnuradio-control-1.0.0git.so: > undefined symbol: _ZN3uhd4usrp10multi_usrp4makeERKNS_13device_addr_tE > (lib/libgnuradio-control-1.0.0git.so) > undefined symbol: > _ZN3uhd13device_addr_tC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE > (lib/libgnuradio-control-1.0.0git.so) > undefined symbol: _ZN3uhd4usrp10multi_usrp4makeERKNS_13device_addr_tE > (lib/libgnuradio-control.so) > undefined symbol: > _ZN3uhd13device_addr_tC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE > (lib/libgnuradio-control.so) > iheamira@iheamira-MS-7885:~/Dokumente/BA_Huelder/GPIO_modul/gr-control/build$ > ldd -r swig/*_swig.so > undefined symbol: _ZN3uhd4usrp10multi_usrp4makeERKNS_13device_addr_tE > (/usr/local/lib/libgnuradio-control-1.0.0git.so.0.0.0) > undefined > symbol:_ZN3uhd13device_addr_tC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE > > (/usr/local/lib/libgnuradio-control-1.0.0git.so.0.0.0) > How can i fix this? > Best regards, > Till > *Gesendet:* Mittwoch, 12. Februar 2020 um 18:12 Uhr > *Von:* "Vasil Velichkov" <vvvelich...@gmail.com> > *An:* "Till Hülder" <till.huel...@web.de> > *Cc:* discuss-gnuradio@gnu.org > *Betreff:* Re: AttributeError: OOT Modul > Hi Till, > > On 12/02/2020 16.46, "Till Hülder" wrote: > > Hello, > > i build a OOT Module and after installing i get this error when i run the > program . > > File "/home/iheamira/Dokumente/BA_Huelder/gnu-radio/top_block.py", line > 219, > > in <module> > > main() > > File "/home/iheamira/Dokumente/BA_Huelder/gnu-radio/top_block.py", line > 207, > > in main > > tb = top_block_cls() > > File "/home/iheamira/Dokumente/BA_Huelder/gnu-radio/top_block.py", line > 142, > > in __init__ > > self.control_control_b_0 = control.control_b(5e-6, 1000, 10, 5e-6, 5e-6, > > 5e-6, 200e-6, 100e-6, 0.2, samp_rate) > > AttributeError: 'module' object has no attribute 'control_b' > > One possible reason for such error is that there are undefined symbols in > your > shared library. > > Go to the build directory and execute > > ldd -r lib/lib*.so > ldd -r swig/*_swig.so > > and if you see "undefined symbol:" messages that means you are not linking > all > dependencies. > > Also in `python/__init__.py` you probably have a try except block like this > one > > # import swig generated symbols into the OOT namespace > try: > # this might fail if the module is python-only > from .OOT_swig import * > except ImportError: > pass > > Consider removing the try: and except and keep only the import line > > from .OOT_swig import * > > Read also: > https://lists.gnu.org/archive/html/discuss-gnuradio/2020-02/msg00047.html > https://lists.gnu.org/archive/html/discuss-gnuradio/2020-02/msg00054.html > > Regards, > Vasil >