Hi, thank you very much. Your hints helped me towards the right direction.

I added:

"find_package(Gnuradio "3.10" REQUIRED fft blocks analog filter digital) " to 
the CMakeLists.txt in gr-mymodule

and i added

"target_link_libraries(gnuradio-mymodule gnuradio::gnuradio-runtime 
gnuradio::gnuradio-fft gnuradio::gnuradio-blocks gnuradio::gnuradio-analog 
gnuradio::gnuradio-filter gnuradio::gnuradio-digital)"


If I now do "import mymodule" in a python terminal, it works now, but... I am 
not able to open gnuradio anymore:


<<< Welcome to GNU Radio Companion 3.10.5.0 >>>

Block paths:
/home/niklas/.grc_gnuradio
/usr/share/gnuradio/grc/blocks
/usr/local/share/gnuradio/grc/blocks

Loading: "/home/niklas/Workspace/Niklas_flowgraphs/Transceiver_Station_1.grc"
Segmentation fault (core dumped)

Would be great, if anyone has an idea

Best,



________________________________
Von: Philipp Niedermayer <p.niederma...@gsi.de>
Gesendet: Montag, 20. März 2023 13:26:58
An: Beckmann, Niklas
Cc: discuss-gnuradio@gnu.org; Brandon Smith
Betreff: Re: Import Error "undefined symbol"

It might be as simple as adding "gnuradio::gnuradio-digital" to the 
"target_link_libraries" in your mymodule/lib/CMakeList.txt.
Maybe you also have to adjust the "find_package" in your mymodule/CMakeList.txt 
to something like "find_package(Gnuradio "3.10" REQUIRED COMPONENTS digital)".
________________________________
From: Brandon Smith [mailto:blsmit5...@gmail.com]
Sent: Monday, March 20, 2023 at 11:37 UTC+1
Subject: Import Error "undefined symbol"

You may have not linked a library in your cmake. Looks like you wanted digital 
packet header but have not provided a library for it. Perform ldd on 
/usr/local/lib/x86_64-linux-gnu/libgnuradio-mymodule.so.1.0.0 and see if the 
missing library is shown.

On Mon, Mar 20, 2023 at 4:59 AM Beckmann, Niklas 
<niklas.beckma...@rwth-aachen.de<mailto:niklas.beckma...@rwth-aachen.de>> wrote:

Hi everybody,


in a Flowchart, I am using an Import Block.

Gnuradio shows me the following:


Param - Import(imports):
Import "import mymodule" failed.

The module "mymodule" is installed properly and without any error. The blocks 
of this module are working (except of the one that i need the import for) and 
showed on the sidebar where all the blocks are found.

To get more information about the error, I opened a pyhton termial with the 
following result:

niklas@niklas:~$ python
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mymodule
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/gnuradio/mymodule/__init__.py", 
line 18, in <module>
    from .mymodule_python import *
ImportError: /usr/local/lib/x86_64-linux-gnu/libgnuradio-mymodule.so.1.0.0: 
undefined symbol: _ZTIN2gr7digital21packet_header_defaultE

I wasnt able to solve this problem now for a few days already, and therefore, I 
was wondering, if anyone has an idea, how to solve that, since also google did 
not really help. If I need to provide any further information, I will of course 
do so (I just did not know, what else could be important for this).

Thank you very much for your help. 😊

Kind regards,


--
Sent from Gmail Mobile

Reply via email to