LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Mobile (https://www.linuxquestions.org/questions/linux-mobile-81/)
-   -   GnuRadio compilation issues on Arm devices. (https://www.linuxquestions.org/questions/linux-mobile-81/gnuradio-compilation-issues-on-arm-devices-4175474319/)

svarmido 08-22-2013 03:56 PM

GnuRadio compilation issues on Arm devices.
 
After many hours trying to install gunradio-3.7.0 that for reasons I do not understand would not install gruel, needed by gr-ais (see http://www.cruisersforum.com/forums/...les-84234.html), I tried gnuradio-3.6.3. Finally compiled and installed (including gruel) successfully this morning. I encountered an error provided below and a solution that worked for me. Hopefully it will work for you too.

Will I be able to use a DVB - RTL dongle to receive ais transmissions from surrounding ships with my Xoom. Probably not, because the program will most likely not be able to use the video chip. But, I'm giving it a try anyway. Never know, and maybe I'll be able to find a work around for the video issue (if it exists) and make it work yet.

When I encountered a cmake error attempting to compile gnuradio in a linux chroot environment on my Motorola Xoom, my response was to search the net for a solution.

So doing, I discovered there were others with Raspberry pi and other arm devices having the same problem. Yet, nobody seemed to know the solution. Tenacity paid off as I eventually discovered what I believe to be the problem.

I originally suspected my CXX_FLAGS setting may be incorrect, but they were not the cause.

The correct settings for my Xoom are:

CMAKE_CXX_FLAGS:STRING=-mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -march=armv7-a

Yours will vary depending upon your device hardware configuration. Incorrect CXX_FLAGS settings will slam dunk your compilation!


Initially, the compilation failed with the following output:

3/build/gruel/src/include -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -o CMakeFiles/gnuradio-core.dir/filter/dotprod_fff_armv7_a.c.o -c /home/android/Downloads4/gnuradio-3.6.3/gnuradio-core/src/lib/filter/dotprod_fff_armv7_a.c
/tmp/ccohvLcU.s: Assembler messages:
/tmp/ccohvLcU.s:31: Error: selected FPU does not support instruction -- `vmov.f32 q8,#0.0'
/tmp/ccohvLcU.s:32: Error: selected FPU does not support instruction -- `vmov.f32 q9,#0.0'
/tmp/ccohvLcU.s:37: Error: selected FPU does not support instruction -- `vmla.f32 q8,q0,q2'
/tmp/ccohvLcU.s:38: Error: selected FPU does not support instruction -- `vmla.f32 q9,q1,q3'
/tmp/ccohvLcU.s:40: Error: selected FPU does not support instruction -- `vadd.f32 q8,q8,q9'
/tmp/ccohvLcU.s:41: Error: selected processor does not support Thumb mode `vpadd.f32 d0,d16,d17'
make[2]: *** [gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/filter/dotprod_fff_armv7_a.c.o] Error 1
make[2]: Leaving directory `/home/android/Downloads4/gnuradio-3.6.3/build
make[1]: *** [gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/all] Error 2
make[1]: Leaving directory `/home/android/Downloads4/gnuradio-3.6.3/build'
make: *** [all] Error 2

This error occurs because for some reason gnuradio cmake identifies my Xoom, with a Nvidia Tegra 2 cpu as possessing Neon capability. It does not.

For me, the solution is to run cmake, then after the process is complete open ../gnuradio-3.6.3/build/CmakeCache.txt with a text editor.

Scan way down the file until you find:

//Test have_mfpu_neon
have_mfpu_neon:INTERNAL=1

Delete the "1" and save the file.

Run make. It will appear that cmake is being run again and might change your edit, but it doesn't.

Hopefully this will help some of you to resolve this issue.


All times are GMT -5. The time now is 11:19 PM.