Bug #415

Build fails on ARMEL

Added by Chris Paget 196 days ago. Updated 162 days ago.

Status:New Start:02/18/2010
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:-
Target version:-
Resolution:


Description

I'm doing some work porting gnuradio-3.2.2 to armel (as used on the Motorola Droid), so far I've gotten libusrp working relatively easily with one exception.

I'm not building full gnuradio just yet, only enough to run OpenBTS. I configured gnuradio with:
./configure --disable-all-components --enable-usrp --enable-omnithread --enable-mblock --enable-pmt

the resulting make then failed in pmt/src/lib with:

./.libs/libpmt-qa.so: undefined reference to `__sync_fetch_and_add_4'

You have to #define BOOST_SP_USE_PTHREADS as a workaround, I edited pmt/src/lib/Makefile and replaced
DEFS = -DHAVE_CONFIG_H
with
DEFS = -DHAVE_CONFIG_H -DBOOST_SP_USE_PTHREADS
after which the build succeeded. I had to patch a couple of other makefiles as well, it would probably be best to add this to all makefiles on armel but I couldn't work out how to do that cleanly :)

If you need any of it, my environment:
$ cat /proc/cpuinfo
Processor : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 549.33
Features : swp half thumb fastmult vfp edsp neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x1
CPU part : 0xc08
CPU revision : 3
$ cat /etc/issue
Debian GNU/Linux 5.0 \n \l
$ uname -a
Linux localhost 2.6.29-compcache06_unionfs253-sholes-omap1-hgbd46a17844a3-dirty #83 PREEMPT Sun Jan 31 06:04:08 UTC 2010 armv7l GNU/Linux

History

Updated by Philip Balister 162 days ago

Chris Paget wrote:

I'm doing some work porting gnuradio-3.2.2 to armel (as used on the Motorola Droid), so far I've gotten libusrp working relatively easily with one exception.

I'm not building full gnuradio just yet, only enough to run OpenBTS. I configured gnuradio with: ./configure --disable-all-components --enable-usrp --enable-omnithread --enable-mblock --enable-pmt

the resulting make then failed in pmt/src/lib with:

./.libs/libpmt-qa.so: undefined reference to `__sync_fetch_and_add_4'

You have to #define BOOST_SP_USE_PTHREADS as a workaround, I edited pmt/src/lib/Makefile and replaced DEFS = -DHAVE_CONFIG_H with DEFS = -DHAVE_CONFIG_H -DBOOST_SP_USE_PTHREADS after which the build succeeded. I had to patch a couple of other makefiles as well, it would probably be best to add this to all makefiles on armel but I couldn't work out how to do that cleanly :)

What version of boost are you using? The _sync_fetch_and_add_4 operation is a gcc builtin that until very recent versions of gcc
was not defined for arm compilers. In OE we build a version of boost with patches to avoid calling that so you do not need to fallback to BOOST_SP_USE_PTHREADS. I believe these patches may also be going upstream in boost, although as people adopt newer gcc's the need will go away.

Philip

If you need any of it, my environment: $ cat /proc/cpuinfo Processor : ARMv7 Processor rev 3 (v7l) BogoMIPS : 549.33 Features : swp half thumb fastmult vfp edsp neon vfpv3 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x1 CPU part : 0xc08 CPU revision : 3 $ cat /etc/issue Debian GNU/Linux 5.0

l

$ uname -a Linux localhost 2.6.29-compcache06_unionfs253-sholes-omap1-hgbd46a17844a3-dirty #83 PREEMPT Sun Jan 31 06:04:08 UTC 2010 armv7l GNU/Linux

Also available in: Atom PDF