You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kururuKT <kt...@gmail.com> on 2013/06/24 21:15:49 UTC

Compiling issue with ActiveMQ-CPP on armv7l

Hello all,

Wonder if anyone had issue with compiling ActiveMQ-CPP library on ARM
system. I'm not cross-compiling, install all the dependency (apr,
cppunit...)

Things are alright in the configuration. But when I run make, the code
compiles until I get to /libactivemq_cpp_la-ActiveMQConnection.o and I get
an "g++: internal compiler error"

The compiling instruction and error looks like the following:
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -ansi -pedantic -DLINUX
-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
-I/usr/local/apr/include/apr-1 -W -Wall -Wextra -Wconversion -fPIC
-fstrict-aliasing -Wstrict-aliasing=2 -Wno-long-long -g -O2 -pthread -MT
activemq/core/libactivemq_cpp_la-ActiveMQConnection.lo -MD -MP -MF
activemq/core/.deps/libactivemq_cpp_la-ActiveMQConnection.Tpo -c
activemq/core/ActiveMQConnection.cpp  -fPIC -DPIC -o
activemq/core/.libs/libactivemq_cpp_la-ActiveMQConnection.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
make[2]: *** [activemq/core/libactivemq_cpp_la-ActiveMQConnection.lo] Error
1
make[2]: Leaving directory
`/home/ubuntu/mqlib/activemq-cpp-library-3.7.0/src/main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ubuntu/mqlib/activemq-cpp-library-3.7.0'
make: *** [all] Error 2



--
View this message in context: http://activemq.2283324.n4.nabble.com/Compiling-issue-with-ActiveMQ-CPP-on-armv7l-tp4668533.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Compiling issue with ActiveMQ-CPP on armv7l

Posted by kururuKT <kt...@gmail.com>.
Thanks all, cross-compile completed without those examples

After calling make install, the compiler will install the new library then
crash during the example section.

Compile my program with the new libraries, things works out fine, with no
apr-util dependency. Happy.

Next I'll work on openssl etc.

==============================

Cross-compiled:
apr
$ ./configure --prefix=/usr/arm-linux-gnueabi/apr --host=arm-linux-gnueabi
ac_cv_file__dev_zero=no ac_cv_func_setpgrp_void=no
apr_cv_tcp_nodelay_with_cork=no cross_compiling=yes
apr_cv_process_shared_works=no ac_cv_sizeof_struct_iovec=1 

activemq-cpp-library-3.7.0
./configure --prefix=/usr/arm-linux-gnueabi/activemq
--host=arm-linux-gnueabi -with-apr=/usr/arm-linux-gnueabi/apr -disable-ssl 



--
View this message in context: http://activemq.2283324.n4.nabble.com/Compiling-issue-with-ActiveMQ-CPP-on-armv7l-tp4668533p4668796.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Compiling issue with ActiveMQ-CPP on armv7l

Posted by Timothy Bish <ta...@gmail.com>.
On 06/26/2013 03:23 PM, kururuKT wrote:
> After I take a second look, it shown that the compiler is compiling things in
> the "examples" directory.
>
> I wonder if I can simply remove the entire "example" folder from the build?
> libactivemq.so doesn't need the examples to run right?
>
> make[2]: Leaving directory
> `/home/jacky/apache/Apache_apr/activemq-cpp-library-3.7.0/src/main'
> Making all in src/examples
> make[2]: Entering directory
> `/home/jacky/apache/Apache_apr/activemq-cpp-library-3.7.0/src/examples'
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Compiling-issue-with-ActiveMQ-CPP-on-armv7l-tp4668533p4668610.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Of course you can remove the examples from the compilation.

I'd recommend you use the v3.7.x branch in svn as there are compilation 
fixes.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/

www.camelone.org : The open source integration conference:


Re: Compiling issue with ActiveMQ-CPP on armv7l

Posted by kururuKT <kt...@gmail.com>.
After I take a second look, it shown that the compiler is compiling things in
the "examples" directory.

I wonder if I can simply remove the entire "example" folder from the build?
libactivemq.so doesn't need the examples to run right?

make[2]: Leaving directory
`/home/jacky/apache/Apache_apr/activemq-cpp-library-3.7.0/src/main'
Making all in src/examples
make[2]: Entering directory
`/home/jacky/apache/Apache_apr/activemq-cpp-library-3.7.0/src/examples'



--
View this message in context: http://activemq.2283324.n4.nabble.com/Compiling-issue-with-ActiveMQ-CPP-on-armv7l-tp4668533p4668610.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Compiling issue with ActiveMQ-CPP on armv7l

Posted by Karel Gardas <ka...@centrum.cz>.
On 06/26/13 08:03 PM, kururuKT wrote:
> Yet another update.
>
> All the errors I got is related to out of memory. I was able to compile
> activemq-3.4.4 locally, but not 3.7.0.
>
> So means I'm going to cross-compile, and IT GIVE ME HELL AGAIN
>
> I downloaded + cross-compiled APR library - after pain search - with the
> following configure option
>
> ./configure --prefix=/usr/arm-linux-gnueabi/apr --host=arm-linux-gnueabi
> ac_cv_file__dev_zero=no ac_cv_func_setpgrp_void=no
> apr_cv_tcp_nodelay_with_cork=no cross_compiling=yes
> apr_cv_process_shared_works=no ac_cv_sizeof_struct_iovec=1
>
> Then I moved on to cross-compile activemq
> ./configure --prefix=/usr/arm-linux-gnueabi/activemq
> --host=arm-linux-gnueabi -with-apr=/usr/arm-linux-gnueabi/apr -disable-ssl
> (cross-compiling openssl is another can of worms... deal with that later)
>
> Below is the error I got:
> libtool: link: arm-linux-gnueabi-g++ -ansi -pedantic -DLINUX -D_REENTRANT
> -D_GNU_SOURCE -I/usr/arm-linux-gnueabi/apr/include/apr-1 -W -Wall -Wextra
> -Wconversion -fPIC -fstrict-aliasing -Wstrict-aliasing=2 -Wno-long-long
> -DLINUX -D_REENTRANT -D_GNU_SOURCE
> -I/usr/arm-linux-gnueabi/apr/include/apr-1 -Wno-non-virtual-dtor
> -Wno-unused-parameter -Wno-uninitialized -I./../main -g -O2 -o .libs/example
> example-main.o  ../main/.libs/libactivemq-cpp.so
> /usr/arm-linux-gnueabi/apr/lib/libapr-1.so -lrt -lcrypt -ldl -Wl,-rpath
> -Wl,/usr/arm-linux-gnueabi/activemq/lib -Wl,-rpath
> -Wl,/usr/arm-linux-gnueabi/apr/lib
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_getspecific'
> ../main/.libs/libactivemq-cpp.so: undefined reference to `pthread_create'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_rwlock_destroy'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_rwlock_tryrdlock'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_mutex_trylock'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_key_delete'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_key_create'
> /usr/arm-linux-gnueabi/apr/lib/libapr-1.so: undefined reference to
> `pthread_once'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_rwlock_rdlock'
> ../main/.libs/libactivemq-cpp.so: undefined reference to `pthread_join'
> ../main/.libs/libactivemq-cpp.so: undefined reference to `pthread_detach'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_rwlock_trywrlock'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_rwlock_init'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_attr_getstacksize'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_rwlock_unlock'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_rwlock_wrlock'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_attr_setstacksize'
> /usr/arm-linux-gnueabi/apr/lib/libapr-1.so: undefined reference to
> `pthread_sigmask'
> ../main/.libs/libactivemq-cpp.so: undefined reference to
> `pthread_setspecific'
> collect2: ld returned 1 exit status
> make[2]: *** [example] Error 1
> make[2]: Leaving directory
> `/home/jacky/apache/Apache_apr/activemq-cpp-library-3.7.0/src/examples'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/home/jacky/apache/Apache_apr/activemq-cpp-library-3.7.0'
> make: *** [all] Error 2
>
> So it looks like the libapr-1 file that I cross-compiled has some issue with
> pthread?

