# Cross Compiling ORC-0.4.18

**URL:** <https://www.ruby-forum.com/t/cross-compiling-orc-0-4-18/246368>\
**Category:** GNU Radio\
**Created:** [October 4, 2013, 6:02pm UTC](https://www.ruby-forum.com/t/cross-compiling-orc-0-4-18/246368 "2013-10-04T18:02:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [October 4, 2013, 6:02pm UTC](https://www.ruby-forum.com/t/cross-compiling-orc-0-4-18/246368/1 "2013-10-04T18:02:06Z")

</div>

All,

I’m trying to cross compile ORC so I may use it during compilation of  
the  
UHD driver and GNURADIO.

When cross compiling on Ubuntu 12.04 x86-64 for ARM I get the following  
errors:

_./configure --host=arm-linux-gnueabihf --build=arm-linux-gnueabihf  
cxxflags="-mcpu=cortex-a8 -mfpu=neon -funsafe-math-optimizations  
-mfloat-abi=hard " cflags="-mcpu=cortex-a8 -mfpu=neon  
-funsafe-math-optimizations -mfloat-abi=hard "  
–prefix=/opt/orc-arm-cross/orc-0.4.18/test-build_

\*libtool: link: gcc -Wall -I.. -g -O2 -o .libs/generate-bytecode generate\_bytecode-generate-bytecode.o ../orc/.libs/liborc-0.4.so -lm -lrt -Wl,-rpath -Wl,/opt/orc-arm-cross/orc-0.4.18/test-build/lib\* \*../orc/.libs/liborc-0.4.so: undefined reference to `orc_arm_get_cpu_flags'* *collect2: ld returned 1 exit status* *make[2]: ***[generate-emulation] Error 1* *make[2]:*** Waiting for unfinished jobs....* *../orc/.libs/liborc-0.4.so: undefined reference to `orc\_arm\_get\_cpu\_flags'\*

orc\_arm\_get\_cpu\_flags is defined in orcarm.h and all the headers are or  
$ORC\_ROOT/orc but when it needs this one header is cannot find it. I’ve  
made sure #include orcarm.h is in orcarm.c but it cannot find it during  
compilation.

So I then manually define it with: -Iorc/orcarm.h during the ./configure  
process and it still doesn’t find it.

ORC 0.4.18 compiles just fine natively on both x86-64 and ARM so my  
current  
workaround is to just compile natively on the ARM platform and copy over  
the necessary ARM files to the x86 cross compile environment so UHD and  
GNURADIO can use them.

Any ideas why ORC won’t cross compile?

-Brandon

---

<div class="post-metadata">

**Author:** ![beley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@beley](https://www.ruby-forum.com/u/beley)\
**Post date:** [October 6, 2013, 5:43am UTC](https://www.ruby-forum.com/t/cross-compiling-orc-0-4-18/246368/2 "2013-10-06T05:43:46Z")

</div>

On Fri, Oct 4, 2013 at 11:00 AM, Brandon E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> -mfloat-abi=hard " cflags="-mcpu=cortex-a8 -mfpu=neon  
> _make[2]: \*\*\* [generate-emulation] Error 1_  
> So I then manually define it with: -Iorc/orcarm.h during the ./configure
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

There’s a couple of issues here. First, this isn’t really the venue to  
discuss building orc. Second, it sounds like you’re current method is  
going  
to result in you doing tons of sort of unnecessary work building a  
sysroots  
with ARM versions of dependencies. To build UHD and GNU Radio you’ll  
need  
way more than just orc, in fact it’s really on the list of things that  
aren’t strictly required.

Unless you have a good reason for not doing so, I would recommend using  
OE  
for cross compiling. There’s way more effort put in to making sure GNU  
Radio builds in that environment than what you are currently doing. I  
recently put up a wiki page with some brief instructions, but don’t  
treat  
it as a one stop shop as an oe guide, read their docs and faqs first.  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/openembedded](http://gnuradio.org/redmine/projects/gnuradio/wiki/openembedded)
