[Beaglebone] Cross-compile ActiveMQ-cpp for Beaglebone

235 views
Skip to first unread message

kururu

unread,
Oct 11, 2012, 6:30:35 PM10/11/12
to beagl...@googlegroups.com
I'm trying to use ActiveMQ-cpp client in Beaglebone/BeagleBoard - since I'm developing my project on my linux PC, I'll need to cross-compile the ActiveMQ-cpp library in order for it to run on Beaglebone.

I follow through the steps in their building instruction, except I compile the APR and the APR-util library using the following:

For APR: (for configure file, I got some of the idea from here)

./configure --prefix=/usr/arm-linux-gnueabi/apr --host=arm-linux-gnueabi CC="arm-linux-gnueabi-gcc" CXX="arm-linux-gnueabi-g++" I run make install and things are fine.

For APR-util:

./configure --prefix=/usr/arm-linux-gnueabi/apr-util --host=arm-linux-gnueabi -with-apr=/usr/arm-linux-gnueabi/apr CC="arm-linux-gnueabi-gcc" CXX="arm-linux-gnueabi-g++"
I run make install and got this:

/home/peter/apache/Apache_apr/apr-util-1.5.1/xml/expat/.libs/libexpat.so: could not read symbols: File in wrong format
 After some search, I 'think' the issue is with libexpat being the in the wrong format (compiled for i386?). I then move on to compile the expat library and run ./configure for apr-util again and I got

/usr/arm-linux-gnueabi/expat/lib/libexpat.so: could not read symbols: File in wrong format
At this point, I'm quite puzzled - I compiled the expat library with arm-linux-gnueabi and everything seems compiled fine. What went wrong?
I also did a little search on libexpat.so - I've seen people saying libtool is linking the wrong library whatsoever - it there some well known issue with libtool when it comes to cross-compiling?
How should I properly compile ActiveMQ-cpp library for a ARM-platform? Is there some way I can fix the libexpat.so?
Many thanks!

kururu

unread,
Oct 18, 2012, 1:34:27 PM10/18/12
to beagl...@googlegroups.com
Alright...   I ....   finally....

-->give up<---

I compiled everything <apr, apr-util, expat, activemq, uuid> in beaglebone, copy all the libraries I need for my application, and cross-compile my program with the copied library using cross-compiler - everything works now....  I can use activemq-cpp to communicate with remote broker.

Well, I feel stupid, but I wish I could understand what's going on with libtool and the expat library - I still feel that either libtool is linking something wrong (I can't tell from the configure / error file) or cross-compiled libexpat.so has something in it (but I'm able to cross-compile it with no error..,.  what's wrong? arggh

alqp...@gmail.com

unread,
Jun 26, 2013, 12:52:57 PM6/26/13
to beagl...@googlegroups.com
Part of the response is explained in http://www.metastatic.org/text/libtool.html
We're struggling with the same problem trying to build a PHP extension for the TI ARM AM335x platform.


Reply all
Reply to author
Forward
0 new messages