FFTW3 error in GNURADIO

Hi all,

I am using ubuntu 13.04 and GNURADIO 3.7.

In project https://github.com/BogdanDIA/gr-dvbt ,
in reference_signals_impl.cc in /lib, I add inside one of the functions:

fftw_complex in2, out2;
out2 = (fftw_complex
) fftw_malloc(NFFT
2sizeof(fftw_complex));
in2 = (fftw_complex
) fftw_malloc(NFFT2sizeof(fftw_complex)); I get
this error:
~/gr-dvbt/apps$ sudo ./top_block_rx.py
Traceback (most recent call last):
File “./top_block_rx.py”, line 23, in
import dvbt
File “/usr/local/lib/python2.7/dist-packages/dvbt/init.py”, line 45,
in
from dvbt_swig import *
File “/usr/local/lib/python2.7/dist-packages/dvbt/dvbt_swig.py”, line
26, in
_dvbt_swig = swig_import_helper()
File “/usr/local/lib/python2.7/dist-packages/dvbt/dvbt_swig.py”, line
22, in swig_import_helper
_mod = imp.load_module(’_dvbt_swig’, fp, pathname, description)
ImportError: /usr/local/lib/libgnuradio-dvbt.so: undefined symbol:
fftw_malloc

I read and did the articles:
http://lists.gnu.org/archive/html/discuss-gnuradio/2014-02/msg00479.html
and http://gnuradio.4.n7.nabble.com/FFTW3-runtime-error-td46690.html
.
However, in lib I cannot add ${FFTW3(F)_LIBRARIES} to your
lib/CMakeLists.txt. It gives me an error. Therefore I replaced that
with ${FFTW3F_LIBRARIES}.

Where am I making mistake?

NE

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The (F) was meant to say:
Use FFTW3_LIBRARIES if you want to use the double precision version,
use FFTW3F_LIBRARIES if you want the single (float, ‘F’) precision
version of the library.

Since you’re using
fftw_malloc (without f suffix), you’re trying to use the double prec.
version of the library, but you link against the single prec. version.

Greetings,
Marcus

PS: The GNU Radio complex data type is identical to the float complex
datatype used by FFTW3F. If you want to use that, use the float
version of the library and replace fftw_malloc by fftwf_malloc and so
on.

On 21.03.2014 10:35, Nasi wrote:

fftw_malloc(NFFT2sizeof(fftw_complex)); I get this error:

  • NE

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTLBIEAAoJEBQ6EdjyzlHtSK8H/Az7oTYgKHEkG61/iKNzEb4r
hPQyX4Mwr0BfjVXoI976aRQK6L/tJxm56ofahEj788crhlVqtqnZSvg/EhIQGzln
G8OQFHIbcwRIe/5mVtTmWcjWimJAcJXs3aOglbkavp+vw8ZW55rSypT9cLrw+X04
fLctOOAg5NHJtUQnOeTLboAkcn3lvwBr6su4R1RYhdGbtSMjNaDTD5g1pNhKq0JH
AhbjDlLluFdnAuesOR9RBto74ncQGQzGHtnWHmI6CJp2qjM9f4wsE9DLycGGCM4W
nYZRSz0Dxqybw6SJ2rQQRqq7VnisaQvs4MZALnnJODZ/P+z8L6Yed3WsFUBjZWQ=
=IjoK
-----END PGP SIGNATURE-----

Thanks for quick reply!

It does not work even if I use float precision as
fftwf_complex in2, out2;
out2 = (fftwf_complex
) fftwf_malloc(NFFT
2sizeof(fftwf_complex));
in2 = (fftwf_complex
) fftwf_malloc(NFFT2sizeof(fftwf_complex));

I attach cmake files. It would be nice of you if you take a look.

NE

Fri, 21 Mar 2014 11:18:45 +0100 от Marcus Müller [email protected]:

It does not work anyway. I attach again files.

Fri, 21 Mar 2014 11:45:01 +0100 от Marcus Müller [email protected]:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Your main CMakeLists.txt is still looking for the double FFTW3.
replace
find_package(FFTW3)
by
find_package(FFTW3f)
and use the FindFFTW3f.cmake from the gnuradio source tree.

You’ll have to replace all occurences of FFTW3_ by FFTW3F_ in your
CMake files.

