You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by Magallo <m....@eldes.it> on 2011/02/17 14:58:55 UTC
Re: Cross compiling Log4Cxx with APR/APU
NEAL, RYAN <RYAN_NEAL <at> appsig.com> writes:
>
> 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
>
Hi Neal, I have the same error on a Sun Solaris SPARC64 machine. I don't know
how to solve the problem.
.........................
.........................
.........................
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
*** Error code 1
make: Fatal error: Command failed for target `charsetdecoder.lo'
.........................
.........................
.........................
Did you find a solution? How?
Thanks.
Re: Cross compiling Log4Cxx with APR/APU
Posted by Aleksandar Zivkovic <al...@gmail.com>.
Magallo <m.galletti <at> eldes.it> writes:
> Hi Neal, I have the same error on a Sun Solaris SPARC64 machine. I don't know
> how to solve the problem.
>
> .........................
> .........................
> .........................
> 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
> *** Error code 1
> make: Fatal error: Command failed for target `charsetdecoder.lo'
> .........................
> .........................
> .........................
>
> Did you find a solution? How?
>
> Thanks.
>
>
Still didn't test the library within the app but checked with ldd. I solved
issue you stated by adding libiconv to my build toolchain. I am working with
Buildroot so had to add BR2_PACKAGE_LIBICONV=y. Basically you must have
libiconv.so in your toolchain path to solve issue you are having.