Using fftw for neon with gnuradio

Hi everyone,

I built and installed fftw with neon support for my E100 following the
instructions here: ARM Floating Point Tools. Now I’m trying to
recompile gnuradio to take advantage of that. Unfortunately, I get an
error when I run make.

I’m running configure with the added --enable-shared option, and then
I run make. The error i get is:

libtool: link: g++ -fPIC -DPIC -shared -nostdlib
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/…/…/…/crti.o
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/crtbeginS.o
.libs/libgnuradio-core.la.lnkscript -Wl,–whole-archive
filter/.libs/libfilter.a g72x/.libs/libccitt.a
viterbi/.libs/libviterbi.a general/.libs/libgeneral.a
gengen/.libs/libgengen.a io/.libs/libio.a missing/.libs/libmissing.a
reed-solomon/.libs/librs.a runtime/.libs/libruntime.a
hier/.libs/libhier.a -Wl,–no-whole-archive -Wl,-rpath
-Wl,/home/root/gnuradio/gruel/src/lib/.libs -lrt
/home/root/gnuradio/gruel/src/lib/.libs/libgruel.so -L/usr/lib
-L/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/…/…/…
-lboost_system -lboost_filesystem -lboost_thread -L/usr/local/lib
/usr/local/lib/libfftw3f.a /usr/lib/libgsl.so /usr/lib/libgslcblas.so
/usr/lib/libltdl.so -ldl
-L/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3 /usr/lib/libstdc++.so
-lm -lc -lgcc_s
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/crtendS.o
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/…/…/…/crtn.o
-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -O3
-pthread -pthread -Wl,-soname -Wl,libgnuradio-core-3.4.0git.so.0 -o
.libs/libgnuradio-core-3.4.0git.so.0.0.0
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.3/…/…/…/…/arm-angstrom-linux-gnueabi/bin/ld:
/usr/local/lib/libfftw3f.a(import-wisdom-from-file.o): relocation
R_ARM_MOVW_ABS_NC against a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libfftw3f.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[8]: *** [libgnuradio-core.la] Error 1 make[8]: Leaving directory /home/root/gnuradio/gnuradio-core/src/lib’
make[7]: *** [all-recursive] Error 1
make[7]: Leaving directory /home/root/gnuradio/gnuradio-core/src/lib' make[6]: *** [all] Error 2 make[6]: Leaving directory /home/root/gnuradio/gnuradio-core/src/lib’
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory /home/root/gnuradio/gnuradio-core/src' make[4]: *** [all] Error 2 make[4]: Leaving directory /home/root/gnuradio/gnuradio-core/src’
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory /home/root/gnuradio/gnuradio-core' make[2]: *** [all] Error 2 make[2]: Leaving directory /home/root/gnuradio/gnuradio-core’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/root/gnuradio’
make: *** [all] Error 2

Has anyone had any success with this?

Thanks,
Morgan

On 06/22/2011 08:06 PM, Morgan R. wrote:

Hi everyone,

I built and installed fftw with neon support for my E100 following the
instructions here: ARM Floating Point Tools. Now I’m trying to
recompile gnuradio to take advantage of that. Unfortunately, I get an
error when I run make.

Did you rerun configure adding -fPIC to CFLAGS? I ddi get the library to
build as a shared library.

Philip

On Wed, Jun 22, 2011 at 2:13 PM, Philip B. [email protected]
wrote:

Did you rerun configure adding -fPIC to CFLAGS? I ddi get the library to
build as a shared library.

That worked for me.

Thomas

I don’t think you have to change the parameters you’re giving to
./configure for gnuradio. You actually want to change the parameters
used by ./configure for fftw.

This worked for me:
./configure --enable-single --enable-neon --enable-shared
CFLAGS=’-fPIC -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -O2’

And then I built gnuradio as normal.

Morgan

Could somebody post the whole configure call once the vesperix fftw lib
was
installed?

I’m giving this a try here myself but want to make sure I’m on the right
track.

./configure --disable-volk --disable-usrp2 --disable-usrp1
–disable-gr-video-sdl --enable-shared CFLAGS="-march=armv7-a
-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -O3 -fPIC"
CXXFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-O3 -fPIC" -with-qwt-incdir=/usr/include

On 06/29/2011 08:51 PM, Morgan R. wrote:

I don’t think you have to change the parameters you’re giving to
./configure for gnuradio. You actually want to change the parameters
used by ./configure for fftw.

This worked for me:
./configure --enable-single --enable-neon --enable-shared
CFLAGS=’-fPIC -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -O2’

And then I built gnuradio as normal.

Make sure you remove the installed fftw libraries and headers.

Something like:

opkg list-installed | grep fftw

opkg remove fftwf fftwf-dev (where the package names match the result
from the first command)

You will need to add the appropriate fore removal option to opkg,

Philip