Hello,

 

I am trying to compile OpenAMQ and Log4CXX for powerpc – both of which need APR and APU.  I am having some struggles with the compilation process, could you help?

 

First I start by compiling APR:

 

./configure CC=powerpc-linux-gcc --host=powerpc-linux --prefix=/tmp/target_filesystem/apr ac_cv_file__dev_zero=yes ac_cv_func_setpgrp_void=yes apr_cv_tcp_nodelay_with_cork=yes ac_cv_sizeof_struct_iovec=8 --enable-threads CXX=powerpc-linux-g++

make

make install

 

->This goes fine.  Puts it in the right place and everything.

 

Then I go to APR-iconv – will be needed by Log4CXX (doesn’t like the one in /usr/include?).

./configure CC=powerpc-linux-gcc CXX=powerpc-linux-g++ --host=powerpc-linux --prefix=/tmp/target_filesystem/apr-iconv --with-apr=/tmp/target_filesystem/apr

make

                ->This fails:

/bin/sh /tmp/target_filesystem/apr/build-1/libtool --silent --mode=link  powerpc-linux-gcc -g -O2   -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE   -I/tmp/apr-iconv-1.2.1/lib -I/tmp/apr-iconv-1.2.1/include  -I/tmp/target_filesystem/apr/include/apr-1       -o apriconv -o apriconv iconv.lo iconv_stream.lo ../lib/libapriconv-1.la  /tmp/target_filesystem/apr/lib/libapr-1.la -lcrypt  -ldl

/tmp/target_filesystem/apr/lib/libapr-1.so: warning: the use of LEGACY `utimes' is discouraged, use `utime'

/tmp/target_filesystem/apr/lib/libapr-1.so: undefined reference to `pthread_create'

/tmp/target_filesystem/apr/lib/libapr-1.so: undefined reference to `pthread_getspecific'

/tmp/target_filesystem/apr/lib/libapr-1.so: undefined reference to `pthread_detach'

/tmp/target_filesystem/apr/lib/libapr-1.so: undefined reference to `pthread_once'

/tmp/target_filesystem/apr/lib/libapr-1.so: undefined reference to `pthread_key_create'

/tmp/target_filesystem/apr/lib/libapr-1.so: undefined reference to `pthread_attr_setstacksize'

/tmp/target_filesystem/apr/lib/libapr-1.so: undefined reference to `pthread_sigmask'

/tmp/target_filesystem/apr/lib/libapr-1.so: undefined reference to `pthread_join'

/tmp/target_filesystem/apr/lib/libapr-1.so: undefined reference to `pthread_setspecific'

collect2: ld returned 1 exit status

 

I tried adding in the LIBS=-lpthread to APR, but that causes APR to fail the build.  Any ideas?  The “final” step will to be getting APR-util to compile, utilizing the above components.  Something like this:

 

                ./configure CC=powerpc-linux-gcc CXX=powerpc-linux-g++ --host=powerpc-linux –prefix=/tmp/target_filesystem/apr-util –with-iconv=/tmp/target_filesystem/apr-iconv –with-apr=/tmp/target_filesystem/apr

 

Any ideas would be REALLY helpful.   I am stumped!

 

:: Ryan Neal