VOLK Make error - undefined references to math functions

I am following the Ubuntu Install instructions from here:
http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall?version=105

Here is the gnuradio version I am working with:

git describe

3.5.1git-1-gad88ab0

System Info: 2.6.35-30-generic #61-Ubuntu SMP Tue Oct 11 15:29:15 UTC
2011 i686 GNU/Linux

There appears to be a problem with VOLK and some of the math functions.
I have tried adding “-lm” to various build flags in the VOLK Makefile,
but that doesn’t help. (I figured it was worth a shot.) I also tried
“./configure CFLAGS=-lm” but that didn’t work either.

My trouble shooting hasn’t helped and searches don’t turn up anything.

A portion of the error output.

libtool: link: gcc -shared .libs/libvolk_la-volk.o
.libs/libvolk_la-volk_cpu.o .libs/libvolk_la-volk_rank_archs.o
.libs/libvolk_la-volk_prefs.o .libs/libvolk_la-volk_machines.o
-Wl,–whole-archive ./.libs/libvolk_avx_only.a
./.libs/libvolk_ssse3_32.a ./.libs/libvolk_sse3_64.a
./.libs/libvolk_sse2_32.a ./.libs/libvolk_generic.a
./.libs/libvolk_sse4_2_64.a ./.libs/libvolk_sse4_a_64.a
./.libs/libvolk_avx_64.a ./.libs/libvolk_sse4_1_32.a
./.libs/libvolk_sse2_64.a ./.libs/libvolk_sse4_a_32.a
./.libs/libvolk_sse4_2_32.a ./.libs/libvolk_avx_32.a
./.libs/libvolk_sse2_only.a ./.libs/libvolk_sse4_1_64.a
./.libs/libvolk_sse3_32.a ./.libs/libvolk_ssse3_64.a
-Wl,–no-whole-archive -Wl,-soname -Wl,libvolk.so.0 -o
.libs/libvolk.so.0.0.0
/usr/bin/ld: i386:x86-64 architecture of input file
./.libs/libvolk_sse3_64.a(libvolk_sse3_64_la-volk_machine_sse3_64.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file ./.libs/libvolk_sse4_2_64.a(libvolk_sse4_2_64_la-volk_machine_sse4_2_64.o)’
is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file
./.libs/libvolk_sse4_a_64.a(libvolk_sse4_a_64_la-volk_machine_sse4_a_64.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file ./.libs/libvolk_avx_64.a(libvolk_avx_64_la-volk_machine_avx_64.o)’ is
incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file
./.libs/libvolk_sse2_64.a(libvolk_sse2_64_la-volk_machine_sse2_64.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file ./.libs/libvolk_sse4_1_64.a(libvolk_sse4_1_64_la-volk_machine_sse4_1_64.o)’
is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file
./.libs/libvolk_ssse3_64.a(libvolk_ssse3_64_la-volk_machine_ssse3_64.o)' is incompatible with i386 output ./.libs/libvolk_sse3_64.a(libvolk_sse3_64_la-volk_machine_sse3_64.o): In function volk_32f_sqrt_32f_a_generic’:
/home/cutaway/Hardware/gnuradio/volk/lib/…/include/volk/volk_32f_sqrt_32f_a.h:56:
undefined reference to sqrtf' ./.libs/libvolk_sse3_64.a(libvolk_sse3_64_la-volk_machine_sse3_64.o): In function volk_32f_sqrt_32f_a_sse’:
/home/cutaway/Hardware/gnuradio/volk/lib/…/include/volk/volk_32f_sqrt_32f_a.h:38:
undefined reference to sqrtf' ./.libs/libvolk_sse3_64.a(libvolk_sse3_64_la-volk_machine_sse3_64.o): In function volk_32fc_s32f_power_spectrum_32f_a_generic’:
/home/cutaway/Hardware/gnuradio/volk/lib/…/include/volk/volk_32fc_s32f_power_spectrum_32f_a.h:115:
undefined reference to `log10f’

[SNIP]

In function volk_32fc_s32f_atan2_32f_a_sse': /home/cutaway/Hardware/gnuradio/volk/lib/../include/volk/volk_32fc_s32f_atan2_32f_a.h:129: undefined reference to atan2f’
./.libs/libvolk_ssse3_64.a(libvolk_ssse3_64_la-volk_machine_ssse3_64.o):
In function __volk_s32fc_s32f_power_s32fc_a': /home/cutaway/Hardware/gnuradio/volk/lib/../include/volk/volk_32fc_s32f_power_32fc_a.h:10: undefined reference to atan2f’
/home/cutaway/Hardware/gnuradio/volk/lib/…/include/volk/volk_32fc_s32f_power_32fc_a.h:10:
undefined reference to sincosf' /home/cutaway/Hardware/gnuradio/volk/lib/../include/volk/volk_32fc_s32f_power_32fc_a.h:11: undefined reference to powf’
/home/cutaway/Hardware/gnuradio/volk/lib/…/include/volk/volk_32fc_s32f_power_32fc_a.h:10:
undefined reference to atan2f' /home/cutaway/Hardware/gnuradio/volk/lib/../include/volk/volk_32fc_s32f_power_32fc_a.h:10: undefined reference to sincosf’
/home/cutaway/Hardware/gnuradio/volk/lib/…/include/volk/volk_32fc_s32f_power_32fc_a.h:11:
undefined reference to `powf’
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
[SNIP]

From the config.log file:


configure:22524: result: Component volk passed configuration checks;
building.

Thank you,
cutaway

I backed out of my installation and used the following to get it
working.

build-gnuradio - http://www.sbrac.org/files/build-gnuradio

I am up and running using the -josh version.

Thank you,
cutaway

Another option for those interested in addressing this error: I was able
to resolve this issue with the 3.5.1 release using “./configure
LIBS=-lm”.