You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Devin Venable <ve...@gmail.com> on 2010/07/20 16:43:55 UTC

Cross-compiling activemq-cpp on Centos 5

A few days ago I asked if anyone knew of an RPM for activemq-cpp that could
be installed on Centos 5.  It was suggested that I might find one in the
newer Fedora repositories.  Indeed I did, but there were several
dependencies on newer libraries, so I had to resort to compiling it myself.
 Typically this is not such a big deal, but it was tricky because I needed
the 32 bit build and I was compiling on a 64 bit Centos 5.

I finally got it done and posted the recipe for cross-compiling activemq-cpp
on Centos 5.  If anyone needs to do the same, check here for the steps:

http://devinvenable.blogspot.com/2010/07/cross-compile-activemq-cpp-on-centos-5.html

Devin

Re: Cross-compiling activemq-cpp on Centos 5

Posted by Timothy Bish <ta...@gmail.com>.
On Tue, 2010-07-20 at 12:21 -0500, Devin Venable wrote:
> Looks like my joy was premature.  Each time I start up a small sample
> program that connects to the queue, I get a seg fault.  I run the same
> sample programs on other platforms (like Ubuntu) and it works great.  Here's
> the stack trace for the error.  Anyone seen anything like it before?  I've
> tried building twice, once on a clean install of Centos 5, and get the same
> stack trace.
> 
> (gdb) run
> Starting program:
> /home/dvenable/src/TestProducer/dist/Debug/GNU-Linux-x86/testproducer
> [Thread debugging using libthread_db enabled]
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00d7a4f3 in mutex_hash () from /usr/lib/libapr-1.so.0
> (gdb) bt
> #0  0x00d7a4f3 in mutex_hash () from /usr/lib/libapr-1.so.0
> #1  0x00d7a532 in apr_atomic_add32 () from /usr/lib/libapr-1.so.0
> #2  0xf7e62acc in
> decaf::util::concurrent::atomic::AtomicInteger::decrementAndGet() () from
> /usr/lib/libactivemq-cpp.so.11
> #3  0xf79831f6 in
> decaf::util::concurrent::atomic::AtomicRefCounter::release()
>     () from /usr/lib/libactivemq-cpp.so.11
> #4  0xf7e14eab in decaf::lang::ArrayPointer<unsigned char,
> decaf::util::concurrent::atomic::AtomicRefCounter>::~ArrayPointer() ()
>    from /usr/lib/libactivemq-cpp.so.11
> #5  0xf7e1f380 in decaf::lang::ArrayPointer<unsigned char,
> decaf::util::concurrent::atomic::AtomicRefCounter>::reset(unsigned char*,
> int) ()
>    from /usr/lib/libactivemq-cpp.so.11
> #6  0xf7e1ea41 in
> decaf::net::InetAddress::InetAddress(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&, unsigned char const*,
> int) () from /usr/lib/libactivemq-cpp.so.11
> #7  0xf7e1d59c in
> decaf::net::Inet4Address::Inet4Address(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&, unsigned char const*,
> int) () from /usr/lib/libactivemq-cpp.so.11
> #8  0xf7e1dcd9 in __static_initialization_and_destruction_0 ()
>    from /usr/lib/libactivemq-cpp.so.11
> #9  0xf7e1de1b in global constructors keyed to
> _ZN5decaf3net11InetAddress13loopbackBytesE () from
> /usr/lib/libactivemq-cpp.so.11
> #10 0xf7e7b8c6 in __do_global_ctors_aux () from
> /usr/lib/libactivemq-cpp.so.11
> ---Type <return> to continue, or q <return> to quit---
> #11 0xf790fdc5 in _init () from /usr/lib/libactivemq-cpp.so.11
> #12 0x00911223 in call_init () from /lib/ld-linux.so.2
> #13 0x00911333 in _dl_init_internal () from /lib/ld-linux.so.2
> #14 0x0090384f in _dl_start_user () from /lib/ld-linux.so.2
> 

Try using the code from the 3.2.x fixes branch, there's been some fixes
in there that should resolve this.
https://svn.apache.org/repos/asf/activemq/activemq-cpp/branches/activemq-cpp-3.2.x

Regards

-- 
Tim Bish

Open Source Integration: http://fusesource.com
ActiveMQ in Action: http://www.manning.com/snyder/

Follow me on Twitter: http://twitter.com/tabish121
My Blog: http://timbish.blogspot.com/


Re: Cross-compiling activemq-cpp on Centos 5

Posted by Devin Venable <ve...@gmail.com>.
Looks like my joy was premature.  Each time I start up a small sample
program that connects to the queue, I get a seg fault.  I run the same
sample programs on other platforms (like Ubuntu) and it works great.  Here's
the stack trace for the error.  Anyone seen anything like it before?  I've
tried building twice, once on a clean install of Centos 5, and get the same
stack trace.

(gdb) run
Starting program:
/home/dvenable/src/TestProducer/dist/Debug/GNU-Linux-x86/testproducer
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00d7a4f3 in mutex_hash () from /usr/lib/libapr-1.so.0
(gdb) bt
#0  0x00d7a4f3 in mutex_hash () from /usr/lib/libapr-1.so.0
#1  0x00d7a532 in apr_atomic_add32 () from /usr/lib/libapr-1.so.0
#2  0xf7e62acc in
decaf::util::concurrent::atomic::AtomicInteger::decrementAndGet() () from
/usr/lib/libactivemq-cpp.so.11
#3  0xf79831f6 in
decaf::util::concurrent::atomic::AtomicRefCounter::release()
    () from /usr/lib/libactivemq-cpp.so.11
#4  0xf7e14eab in decaf::lang::ArrayPointer<unsigned char,
decaf::util::concurrent::atomic::AtomicRefCounter>::~ArrayPointer() ()
   from /usr/lib/libactivemq-cpp.so.11
#5  0xf7e1f380 in decaf::lang::ArrayPointer<unsigned char,
decaf::util::concurrent::atomic::AtomicRefCounter>::reset(unsigned char*,
int) ()
   from /usr/lib/libactivemq-cpp.so.11
#6  0xf7e1ea41 in
decaf::net::InetAddress::InetAddress(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned char const*,
int) () from /usr/lib/libactivemq-cpp.so.11
#7  0xf7e1d59c in
decaf::net::Inet4Address::Inet4Address(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned char const*,
int) () from /usr/lib/libactivemq-cpp.so.11
#8  0xf7e1dcd9 in __static_initialization_and_destruction_0 ()
   from /usr/lib/libactivemq-cpp.so.11
#9  0xf7e1de1b in global constructors keyed to
_ZN5decaf3net11InetAddress13loopbackBytesE () from
/usr/lib/libactivemq-cpp.so.11
#10 0xf7e7b8c6 in __do_global_ctors_aux () from
/usr/lib/libactivemq-cpp.so.11
---Type <return> to continue, or q <return> to quit---
#11 0xf790fdc5 in _init () from /usr/lib/libactivemq-cpp.so.11
#12 0x00911223 in call_init () from /lib/ld-linux.so.2
#13 0x00911333 in _dl_init_internal () from /lib/ld-linux.so.2
#14 0x0090384f in _dl_start_user () from /lib/ld-linux.so.2


On Tue, Jul 20, 2010 at 9:54 AM, Timothy Bish <ta...@gmail.com> wrote:

> On Tue, 2010-07-20 at 09:43 -0500, Devin Venable wrote:
> > A few days ago I asked if anyone knew of an RPM for activemq-cpp that
> could
> > be installed on Centos 5.  It was suggested that I might find one in the
> > newer Fedora repositories.  Indeed I did, but there were several
> > dependencies on newer libraries, so I had to resort to compiling it
> myself.
> >  Typically this is not such a big deal, but it was tricky because I
> needed
> > the 32 bit build and I was compiling on a 64 bit Centos 5.
> >
> > I finally got it done and posted the recipe for cross-compiling
> activemq-cpp
> > on Centos 5.  If anyone needs to do the same, check here for the steps:
> >
> >
> http://devinvenable.blogspot.com/2010/07/cross-compile-activemq-cpp-on-centos-5.html
> >
> > Devin
>
> Nice work, glad you were able to get it built.
>
> Regards
>
> --
> Tim Bish
>
> Open Source Integration: http://fusesource.com
> ActiveMQ in Action: http://www.manning.com/snyder/
>
> Follow me on Twitter: http://twitter.com/tabish121
> My Blog: http://timbish.blogspot.com/
>
>

Re: Cross-compiling activemq-cpp on Centos 5

Posted by Timothy Bish <ta...@gmail.com>.
On Tue, 2010-07-20 at 09:43 -0500, Devin Venable wrote:
> A few days ago I asked if anyone knew of an RPM for activemq-cpp that could
> be installed on Centos 5.  It was suggested that I might find one in the
> newer Fedora repositories.  Indeed I did, but there were several
> dependencies on newer libraries, so I had to resort to compiling it myself.
>  Typically this is not such a big deal, but it was tricky because I needed
> the 32 bit build and I was compiling on a 64 bit Centos 5.
> 
> I finally got it done and posted the recipe for cross-compiling activemq-cpp
> on Centos 5.  If anyone needs to do the same, check here for the steps:
> 
> http://devinvenable.blogspot.com/2010/07/cross-compile-activemq-cpp-on-centos-5.html
> 
> Devin

Nice work, glad you were able to get it built.  

Regards

-- 
Tim Bish

Open Source Integration: http://fusesource.com
ActiveMQ in Action: http://www.manning.com/snyder/

Follow me on Twitter: http://twitter.com/tabish121
My Blog: http://timbish.blogspot.com/