On 21.03.2014 11:42, Nasi wrote:

Hi all,
get this error: ~/gr-dvbt/apps$ sudo ./top_block_rx.py
symbol: fftw_malloc

I read and did the articles:
http://lists.gnu.org/archive/html/discuss-gnuradio/2014-02/msg00479.html

and

http://gnuradio.4.n7.nabble.com/FFTW3-runtime-error-td46690.html

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTLBgtAAoJEBQ6EdjyzlHtBRMIAJCWlaJJFVM6FaD+GrY1YOHR
Q/pr1DLzCRWi6J+nRq5XL6abZYaO/PIA1eXyVYp1RKmmugFxPE79oJmh20rILhaX
xGmRuxMHUbKUU0q0CvoNe2lSUPfWkGgOmm97rClxIV869SUZYQULpWZFBtDtCRf3
Niqj1eCACPDJdd5mJoCiYtJGsXtbqcIfEcrk6GZd9g1HdVB4VoivFK/N9KiQebom
/knj6ecXhJSBwAQfnlS9vefonC+oSX9e1iYITyQjLIt/szqmQHlyir1vWXgigwAn
c581J1IhCZofud4GExZCWRWcEkFis9xPgdTr/KCIGvqkmk91MZJ0nWtXfNsXDNU=
=Ggzm
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You need to add the FFTW3F_LIBRARIES to the target_link_libraries.

On 21.03.2014 12:02, Nasi wrote:

target_link_libraries(gnuradio-dvbt ${Boost_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES})
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTLB2IAAoJEBQ6EdjyzlHtVLwIAIvlLimJaIf83gGmzC1l07sl
vvjBSW31cX4sCJXALpGp3ICV5iS2YU8Pk5aEfVgtcXWysmrJeTv87rArNFwSFdv4
J3RORZlnz04xmdThROkb6TR34sHCN9eJGIB5Emvy0M/AXotarKjSZ1e4peJc/1xx
xZ+enWl0P1DNsXq9Svw3MQvLE8eSas5O539i8E2Kxn1JvvuOqb4B9W6LdeizaWk1
ilxTiysTI7wQRB/e/ubCUfInxBXbRXjYnJHfxmPmjT2Dsr02SHt2WvLjvYe17dAZ
5nv4wyaj6mt4YtckRcT/vyFmO6bZLfppBwZi2ZtTiDT57L9ulcWLiFqxcp9zI84=
=bNzH
-----END PGP SIGNATURE-----

I added target_link_libraries(gnuradio-dvbt ${Boost_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES} ${FFTW3F_LIBRARIES}).

But that does not help.

Fri, 21 Mar 2014 12:07:52 +0100 от Marcus Müller [email protected]:

cool! it worked. I deleted build folder and recompiled everything.
Thanks a lot!!!

Fri, 21 Mar 2014 12:17:26 +0100 от Marcus Müller [email protected]:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Then I’m out of clues.
You have basically the same setup up as gr-fft now. Your module
should be linked against FFTW3f. Are you sure you replace
fftw_malloc and fftw_whatever by fftwf_whatever in your C++ code?

On 21.03.2014 12:13, Nasi wrote:

On 21.03.2014 12:02, Nasi wrote:

target_link_libraries(gnuradio-dvbt ${Boost_LIBRARIES}
${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES})

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTLB/GAAoJEBQ6EdjyzlHttJ4H/0jblM6o5R8bPlIumcZc7MAI
70gWT4c7Ujee8ma4qNPKBGrZi6quwz7jguQhxjV92CPP75X8tffWXit0giUIAG8R
7kjVD43WDFzse8q59iAB6IMtA1hedz0gmecemScIUyNVGVXSWcSuGwMEkk6WDug+
WC1wYpEo0D4VYTqi3FielU9iuiLNu6Aaj4NjCDahKgUk6iyfZ8WknqQFcomnpNET
za7BluBcDDebNGtsZxgm9TuJ6dCgbKVqHRa4qtRKoPkH0EJ4SaJjK/KYJOkDm3E3
HwLnquXI6NKT6q92bWqgYAHNlAkfxJgHaXD9sXEt4AZ/FoAIpXCRFAKnllIUnKg=
=x0EW
-----END PGP SIGNATURE-----

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs