apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "NEAL, RYAN" <RYAN_N...@appsig.com>
Subject RE: Cross compiling the APR suite
Date Wed, 20 Jan 2010 18:05:57 GMT

First off, thanks for any help.  I am trying to cross-compile OpenAMQ
and Log4CXX - which means cross compiling APR and APU.  
I am using the buildroot compiler: powerpc-linux-gcc/g++.  

The biggest problem I am having is in log4cxx - it requires a full
version of iconv.  This is set in the APU configuration (I think).  

The specific error in log4cxx is :

	charsetdecoder.cpp: In static member function 'static
	charsetdecoder.cpp:480: error: expected type-specifier before
	charsetdecoder.cpp:480: error: invalid conversion from 'int*' to
	charsetdecoder.cpp:480: error:   initializing argument 1 of
'log4cxx::helpers::ObjectPtrT<T>::ObjectPtrT(const int&) [with 	T =
	charsetdecoder.cpp:480: error: expected ';' before
	charsetdecoder.cpp:480: error: 'APRCharsetDecoder' was not
declared in this scope

To get around this error I need to have the APR_HAS_XLATE flag defined.
This is set in apu.h (autogen'd):

	#define APR_HAS_XLATE          (APU_HAVE_APR_ICONV ||

The APU_HAVE_ICONV is the one that needs to be set - APR-Iconv won't
suffice.  This is set by the have_iconv in apu.h.in (what gens apu.h).  

	include/apu.h.in:#define APU_HAVE_ICONV         @have_iconv@

Thus I think the solution is to get APU to compile with the --with-iconv
flag set to a real version of iconv.  I am trying the one in
/usr/include - but when cross compiling it fails.  I am not sure why.
Here are the lines:

	%./configure CC=powerpc-linux-gcc CXX=powerpc-linux-g++
--host=powerpc-linux --prefix=/tmp/target_filesystem/apr-util
--with-apr=/tmp/apr-1.3.9/apr-1-config --with-iconv=/usr/include
	checking iconv.h usability... no
	checking iconv.h presence... no
	checking for iconv.h... no
	configure: error: iconv support requested, but not found

Does that help explain the problem better?  It is a little confusing
because the fact that I have to switch between so many different
packages and configurations.  Thanks!

:: Ryan Neal

PS.  I am using outlook @ work. I don't know this POS well - I am sorry
for any formatting nightmare it is causing.  

-----Original Message-----
From: Nicholas.Kew@Sun.COM [mailto:Nicholas.Kew@Sun.COM] On Behalf Of
Nick Kew
Sent: Wednesday, January 20, 2010 1:29 AM
Cc: dev@apr.apache.org
Subject: Re: Cross compiling the APR suite

On 20 Jan 2010, at 01:02, NEAL, RYAN wrote:

> Hello,

Your mail would be more legible it you can stop your mailer
scrambling it into pseudo-HTML.

> ./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++

Is this a cross-compile you're attempting?  If not, whence all those

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

Could be worth following up ...

> /tmp/target_filesystem/apr/lib/libapr-1.so: undefined reference to

So it's compiled libapr with pthread for the target system but doesn't
find it
on the host system.  Maybe it would help if you point your --with-apr
to the target apr's apr-1-config?

> Any ideas would be REALLY helpful.   I am stumped!

If we knew what you're really trying to do ....

Find exactly what failed in config.log.  Then try the same thing by
and tweak that until you have it working.  You can then work backwards
to the build options and/or patches you may need.

Nick Kew

View raw message