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 Brendon Costa <bc...@avdat.com.au> on 2005/02/16 01:05:01 UTC
Compiling on NetBSD and MSYS
Hi,
I am having problems compiling the log4cxx latest release (0.9.7) in
either MSYS or NetBSD. I noticed that there were a few posts before
about compiling on a BSD system, and someone made a patch to do so. Has
this patch been merged into a 0.9.7 release? If so, is there any chance
of releasing the tarball that includes it? As for the MSYS problem, well
i just thought i would post this message and see if there are any
solutions out there for getting this to work.
Thanks, Brendon.
-----------------------------------------------------------------------
When compiling on NetBSD, i get the following error messages:
bcosta@tb4:~/ideas/log4cxx-0.9.7$make
Making all in docs
Making all in src
if /bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H
-I. -I. -I../include/log4cxx -I../include -I/usr/pkg/include/libxml2
-D_REENTRANT -g -O2 -MT appenderattachableimpl.lo -MD -MP -MF
".deps/appenderattachableimpl.Tpo" -c -o appenderattachableimpl.lo
appenderattachableimpl.cpp; then mv -f
".deps/appenderattachableimpl.Tpo"".deps/appenderattachableimpl.Plo";
else rm -f ".deps/appenderattachableimpl.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I../include/log4cxx -I../include
-I/usr/pkg/include/libxml2 -D_REENTRANT -g -O2 -MT
appenderattachableimpl.lo -MD -MP -MF .deps/appenderattachableimpl.Tpo
-c appenderattachableimpl.cpp -fPIC -DPIC -o .libs/appenderattachableimpl.o
In file included from appenderattachableimpl.cpp:17:
../include/log4cxx/helpers/tchar.h: In static member function `static void
Convert::int64ToString(wchar_t*, unsigned int, const __int64_t&)':
../include/log4cxx/helpers/tchar.h:50: error: `swprintf' undeclared
(first use
this function)
../include/log4cxx/helpers/tchar.h:50: error: (Each undeclared identifier is
reported only once for each function it appears in.)
In file included from appenderattachableimpl.cpp:17:
../include/log4cxx/helpers/tchar.h:87:28: alloca.h: No such file or
directory
*** Error code 1
Stop.
make: stopped in /home/bcosta/ideas/log4cxx-0.9.7/src
*** Error code 1
Stop.
make: stopped in /home/bcosta/ideas/log4cxx-0.9.7
-----------------------------------------------------------------------
and when i tried in MSYS i got this message:
$ make
Making all in docs
make[1]: Entering directory `/c/dev/log4cxx-0.9.7/docs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/c/dev/log4cxx-0.9.7/docs'
Making all in src
make[1]: Entering directory `/c/dev/log4cxx-0.9.7/src'
if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I.
-I../include/log4cxx -I../include -g -O2 -MT
appenderattachableimpl.lo -MD -MP -MF ".deps/appenderattachableimpl.Tpo" \
-c -o appenderattachableimpl.lo `test -f 'appenderattachableimpl.cpp'
|| echo './'`appenderattachableimpl.cpp; \
then mv ".deps/appenderattachableimpl.Tpo"
".deps/appenderattachableimpl.Plo"; \
else rm -f ".deps/appenderattachableimpl.Tpo"; exit 1; \
fi
g++ -DHAVE_CONFIG_H -I. -I. -I../include/log4cxx -I../include -g -O2
-MT appenderattachableimpl.lo -MD -MP -MF
.deps/appenderattachableimpl.Tpo -c appenderattachableimpl.cpp
-DDLL_EXPORT -DPIC -o .libs/appenderattachableimpl.o
In file included from appenderattachableimpl.cpp:17:
../include/log4cxx/helpers/tchar.h:45: parse error before `&' token
../include/log4cxx/helpers/tchar.h:54: parse error before `&' token
../include/log4cxx/helpers/tchar.h:55: `static void
Convert::int64ToString(...)
' and `static void Convert::int64ToString(...)' cannot be overloaded
../include/log4cxx/helpers/tchar.h: In static member function `static void
Convert::int64ToString(...)':
../include/log4cxx/helpers/tchar.h:48: `dst' undeclared (first use this
function)
../include/log4cxx/helpers/tchar.h:48: (Each undeclared identifier is
reported
only once for each function it appears in.)
../include/log4cxx/helpers/tchar.h:48: `maxlen' undeclared (first use this
function)
../include/log4cxx/helpers/tchar.h:48: `ll' undeclared (first use this
function)
../include/log4cxx/helpers/tchar.h: At global scope:
../include/log4cxx/helpers/tchar.h:68: parse error before `&' token
../include/log4cxx/helpers/tchar.h:69: `std::basic_ostream<_CharT,
_Traits>&
std::operator<<(...)' must have an argument of class or enumerated type
../include/log4cxx/helpers/tchar.h:69: `std::basic_ostream<_CharT,
_Traits>&
std::operator<<(...)' must take exactly two arguments
In file included from appenderattachableimpl.cpp:20:
../include/log4cxx/spi/loggingevent.h:109: ISO C++ forbids declaration of `
int64_t' with no type
../include/log4cxx/spi/loggingevent.h:109: parse error before `(' token
../include/log4cxx/spi/loggingevent.h: In member function `const
log4cxx::LevelPtr& log4cxx::spi::LoggingEvent::getLevel() const':
../include/log4cxx/spi/loggingevent.h:93: `level' undeclared (first use
this
function)
../include/log4cxx/spi/loggingevent.h: In member function `const
log4cxx::String& log4cxx::spi::LoggingEvent::getMessage() const':
../include/log4cxx/spi/loggingevent.h:100: `message' undeclared (first
use this
function)
../include/log4cxx/spi/loggingevent.h: At global scope:
../include/log4cxx/spi/loggingevent.h:114: ISO C++ forbids defining types
within return type
../include/log4cxx/spi/loggingevent.h:114: long, short, signed or unsigned
invalid for `getThreadId'
../include/log4cxx/spi/loggingevent.h:114: non-member function `
log4cxx::spi::LoggingEvent log4cxx::spi::getThreadId()' cannot have
`const'
method qualifier
../include/log4cxx/spi/loggingevent.h:114: semicolon missing after
declaration
of `class log4cxx::spi::LoggingEvent'
../include/log4cxx/spi/loggingevent.h: In function `int
log4cxx::spi::getThreadId()':
../include/log4cxx/spi/loggingevent.h:114: `threadId' undeclared (first use
this function)
../include/log4cxx/spi/loggingevent.h: At global scope:
../include/log4cxx/spi/loggingevent.h:117: syntax error before `(' token
../include/log4cxx/spi/loggingevent.h:122: non-member function `char*
log4cxx::getFile()' cannot have `const' method qualifier
../include/log4cxx/spi/loggingevent.h: In function `char*
log4cxx::getFile()':
../include/log4cxx/spi/loggingevent.h:122: `file' undeclared (first use
this
function)
../include/log4cxx/spi/loggingevent.h: At global scope:
../include/log4cxx/spi/loggingevent.h:126: non-member function `int
log4cxx::getLine()' cannot have `const' method qualifier
../include/log4cxx/spi/loggingevent.h: In function `int log4cxx::getLine()':
../include/log4cxx/spi/loggingevent.h:126: `line' undeclared (first use
this
function)
../include/log4cxx/spi/loggingevent.h: At global scope:
../include/log4cxx/spi/loggingevent.h:133: non-member function `const
log4cxx::String& log4cxx::getNDC()' cannot have `const' method qualifier
../include/log4cxx/spi/loggingevent.h:136: non-member function `void
log4cxx::write(log4cxx::helpers::SocketOutputStreamPtr&)' cannot have
`const
' method qualifier
../include/log4cxx/spi/loggingevent.h:138: non-member function `void
log4cxx::writeLevel(log4cxx::helpers::SocketOutputStreamPtr&)' cannot
have `
const' method qualifier
../include/log4cxx/spi/loggingevent.h:158: non-member function
`log4cxx::String
log4cxx::getMDC(const log4cxx::String&)' cannot have `const' method
qualifier
../include/log4cxx/spi/loggingevent.h:167: non-member function `
std::set<log4cxx::String, std::less<log4cxx::String>,
std::allocator<log4cxx::String> > log4cxx::getMDCKeySet()' cannot have `
const' method qualifier
../include/log4cxx/spi/loggingevent.h:173: non-member function `void
log4cxx::getMDCCopy()' cannot have `const' method qualifier
../include/log4cxx/spi/loggingevent.h:178: non-member function
`log4cxx::String
log4cxx::getProperty(const log4cxx::String&)' cannot have `const' method
qualifier
../include/log4cxx/spi/loggingevent.h:185: non-member function `
std::set<log4cxx::String, std::less<log4cxx::String>,
std::allocator<log4cxx::String> > log4cxx::getPropertyKeySet()'
cannot have
`const' method qualifier
../include/log4cxx/spi/loggingevent.h:192: parse error before `public'
../include/log4cxx/spi/loggingevent.h:245: 'int64_t' is used as a type,
but is
not defined as a type.
../include/log4cxx/spi/loggingevent.h:248: `char*log4cxx::file' used
prior to
declaration
../include/log4cxx/spi/loggingevent.h:252: `int log4cxx::line' used
prior to
declaration
../include/log4cxx/spi/loggingevent.h:259: syntax error before `;' token
../include/log4cxx/spi/loggingevent.h:261: parse error before `}' token
make[1]: *** [appenderattachableimpl.lo] Error 1
make[1]: Leaving directory `/c/dev/log4cxx-0.9.7/src'
make: *** [all-recursive] Error 1
Re: Compiling on NetBSD and MSYS
Posted by Curt Arnold <ca...@apache.org>.
On Feb 16, 2005, at 12:01 PM, Aaron Walker wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Curt Arnold wrote:
>
>> The autoconf-based build is broken for Debian and BSD systems. There
>> has been discussions on the list but nobody has stepped up to
>> volunteer
>> to revamp it and I'm a novice with regard to it. I've logged a bug
>> (http://issues.apache.org/jira/browse/LOGCXX-43) on this and added
>> this
>> as a blocker for the 0.9.8 release. It will have to be done before an
>> 0.9.8 release, but if I'm not going to take it on until I've run out
>> of
>> other tasks that need attention and then I would likely beg one
>> another
>> group for help.
>
> What exactly needs fixing for Debian/BSD systems? I'd be more than
> glad to
> provide a patch if I can figure out exactly what's broken.
I think the major problem is that it requires a later version of
autoconf than is installed by default on most Debian or FreeBSD
systems. The configure scripts could likely be radically simplified
since the migration to Apache Portable Runtime since log4cxx no longer
needs to know, for example, if pthread is available or not since that
is hidden by the use of APR. The only things that I think would be
useful to detect for log4cxx are whether mbsnrtowcs and wcsnrtombs are
available, detecting an integer type that is the same size as a pointer
and whether std::wcout and std::wcerr are available.
There is also no longer any need to be prefixed with LOG4CXX_ since the
config file are no longer included in any of the log4cxx header files
but only used in the implementation. I think their is support for
--with-apr but maybe not --with-apu. I don't think the check target
builds and runs the unit tests.
>
> On BSD, the biggest cause of pains is the fact that you guys don't
> distribute
> the tarball with configure, etc already generated like most packages.
> Just
> doing this would solve a lot of headaches for folks that haven't
> messed with it
> before on BSD. IIRC, the only other thing that's broken on BSD is the
> missing
> HAVE_ALLOCA_H check in tchars.h, but like you said you're ditching
> that.
Would you recommend generating the configure from autoconf and
including it in the distribution or skipping autoconf completely?
>
> The only other thing I know of off the top of my head that needs fixing
> configure-wise, is a few checks that don't work as they should. The
> one I know
> for sure is the unicode check. While --enable-unicode works as it
> should,
> - --disable-unicode does not.
>
0.9.7 was designed to support either the default multibyte encoding or
wide chars. The current CVS HEAD can support both simultaneously. The
code has been designed so that either wchar_t or UTF-8 encoding could
be used as the internal character representation, however only the
support code for wchar_t has been implemented. So instead of
--enable-unicode, the switch should be somethink like
--use-encoding=[wchar_t utf-8] or --use-utf8=[false true]
Re: Compiling on NetBSD and MSYS
Posted by Aaron Walker <ka...@gentoo.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Curt Arnold wrote:
> The autoconf-based build is broken for Debian and BSD systems. There
> has been discussions on the list but nobody has stepped up to volunteer
> to revamp it and I'm a novice with regard to it. I've logged a bug
> (http://issues.apache.org/jira/browse/LOGCXX-43) on this and added this
> as a blocker for the 0.9.8 release. It will have to be done before an
> 0.9.8 release, but if I'm not going to take it on until I've run out of
> other tasks that need attention and then I would likely beg one another
> group for help.
What exactly needs fixing for Debian/BSD systems? I'd be more than glad to
provide a patch if I can figure out exactly what's broken.
On BSD, the biggest cause of pains is the fact that you guys don't distribute
the tarball with configure, etc already generated like most packages. Just
doing this would solve a lot of headaches for folks that haven't messed with it
before on BSD. IIRC, the only other thing that's broken on BSD is the missing
HAVE_ALLOCA_H check in tchars.h, but like you said you're ditching that.
The only other thing I know of off the top of my head that needs fixing
configure-wise, is a few checks that don't work as they should. The one I know
for sure is the unicode check. While --enable-unicode works as it should,
- --disable-unicode does not.
Cheers
- --
<cas> Mercury: gpm isn't a very good web browser. fix it.
Aaron Walker <ka...@gentoo.org>
[ BSD | cron | forensics | shell-tools | commonbox | netmon | vim | web-apps ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCE4qEC3poscuANHARAvOMAKC4ekYohISwy+EPdA/p/89jP9XYPgCgx/Ay
ZAhaWa5UMhHaMD51haQO284=
=ludr
-----END PGP SIGNATURE-----
Re: Compiling on NetBSD and MSYS
Posted by Curt Arnold <ca...@apache.org>.
On Feb 15, 2005, at 6:05 PM, Brendon Costa wrote:
> Hi,
>
> I am having problems compiling the log4cxx latest release (0.9.7)
> in either MSYS or NetBSD. I noticed that there were a few posts before
> about compiling on a BSD system, and someone made a patch to do so.
> Has this patch been merged into a 0.9.7 release? If so, is there any
> chance of releasing the tarball that includes it? As for the MSYS
> problem, well i just thought i would post this message and see if
> there are any solutions out there for getting this to work.
>
> Thanks, Brendon.
>
At the present, we are trying to get the CVS HEAD to the point that we
can retire 0.9.7. If you have any choice in the matter, I would
strongly recommend using the CVS HEAD since you would be able to
contribute to the rest of the community as we try to get the CVS HEAD
ready for an 0.9.8 release. The current CVS has substantial
modifications so experiences with 0.9.7 are not much help.
The autoconf-based build is broken for Debian and BSD systems. There
has been discussions on the list but nobody has stepped up to volunteer
to revamp it and I'm a novice with regard to it. I've logged a bug
(http://issues.apache.org/jira/browse/LOGCXX-43) on this and added this
as a blocker for the 0.9.8 release. It will have to be done before an
0.9.8 release, but if I'm not going to take it on until I've run out of
other tasks that need attention and then I would likely beg one another
group for help.
The Ant based build does work with Visual C++, Borland C++ on Windows
and with gcc on Linux and Mac OS/X. I've attempted to set up FreeBSD
on Virtual PC to test the Ant build on that platform, but haven't seen
it through to completion.
The Ant build requires Ant 1. 6.1 or later and the CVS HEAD versions of
ant-contrib and cpptasks (http://ant-contrib.sourceforge.net) and a
Java VM. If you have a network connection, the initial ant build will
download Apache Portable Runtime modules from an mirror and place it in
the lib directory or you can also manually place apr-1.1.0.tar.gz,
apr-util-1.1.0.tar.gz and apr-iconv-1.0.1.tar.gz in that directory or
specify the location of installed versions.
I have MinGW as the next Windows compiler to get working with the Ant
build. I haven't tested it yet.