discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] run-time error when using gsl libraries in a cust


From: Josh Blum
Subject: Re: [Discuss-gnuradio] run-time error when using gsl libraries in a custom block
Date: Sat, 27 Oct 2012 12:04:24 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1


On 10/26/2012 12:39 PM, Zing Yu wrote:
> All,
> 
> I have a custom block which uses the GSL libraries to compute the FFT of a 
> sequence. When I run the flow-graph containing my custom block, I get the 
> following error.
> 
> Traceback (most recent call last):
>   File "/home/wlab/my grc files/top_block.py", line 17, in <module>
>     import howto
>   File "/usr/local/lib/python2.7/dist-packages/howto/__init__.py", line 45, 
> in <module>
>     from howto_swig import *
>   File "/usr/local/lib/python2.7/dist-packages/howto/howto_swig.py", line 26, 
> in <module>
>     _howto_swig = swig_import_helper()
>   File "/usr/local/lib/python2.7/dist-packages/howto/howto_swig.py", line 22, 
> in swig_import_helper
>     _mod = imp.load_module('_howto_swig', fp, pathname, description)
> ImportError: /usr/local/lib/libgnuradio-howto.so: undefined symbol: 
> gsl_fft_complex_radix2_forward
> 
> I kind of know that the error is related to use of GSL within gnuradio since 
> when I comment the below lines:
> #include <gsl/gsl_fft_complex.h>
> gsl_fft_complex_radix2_forward (data_fft_1, 1, d_N);
> 
> 
> I get no error and flow-graph runs normal.
> 
> So, I think either the GSL header files are not being located by gcc or 
> somehow the swig interface is broken. Does anyone has any suggestions?
> 

If you expose gsl routines in your header, and you give this header to
swig, swig tries to "export" everything it sees in the header.

You can probably make the error go away by adding gsl libraries to
GR_SWIG_LIBRARIES (set this before the call to GR_SWIG_MAKE).

My advice to to avoid exposing any internal dependencies in public
header files. Keep the headers as simple as possible.

-josh

> Thanks,
> Yu.
> 
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 



reply via email to

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