It may or may not, it depends on the strategy the authors take. Anyway, 
if you add -lpthread to the linking command-line you should success with 
linking probably...

Karel

Re: Compiling issue with ActiveMQ-CPP on armv7l

Posted by kururuKT <kt...@gmail.com>.
Yet another update.

All the errors I got is related to out of memory. I was able to compile
activemq-3.4.4 locally, but not 3.7.0.

So means I'm going to cross-compile, and IT GIVE ME HELL AGAIN

I downloaded + cross-compiled APR library - after pain search - with the
following configure option

./configure --prefix=/usr/arm-linux-gnueabi/apr --host=arm-linux-gnueabi
ac_cv_file__dev_zero=no ac_cv_func_setpgrp_void=no
apr_cv_tcp_nodelay_with_cork=no cross_compiling=yes
apr_cv_process_shared_works=no ac_cv_sizeof_struct_iovec=1

Then I moved on to cross-compile activemq
./configure --prefix=/usr/arm-linux-gnueabi/activemq
--host=arm-linux-gnueabi -with-apr=/usr/arm-linux-gnueabi/apr -disable-ssl
(cross-compiling openssl is another can of worms... deal with that later)

Below is the error I got:
libtool: link: arm-linux-gnueabi-g++ -ansi -pedantic -DLINUX -D_REENTRANT
-D_GNU_SOURCE -I/usr/arm-linux-gnueabi/apr/include/apr-1 -W -Wall -Wextra
-Wconversion -fPIC -fstrict-aliasing -Wstrict-aliasing=2 -Wno-long-long
-DLINUX -D_REENTRANT -D_GNU_SOURCE
-I/usr/arm-linux-gnueabi/apr/include/apr-1 -Wno-non-virtual-dtor
-Wno-unused-parameter -Wno-uninitialized -I./../main -g -O2 -o .libs/example
example-main.o  ../main/.libs/libactivemq-cpp.so
/usr/arm-linux-gnueabi/apr/lib/libapr-1.so -lrt -lcrypt -ldl -Wl,-rpath
-Wl,/usr/arm-linux-gnueabi/activemq/lib -Wl,-rpath
-Wl,/usr/arm-linux-gnueabi/apr/lib
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_getspecific'
../main/.libs/libactivemq-cpp.so: undefined reference to `pthread_create'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_rwlock_destroy'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_rwlock_tryrdlock'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_mutex_trylock'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_key_delete'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_key_create'
/usr/arm-linux-gnueabi/apr/lib/libapr-1.so: undefined reference to
`pthread_once'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_rwlock_rdlock'
../main/.libs/libactivemq-cpp.so: undefined reference to `pthread_join'
../main/.libs/libactivemq-cpp.so: undefined reference to `pthread_detach'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_rwlock_trywrlock'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_rwlock_init'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_attr_getstacksize'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_rwlock_unlock'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_rwlock_wrlock'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_attr_setstacksize'
/usr/arm-linux-gnueabi/apr/lib/libapr-1.so: undefined reference to
`pthread_sigmask'
../main/.libs/libactivemq-cpp.so: undefined reference to
`pthread_setspecific'
collect2: ld returned 1 exit status
make[2]: *** [example] Error 1
make[2]: Leaving directory
`/home/jacky/apache/Apache_apr/activemq-cpp-library-3.7.0/src/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/jacky/apache/Apache_apr/activemq-cpp-library-3.7.0'
make: *** [all] Error 2

So it looks like the libapr-1 file that I cross-compiled has some issue with
pthread?

Anyone has some advice on cross-compiling activemq?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Compiling-issue-with-ActiveMQ-CPP-on-armv7l-tp4668533p4668608.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Compiling issue with ActiveMQ-CPP on armv7l

Posted by kururuKT <kt...@gmail.com>.
Hello all,

An update to the situation, it turns out the cause of the compiling error is
out of memory. I restart the compilation with a higher memory device and got
pass that point.

However I've encountered an error again with the error below:

libtool: link: `cms/libactivemq_cpp_la-Destination.lo' is not a valid
libtool object
make[2]: *** [libactivemq-cpp.la] Error 1

I haven't try cross-compiling yet because I've a rather bad experience with
activemq-cpp-3.4.3... if nothing works out, I'll give that a try again... (I
don't think that matters)



--
View this message in context: http://activemq.2283324.n4.nabble.com/Compiling-issue-with-ActiveMQ-CPP-on-armv7l-tp4668533p4668584.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.