# Compiling GNURadio on BananaPI

**URL:** <https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762>\
**Category:** GNU Radio\
**Created:** [January 9, 2015, 4:46pm UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762 "2015-01-09T16:46:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [January 9, 2015, 4:46pm UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762/1 "2015-01-09T16:46:29Z")

</div>

* * *

Discuss-gnuradio mailing list  
removed\_email\_address@domain.invalid  
[https://lists.gnu.org/mailman/listinfo/discuss-gnuradio](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

---

<div class="post-metadata">

**Author:** ![andreas\_l](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Post date:** [January 9, 2015, 8:38pm UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762/2 "2015-01-09T20:38:39Z")

</div>

I must correct a detail. The datasheet tells me that bananapi has a  
Cortex-A7.

cat /proc/cpuinfo:

Processor : ARMv7 Processor rev 4 (v7l)  
processor : 0  
BogoMIPS : 1431.55

processor : 1  
BogoMIPS : 1436.46

Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4  
idiva idivt  
CPU implementer : 0x41  
CPU architecture: 7  
CPU variant : 0x0  
CPU part : 0xc07  
CPU revision : 4

Hardware : sun7i  
Revision : 0000  
Serial : 0481019f5254484880485783165166d2

---

<div class="post-metadata">

**Author:** ![andreas\_l](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Post date:** [January 9, 2015, 8:49pm UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762/3 "2015-01-09T20:49:11Z")

</div>

On Fri, Jan 9, 2015 at 1:37 PM, Andreas L.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> BogoMIPS : 1436.46  
> Revision : 0000  
> source. The message is gone.  
> [2%] Building ASM object

volk/lib/CMakeFiles/volk.dir/\_\_/kernels/volk/asm/neon/volk\_32fc\_32f\_dot\_prod\_32fc\_a\_neonasmvmla.s.o

> failed

[volk/lib/CMakeFiles/volk.dir/\_\_/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s.o]

> cheers,  
> Andreas

I don’t know that it’s a definite fix for this, but I was going to  
suggest making sure the tune settings fit your processor. If that’s  
not the case we can look around for a suitable change. Keep us  
updated.

Nathan

---

<div class="post-metadata">

**Author:** ![andreas\_l](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Post date:** [January 9, 2015, 10:54pm UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762/4 "2015-01-09T22:54:10Z")

</div>

> > processor : 1  
> > Hardware : sun7i  
> > cmake is below 2.8.10. So i compiled and installed the last cmake 3.1 from

volk/lib/CMakeFiles/volk.dir/\_\_/kernels/volk/asm/neon/volk\_32fc\_x2\_dot\_prod\_32fc\_neonasm\_opttests.s.o

> > [2%] Building ASM object

‘volk/lib/CMakeFiles/volk.dir/\_\_/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s.o’

> > The result is:  
> > make[2]: \*\*\*  
> > Any ideas ?
> > 
> > cheers,  
> > Andreas
> 
> I don’t know that it’s a definite fix for this, but I was going to  
> suggest making sure the tune settings fit your processor. If that’s  
> not the case we can look around for a suitable change. Keep us  
> updated.
> 
> Nathan

Hi Nathan,

cmake ../ -DCMAKE\_C\_FLAGS=“-march=armv7 -mthumb-interwork  
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a7”  
-DCMAKE\_ASM\_FLAGS="-march=armv7 -mthumb-interwork -mfloat-abi=hard  
-mfpu=neon

results in the message:

Scanning dependencies of target volk  
[2%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32fc\_32f\_dot\_prod\_32fc\_a\_neonasmpipeline.s.o  
[2%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32fc\_x2\_dot\_prod\_32fc\_neonasm.s.o  
[2%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32fc\_x2\_dot\_prod\_32fc\_neonasm\_opttests.s.o  
[2%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32fc\_32f\_dot\_prod\_32fc\_a\_neonasm.s.o  
[2%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32f\_s32f\_multiply\_32f\_neonasm.s.o  
[2%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32fc\_32f\_dot\_prod\_32fc\_unrollasm.s.o  
[2%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_16i\_max\_star\_horizontal\_16i.s.o  
[2%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32f\_x2\_add\_32f\_a\_neonasm.s.o  
[2%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32fc\_32f\_dot\_prod\_32fc\_a\_neonasmvmla.s.o  
[2%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32f\_x2\_add\_32f\_a\_neonpipeline.s.o  
[3%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s.o  
/home/bananapi/gnuradio\_src/gnuradio/volk/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s:  
Assembler messages:  
/home/bananapi/gnuradio\_src/gnuradio/volk/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s:46:  
Error: selected processor does not support ARM mode `sbfx r11,r1,#2,#1’  
volk/lib/CMakeFiles/volk.dir/build.make:1519: recipe for target  
'volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s.o’  
failed  
make[2]: \*\*\*  
[volk/lib/CMakeFiles/volk.dir/\_\_/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s.o]  
Error 1  
CMakeFiles/Makefile2:164: recipe for target  
‘volk/lib/CMakeFiles/volk.dir/all’ failed  
make[1]: \*\*\* [volk/lib/CMakeFiles/volk.dir/all] Error 2  
Makefile:147: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

Is it possible that ARM isnt supported in volk ?

Error: selected processor does not support ARM mode `sbfx r11,r1,#2,#1’

Andreas

---

<div class="post-metadata">

**Author:** ![andreas\_l](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Post date:** [January 9, 2015, 11:17pm UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762/5 "2015-01-09T23:17:50Z")

</div>

Instead of building on the board itself, wouldn’t be better to compile  
the  
source code on your working machine by exporting the toolchain compilers  
by  
means of a simple script ?

2015-01-09 22:52 GMT+01:00 Andreas L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![andreas\_l](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Post date:** [January 10, 2015, 9:36am UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762/6 "2015-01-10T09:36:34Z")

</div>

Am 09.01.2015 um 23:29 schrieb Tech:

> sudo swapon /sata/swapfile  
> free -m
> 
> Thanks

I already have a swap partition with 2 GB.

I tried out your suggestion. The result is the same:

Scanning dependencies of target volk  
[1%] Building ASM object  
volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s.o  
/home/bananapi/gnuradio\_src/gnuradio/volk/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s:  
Assembler messages:  
/home/bananapi/gnuradio\_src/gnuradio/volk/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s:46:  
Error: selected processor does not support ARM mode `sbfx r11,r1,#2,#1’  
volk/lib/CMakeFiles/volk.dir/build.make:1519: recipe for target  
'volk/lib/CMakeFiles/volk.dir/**/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s.o’  
failed  
make[2]: \*\*\*  
[volk/lib/CMakeFiles/volk.dir/\_\_/kernels/volk/asm/neon/volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts.s.o]  
Error 1  
CMakeFiles/Makefile2:164: recipe for target  
‘volk/lib/CMakeFiles/volk.dir/all’ failed  
make[1]: \*\*\* [volk/lib/CMakeFiles/volk.dir/all] Error 2  
Makefile:147: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

---

<div class="post-metadata">

**Author:** ![andreas\_l](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Post date:** [January 11, 2015, 10:54am UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762/7 "2015-01-11T10:54:03Z")

</div>

With the latest LUbuntu (instead of the latest raspian like in my last  
mails) version of Banana Pi the following error results when compiling  
gnuradio with the gnuradio build-script:

Linking CXX executable test\_all  
libvolk.so.0.0.0: undefined reference to  
`volk_32fc_x2_multiply_32fc_neonasm' libvolk.so.0.0.0: undefined reference to`volk\_16i\_max\_star\_horizontal\_16i\_neonasm’  
libvolk.so.0.0.0: undefined reference to  
`volk_32fc_32f_dot_prod_32fc_a_neonasm' libvolk.so.0.0.0: undefined reference to`volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts’  
libvolk.so.0.0.0: undefined reference to  
`volk_32fc_32f_dot_prod_32fc_a_neonpipeline' libvolk.so.0.0.0: undefined reference to`volk\_32f\_x2\_dot\_prod\_32f\_neonasm’  
collect2: error: ld returned 1 exit status  
make[2]: \*\*\* [volk/lib/test\_all] Error 1  
make[1]: \*\*\* [volk/lib/CMakeFiles/test\_all.dir/all] Error 2  
Linking CXX executable volk\_profile  
…/lib/libvolk.so.0.0.0: undefined reference to  
`volk_32fc_x2_multiply_32fc_neonasm' ../lib/libvolk.so.0.0.0: undefined reference to`volk\_16i\_max\_star\_horizontal\_16i\_neonasm’  
…/lib/libvolk.so.0.0.0: undefined reference to  
`volk_32fc_32f_dot_prod_32fc_a_neonasm' ../lib/libvolk.so.0.0.0: undefined reference to`volk\_32f\_x2\_dot\_prod\_32f\_neonasm\_opts’  
…/lib/libvolk.so.0.0.0: undefined reference to  
`volk_32fc_32f_dot_prod_32fc_a_neonpipeline' ../lib/libvolk.so.0.0.0: undefined reference to`volk\_32f\_x2\_dot\_prod\_32f\_neonasm’  
collect2: error: ld returned 1 exit status  
make[2]: \*\*\* [volk/apps/volk\_profile] Error 1  
make[1]: \*\*\* [volk/apps/CMakeFiles/volk\_profile.dir/all] Error 2  
make: \*\*\* [all] Error 2  
make failed

---

<div class="post-metadata">

**Author:** ![andreas\_l](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Post date:** [January 9, 2015, 11:30pm UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762/8 "2015-01-09T23:30:50Z")

</div>

I think when I built it I used:

cmake -DCMAKE\_CXX\_FLAGS="-mcpu=cortex-a7 -mfpu=neon-vfpv4  
-mtune=cortex-a7 -funsafe-math-optimizations" …/ -Wno-dev

I also had to enable swap space because the bpi doesn’t have enough  
memory for some of the compile stages:

sudo dd if=/dev/zero of=/sata/swapfile bs=1024 count=1024k  
sudo mkswap /sata/swapfile  
sudo swapon /sata/swapfile  
free -m

Thanks

---

<div class="post-metadata">

**Author:** ![andreas\_l](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Post date:** [January 11, 2015, 3:55pm UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762/9 "2015-01-11T15:55:16Z")

</div>

On Sun, Jan 11, 2015 at 4:52 AM, Andreas L.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> a\_neonasm’  
> ../lib/libvolk.so.0.0.0: undefined reference to  
> neonasm’  
> collect2: error: ld returned 1 exit status  
> make[2]: \*\*\* [volk/apps/volk\_profile] Error 1  
> make[1]: \*\*\* [volk/apps/CMakeFiles/volk\_profile.dir/all] Error 2  
> make: \*\*\* [all] Error 2  
> make failed

Yes. As has already been mentioned on this thread, on these devices, you  
need to set some extra cmake flags. See our Embedded page and the  
section  
on Native Compiling.

[http://gnuradio.org/redmine/projects/gnuradio/wiki/Embedded](http://gnuradio.org/redmine/projects/gnuradio/wiki/Embedded)

Even with this information out there, I still don’t understand why  
people  
try and natively compile GNU Radio on these devices…

Tom

---

<div class="post-metadata">

**Author:** ![andreas\_l](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Post date:** [January 11, 2015, 6:37pm UTC](https://www.ruby-forum.com/t/compiling-gnuradio-on-bananapi/233762/10 "2015-01-11T18:37:13Z")

</div>

> ```
> `volk_32fc_32f_dot_prod_32fc_a_neonasm'
> ../lib/libvolk.so.0.0.0: undefined reference to
> `volk_32f_x2_dot_prod_32f_neonasm'
> 
> ```
> 
> section on Native Compiling.
> 
> [http://gnuradio.org/redmine/projects/gnuradio/wiki/Embedded](http://gnuradio.org/redmine/projects/gnuradio/wiki/Embedded)  
> Yes, i know this. But this doesnt work on the raspian OS on Banana. On  
> Lubuntu for Banana this works now with this extra cmake flags.
> 
> Even with this information out there, I still don’t understand why  
> people try and natively compile GNU Radio on these devices…  
> Because to make the experience that native compiling on these devices is  
> terrible 🙂

In the future i will use cross compiling.

> Tom

Andreas
