You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by james <ld...@yahoo.com> on 2005/07/08 08:26:03 UTC
Help: build log4cxx failure
hi
all
I have cvs check out the newest code of log4cxx
from cvs repository,and also with apr-1.1.1.tar.gz and
apr-util-1.1.2.tar.gz.
Then , in logging-log4cxx path,
1. ./autogen.sh
2. ./configure --prefix=/usr/local/log4cxx
--with-apr=/path_to/apr-1.1.1
--with-apr-util=/path_to/apr-util-1.1.2
the above 2 steps are ok!
3. make, but found a error:
=======================================================
In file included from
../include/log4cxx/logstring.h:21,
from
../include/log4cxx/helpers/object.h:20,
from
../include/log4cxx/helpers/objectimpl.h:20,
from
../include/log4cxx/rolling/action.h:21,
from action.cpp:17:
../include/log4cxx/log4cxx.h:28:5: "@" is not valid in
#if expressions
In file included from
../include/log4cxx/helpers/object.h:20,
from
../include/log4cxx/helpers/objectimpl.h:20,
from
../include/log4cxx/rolling/action.h:21,
from action.cpp:17:
../include/log4cxx/logstring.h:23:33: "@" is not valid
in #if expressions
../include/log4cxx/logstring.h:36:5: "@" is not valid
in #if expressions
make[1]: *** [action.lo] Error 1
========================================================
./include/log4cxx/logstring.h:
#ifndef _LOG4CXX_STRING_H
#define _LOG4CXX_STRING_H
#include <string>
#include <log4cxx/log4cxx.h>
#if LOG4CXX_LOGCHAR_IS_WCHAR &&
LOG4CXX_LOGCHAR_IS_UTF8
#error only one of LOG4CXX_LOGCHAR_IS_WCHAR and
LOG4CXX_LOGCHAR_IS_UTF8 may be true
#endif
namespace log4cxx {
#if LOG4CXX_LOGCHAR_IS_WCHAR
typedef wchar_t logchar;
#define LOG4CXX_STR(str) L ## str
#endif
#if LOG4CXX_LOGCHAR_IS_UTF8
typedef char logchar;
#define LOG4CXX_STR(str) str
#endif
typedef std::basic_string<logchar> LogString;
}
#if !defined(LOG4CXX_EOL)
#if defined(_WIN32)
#define LOG4CXX_EOL LOG4CXX_STR("\x0D\x0A")
#else
#define LOG4CXX_EOL LOG4CXX_STR("\x0A")
#endif
#endif
#endif //_LOG4CXX_STRING_H
logstring.h has been 2 months old in cvs repository,
so it may be find, but what worng?
Thanks!
__________________________________
Discover Yahoo!
Stay in touch with email, IM, photo sharing and more. Check it out!
http://discover.yahoo.com/stayintouch.html
Re: RE : Help: build log4cxx failure -- fixed!
Posted by james <ld...@yahoo.com>.
Think you , Alexandre Gacon!
I down load Andrea Fester's tarball,and make is ok!
but, if I miss --with-logchar=wchar_t , there is an
compiler error :
==============================
g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"log4cxx\"
-DVERSION=\"0.9.8\" -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
-DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_PTHREAD=1
-DHAVE_THREAD=1 -DHAVE_LIBXML2=1 -DHAVE_XML=1 -I. -I.
-I../include -I../include -I/usr/include/libxml2
-DLOG4CXX -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
-D_LARGEFILE64_SOURCE
-I/home/yusiheng/working/apr-1.1.1/include
-I/home/yusiheng/working/apr-util-1.1.2/include
-D_REENTRANT -g -O2 -MT simpledateformat.lo -MD -MP
-MF .deps/simpledateformat.Tpo -c simpledateformat.cpp
-fPIC -DPIC -o .libs/simpledateformat.o
simpledateformat.cpp: In constructor
`AbbreviatedMonthNameToken::AbbreviatedMonthNameToken(int,
const
std::locale*)':
simpledateformat.cpp:222: could not convert `(this +
4)->std::vector<_Tp,
_Alloc>::operator[](unsigned int) [with _Tp =
std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t>
>, _Alloc =
std::allocator<std::basic_string<wchar_t,
std::char_traits<wchar_t>,
std::allocator<wchar_t> > >](imon)' to
`log4cxx::LogString&'
simpledateformat.cpp:78: in passing argument 1 of
`void
log4cxx::helpers::SimpleDateFormatImpl::renderFacet(log4cxx::LogString&,
apr_time_exp_t*, const char*)'
simpledateformat.cpp: In constructor
`FullMonthNameToken::FullMonthNameToken(int, const
std::locale*)':
simpledateformat.cpp:266: could not convert `(this +
4)->std::vector<_Tp,
_Alloc>::operator[](unsigned int) [with _Tp =
std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t>
>, _Alloc =
std::allocator<std::basic_string<wchar_t,
std::char_traits<wchar_t>,
std::allocator<wchar_t> > >](imon)' to
`log4cxx::LogString&'
simpledateformat.cpp:78: in passing argument 1 of
`void
log4cxx::helpers::SimpleDateFormatImpl::renderFacet(log4cxx::LogString&,
apr_time_exp_t*, const char*)'
simpledateformat.cpp: In constructor
`AbbreviatedDayNameToken::AbbreviatedDayNameToken(int,
const std::locale*)':
simpledateformat.cpp:385: could not convert `(this +
4)->std::vector<_Tp,
_Alloc>::operator[](unsigned int) [with _Tp =
std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t>
>, _Alloc =
std::allocator<std::basic_string<wchar_t,
std::char_traits<wchar_t>,
std::allocator<wchar_t> > >](iday)' to
`log4cxx::LogString&'
simpledateformat.cpp:78: in passing argument 1 of
`void
......
========================================
--- Alexandre Gacon <al...@masagroup.net>
wrote:
> Andrea Fester answers to the same problem yesterday.
> Here is a copy of its
> answer:
>
> David,
>
> I feel somehow guilty for that issue ;-)
>
> For the moment, it would be best if you use my daily
> dist-tarball from
> http://littletux.homelinux.org/log4cxx/. It is
> identical to the CVS head,
> but contains some additional patches, and also
> already contains the
> configure script (no need to run autogen.sh). After
> unpacking, a
>
> $ ./configure --with-apr=pathToApr
> --with-aprutil=pathToAprUtil
> --with-logchar=wchar_t
>
> should properly configure the package (at least one
> other log4cxx user
> succeeded with that approach). Then, simply run
> "make".
>
> The @ are used to define replacement patterns in .in
> files
> and are usually replaced by "configure". Currently
> one of them is missed and
> makes its way into the final .h file ....
>
> Best Regards,
>
> Andreas
>
> Steck, David wrote:
> [...]
> > preprocessor expressions
> ../include/log4cxx/logstring.h:36:5: token >
> "@" is not valid in preprocessor expressions
> make[1]: *** [action.lo] >
> Error 1 >
>
> --
> Andreas Fester
> mailto:Andreas.Fester@gmx.de
> WWW: http://littletux.homelinux.org
> ICQ: 326674288
>
>
> Alexandre Gacon
>
> -----Message d'origine-----
> De : james [mailto:ldapmaster@yahoo.com]
> Envoyé : vendredi 8 juillet 2005 08:26
> À : log4cxx-user@logging.apache.org
> Objet : Help: build log4cxx failure
>
>
> hi
> all
> I have cvs check out the newest code of log4cxx
> from cvs repository,and also with apr-1.1.1.tar.gz
> and
> apr-util-1.1.2.tar.gz.
> Then , in logging-log4cxx path,
> 1. ./autogen.sh
> 2. ./configure --prefix=/usr/local/log4cxx
> --with-apr=/path_to/apr-1.1.1
> --with-apr-util=/path_to/apr-util-1.1.2
> the above 2 steps are ok!
> 3. make, but found a error:
>
=======================================================
> In file included from
> ../include/log4cxx/logstring.h:21,
> from
> ../include/log4cxx/helpers/object.h:20,
> from
> ../include/log4cxx/helpers/objectimpl.h:20,
> from
> ../include/log4cxx/rolling/action.h:21,
> from action.cpp:17:
> ../include/log4cxx/log4cxx.h:28:5: "@" is not valid
> in
> #if expressions
> In file included from
> ../include/log4cxx/helpers/object.h:20,
> from
> ../include/log4cxx/helpers/objectimpl.h:20,
> from
> ../include/log4cxx/rolling/action.h:21,
> from action.cpp:17:
> ../include/log4cxx/logstring.h:23:33: "@" is not
> valid
> in #if expressions
> ../include/log4cxx/logstring.h:36:5: "@" is not
> valid
> in #if expressions
> make[1]: *** [action.lo] Error 1
>
========================================================
> ./include/log4cxx/logstring.h:
> #ifndef _LOG4CXX_STRING_H
> #define _LOG4CXX_STRING_H
>
> #include <string>
> #include <log4cxx/log4cxx.h>
>
> #if LOG4CXX_LOGCHAR_IS_WCHAR &&
> LOG4CXX_LOGCHAR_IS_UTF8
> #error only one of LOG4CXX_LOGCHAR_IS_WCHAR and
> LOG4CXX_LOGCHAR_IS_UTF8 may
> be true #endif
>
>
> namespace log4cxx {
>
> #if LOG4CXX_LOGCHAR_IS_WCHAR
> typedef wchar_t logchar;
> #define LOG4CXX_STR(str) L ## str
>
> #endif
>
> #if LOG4CXX_LOGCHAR_IS_UTF8
> typedef char logchar;
> #define LOG4CXX_STR(str) str
>
> #endif
>
> typedef std::basic_string<logchar> LogString;
>
>
> }
>
>
> #if !defined(LOG4CXX_EOL)
> #if defined(_WIN32)
> #define LOG4CXX_EOL LOG4CXX_STR("\x0D\x0A")
> #else
> #define LOG4CXX_EOL LOG4CXX_STR("\x0A")
> #endif
> #endif
>
>
> #endif //_LOG4CXX_STRING_H
>
>
> logstring.h has been 2 months old in cvs repository,
> so it may be find, but what worng?
> Thanks!
>
>
>
>
>
>
>
> __________________________________
> Discover Yahoo!
> Stay in touch with email, IM, photo sharing and
> more. Check it out!
> http://discover.yahoo.com/stayintouch.html
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
RE : Help: build log4cxx failure
Posted by Alexandre Gacon <al...@masagroup.net>.
Andrea Fester answers to the same problem yesterday. Here is a copy of its
answer:
David,
I feel somehow guilty for that issue ;-)
For the moment, it would be best if you use my daily dist-tarball from
http://littletux.homelinux.org/log4cxx/. It is identical to the CVS head,
but contains some additional patches, and also already contains the
configure script (no need to run autogen.sh). After unpacking, a
$ ./configure --with-apr=pathToApr --with-aprutil=pathToAprUtil
--with-logchar=wchar_t
should properly configure the package (at least one other log4cxx user
succeeded with that approach). Then, simply run "make".
The @ are used to define replacement patterns in .in files
and are usually replaced by "configure". Currently one of them is missed and
makes its way into the final .h file ....
Best Regards,
Andreas
Steck, David wrote:
[...]
> preprocessor expressions ../include/log4cxx/logstring.h:36:5: token >
"@" is not valid in preprocessor expressions make[1]: *** [action.lo] >
Error 1 >
--
Andreas Fester
mailto:Andreas.Fester@gmx.de
WWW: http://littletux.homelinux.org
ICQ: 326674288
Alexandre Gacon
-----Message d'origine-----
De : james [mailto:ldapmaster@yahoo.com]
Envoyé : vendredi 8 juillet 2005 08:26
À : log4cxx-user@logging.apache.org
Objet : Help: build log4cxx failure
hi
all
I have cvs check out the newest code of log4cxx
from cvs repository,and also with apr-1.1.1.tar.gz and
apr-util-1.1.2.tar.gz.
Then , in logging-log4cxx path,
1. ./autogen.sh
2. ./configure --prefix=/usr/local/log4cxx
--with-apr=/path_to/apr-1.1.1 --with-apr-util=/path_to/apr-util-1.1.2
the above 2 steps are ok!
3. make, but found a error:
=======================================================
In file included from
../include/log4cxx/logstring.h:21,
from
../include/log4cxx/helpers/object.h:20,
from ../include/log4cxx/helpers/objectimpl.h:20,
from
../include/log4cxx/rolling/action.h:21,
from action.cpp:17:
../include/log4cxx/log4cxx.h:28:5: "@" is not valid in
#if expressions
In file included from
../include/log4cxx/helpers/object.h:20,
from ../include/log4cxx/helpers/objectimpl.h:20,
from
../include/log4cxx/rolling/action.h:21,
from action.cpp:17:
../include/log4cxx/logstring.h:23:33: "@" is not valid
in #if expressions
../include/log4cxx/logstring.h:36:5: "@" is not valid
in #if expressions
make[1]: *** [action.lo] Error 1
========================================================
./include/log4cxx/logstring.h:
#ifndef _LOG4CXX_STRING_H
#define _LOG4CXX_STRING_H
#include <string>
#include <log4cxx/log4cxx.h>
#if LOG4CXX_LOGCHAR_IS_WCHAR &&
LOG4CXX_LOGCHAR_IS_UTF8
#error only one of LOG4CXX_LOGCHAR_IS_WCHAR and LOG4CXX_LOGCHAR_IS_UTF8 may
be true #endif
namespace log4cxx {
#if LOG4CXX_LOGCHAR_IS_WCHAR
typedef wchar_t logchar;
#define LOG4CXX_STR(str) L ## str
#endif
#if LOG4CXX_LOGCHAR_IS_UTF8
typedef char logchar;
#define LOG4CXX_STR(str) str
#endif
typedef std::basic_string<logchar> LogString;
}
#if !defined(LOG4CXX_EOL)
#if defined(_WIN32)
#define LOG4CXX_EOL LOG4CXX_STR("\x0D\x0A")
#else
#define LOG4CXX_EOL LOG4CXX_STR("\x0A")
#endif
#endif
#endif //_LOG4CXX_STRING_H
logstring.h has been 2 months old in cvs repository,
so it may be find, but what worng?
Thanks!
__________________________________
Discover Yahoo!
Stay in touch with email, IM, photo sharing and more. Check it out!
http://discover.yahoo.com/stayintouch.html