I am now getting this error:

        then mv -f ".deps/charsetdecoder.Tpo"
".deps/charsetdecoder.Plo"; else rm -f ".deps/charsetdecoder.Tpo"; exit
1; fi
 powerpc-linux-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE=\"log4cxx\" -DVERSION=\"0.10.0\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-I. -I. -I../../../src/main/include -I../../../src/main/include
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
-I/tmp/target_filesystem/apr/include/apr-1
-I/tmp/target_filesystem/apr-util/include/apr-1 -g -O2 -MT
charsetdecoder.lo -MD -MP -MF .deps/charsetdecoder.Tpo -c
charsetdecoder.cpp  -fPIC -DPIC -o .libs/charsetdecoder.o
charsetdecoder.cpp: In static member function 'static
log4cxx::helpers::CharsetDecoderPtr
log4cxx::helpers::CharsetDecoder::getDecoder(const
log4cxx::LogString&)':
charsetdecoder.cpp:480: error: expected type-specifier before
'APRCharsetDecoder'
charsetdecoder.cpp:480: error: invalid conversion from 'int*' to 'int'
charsetdecoder.cpp:480: error:   initializing argument 1 of
'log4cxx::helpers::ObjectPtrT<T>::ObjectPtrT(const int&) [with T =
log4cxx::helpers::CharsetDecoder]'
charsetdecoder.cpp:480: error: expected ';' before 'APRCharsetDecoder'
charsetdecoder.cpp:480: error: 'APRCharsetDecoder' was not declared in
this scope
make[3]: *** [charsetdecoder.lo] Error 1
make[3]: Leaving directory `/tmp/apache-log4cxx-0.10.0/src/main/cpp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/apache-log4cxx-0.10.0/src/main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/apache-log4cxx-0.10.0/src'
make: *** [all-recursive] Error 1

The configure line is like this:

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

APR and APR-util are compiled with the same compiler and roughly the
same params.  Any ideas as to why I would be getting this error?  

I've already added "#include <string.h>" to logstring.h (it is used in
both inputstreamreader.cpp and socketoutputstream.cpp).

:: Ryan Neal


-----Original Message-----
From: Curt Arnold [mailto:[email protected]] On Behalf Of Curt Arnold
Sent: Friday, January 15, 2010 6:49 PM
To: Log4CXX Dev
Subject: Re: Cross compiling Log4Cxx with APR/APU


On Jan 15, 2010, at 6:38 PM, NEAL, RYAN wrote:

>  
> Hello,
>  
> I am trying to cross compile log4cxx for the powerpc, and am running
into some build errors that I can't understand.
>  
> I am using APR/APU 1.3.9 - both compiled without issue.  I am having
the problem that the iconv in APU is not working.  To prove that this
all works I have started to try and just compile Log4cxx.  I first got
an error about the charsetdecoder.   I updated the APU to have the
-with-conv=/usr/include - allowing it to get the file iconv.h.   
>  
> Now under normal compilation (gcc 4.4) I get this error:
>         then mv -f ".deps/inputstreamreader.Tpo"
".deps/inputstreamreader.Plo"; else rm -f ".deps/inputstreamreader.Tpo";
exit 1; fi
>  g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"log4cxx\"
-DVERSION=\"0.10.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I.
-I../../../src/main/include -I../../../src/main/include -DLINUX=2
-D_REENTRANT -D_GNU_SOURCE -I/tmp/apr-1.3.9/include
-I/tmp/apr-util-1.3.9/include -I/tmp/apr-util-1.3.9/xml/expat/lib -g -O2
-MT inputstreamreader.lo -MD -MP -MF .deps/inputstreamreader.Tpo -c
inputstreamreader.cpp  -fPIC -DPIC -o .libs/inputstreamreader.o
> inputstreamreader.cpp: In member function 'virtual log4cxx::LogString
log4cxx::helpers::InputStreamReader::read(log4cxx::helpers::Pool&)':
> inputstreamreader.cpp:66: error: 'memmove' was not declared in this
scope
> make[3]: *** [inputstreamreader.lo] Error 1
> make[3]: Leaving directory `/tmp/apache-log4cxx-0.10.0/src/main/cpp'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/tmp/apache-log4cxx-0.10.0/src/main'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/tmp/apache-log4cxx-0.10.0/src'
> make: *** [all-recursive] Error 1
>  
>  
> I can't seem to find a solution online to this.  Any ideas?
>  
> :: Ryan Neal
>  



Check where memmove is defined in your compile environment by doing
"grep memmove /usr/include".  On gcc 4.2.1 on Mac OS/X i386 it is in
string.h.  Try adding an explicit include of that file into
inputstreamreader.cpp and see if that resolves the problem.  Let the
list know and so we can patch.


Reply via email to