discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undefined symbol _ZN2gr12msg_accepter4postEN5boost13intrusive_ptrIN3


From: Vasil Velichkov
Subject: Re: Undefined symbol _ZN2gr12msg_accepter4postEN5boost13intrusive_ptrIN3pmt8pmt_baseEEES5_
Date: Wed, 10 Nov 2021 09:47:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

Hi John,

On 09/11/2021 22.58, John Coppens wrote:
> As you can see from the 'find', there is only one libgnuradio-runtime
> installed.

>>   objdump -T  /usr/lib64/libgnuradio-runtime.so | grep 
>> _ZN2gr12msg_accepter4postEN5boost13intrusive_ptrIN3pmt8pmt_baseEEES5_
> 
>   (Does not return anything)
> 
>> objdump -T  /usr/lib64/libgnuradio-runtime.so | grep msg_accepter |
>   grep post 
> 
> 000000000009c9e0 g    DF .text        0000000000000147  Base        
> _ZN2gr12msg_accepter4postEN5boost10shared_ptrIN3pmt8pmt_baseEEES5_

Comparing the two symbols (the one your OOT is looking for with the one 
available in libgnuradio-runtime.so) you can see that the only difference is 
the boost pointer type (boost13intrusive_ptr vs boost10shared_ptr)

_ZN2gr12msg_accepter4postEN5boost13intrusive_ptrIN3pmt8pmt_baseEEES5_
_ZN2gr12msg_accepter4postEN5boost10shared_ptrIN3pmt8pmt_baseEEES5_

$ c++filt _ZN2gr12msg_accepter4postEN5boost13intrusive_ptrIN3pmt8pmt_baseEEES5_ 
_ZN2gr12msg_accepter4postEN5boost10shared_ptrIN3pmt8pmt_baseEEES5_
gr::msg_accepter::post(boost::intrusive_ptr<pmt::pmt_base>, 
boost::intrusive_ptr<pmt::pmt_base>)
gr::msg_accepter::post(boost::shared_ptr<pmt::pmt_base>, 
boost::shared_ptr<pmt::pmt_base>)

In msg_accepter.h the post function is declared as

    void post(pmt::pmt_t which_port, pmt::pmt_t msg);

And in pmt.h the pmt::pmt_t is declared as 

    typedef boost::shared_ptr<pmt_base> pmt_t;

In aa9e2ec7abd [1] the type has been changed from boost::intrusive_ptr to 
boost::shared_ptr and this commit is available since gnuradio v3.8.0.0

$ git tag --sort version:refname --contains aa9e2ec7abd | head -1
v3.8.0.0
 
So most probably your OOT has been built with an older pmt.h from gnuradio 
3.7.*. To find where pmt.h has been included from go in the gr-osmosdr's build 
directory and grep pmt.h recursively

    grep -R pmt.h . 

You can also try finding pmt.h from the root directory as it is can be 
installed in /opt/ or somewhere else.

    find / -name pmt.h

You need to delete all leftovers from previous installations and have only one 
version of gnuradio headers and libraries. Then delete libgnuradio-osmosdr 

    rm -f "/usr/lib64/libgnuradio-osmosdr.so*"

Go in the gr-osmosdr source directory, remove the build directory and start 
from scratch. To get an error for undefined symbols configure it with

    cmake -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--no-undefined" ..

[1] 
https://github.com/gnuradio/gnuradio/commit/aa9e2ec7abd4f70f73ca9b83dc00c59cd7ba45d1

Regards,
Vasil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]