[zeromq-dev] Cross Compiling and running a Client for the PowerPC

lone squirrely thelonesquirrely at gmail.com
Fri Feb 19 21:39:36 CET 2010


In trying to configure and compile the zmq library I ran into a small
snag.  The configuration goes well with this line:

$ ./configure --with-cpp --prefix=<path>/zeromq2/install_powerpc
--disable-shared --with-chat CC=powerpc-linux-uclibc-gcc
CXX=powerpc-linux-uclibc-g++ --host=powerpc-linux

I think that is all the parts I will need.  But when i run make I get this:
/bin/sh ../libtool  --tag=CXX   --mode=compile
powerpc-linux-uclibc-g++ -DHAVE_CONFIG_H -I.   -D_GNU_SOURCE
-D_REENTRANT -D_THREAD_SAFE  -Wall  -pedantic -Werror -g -O2 -MT
libzmq_la-app_thread.lo -MD -MP -MF .deps/libzmq_la-app_thread.Tpo -c
-o libzmq_la-app_thread.lo `test -f 'app_thread.cpp' || echo
'./'`app_thread.cpp
libtool: compile:  powerpc-linux-uclibc-g++ -DHAVE_CONFIG_H -I.
-D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -Wall -pedantic -Werror -g
-O2 -MT libzmq_la-app_thread.lo -MD -MP -MF
.deps/libzmq_la-app_thread.Tpo -c app_thread.cpp -o
libzmq_la-app_thread.o
In file included from ypipe.hpp:24,
                 from dispatcher.hpp:29,
                 from app_thread.cpp:37:
yqueue.hpp: In constructor 'zmq::yqueue_t<T, N>::yqueue_t()':
yqueue.hpp:52: error: there are no arguments to 'rpl_malloc' that
depend on a template parameter, so a declaration of 'rpl_malloc' must
be available
yqueue.hpp:52: error: (if you use '-fpermissive', G++ will accept your
code, but allowing the use of an undeclared name is deprecated)
yqueue.hpp: In member function 'void zmq::yqueue_t<T, N>::push()':
yqueue.hpp:106: error: there are no arguments to 'rpl_malloc' that
depend on a template parameter, so a declaration of 'rpl_malloc' must
be available
make[2]: *** [libzmq_la-app_thread.lo] Error 1


I think it is because in platform.hpp malloc is defined as rpl_malloc.
 This comes about because of the configuration correct?  I looked at
the log and get this:

1153 configure:21068: checking for GNU libc compatible malloc
1154 configure:21133: result: no


I was wondering what check it does here that determines that I don't
have a suitable malloc?  In the buildroot/busybox area there is a
working malloc.h - I believe it gets used when I am cross compiling
APR (another part of this project...).  Do I need to set some more
information on the command line?  Like the variable:
ac_cv_func_malloc_0_nonnull?

Thanks for the guidance!



More information about the zeromq-dev mailing list