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 Tommi Mäkitalo <to...@epgmbh.de> on 2004/12/11 23:11:26 UTC
build-problem
Hi,
I tried to compile the CVS-version, but run into a minor problem and a big
problem.
The minor problem was, that there is a missign '\' in
tests/src/helpers/Makefile.am. Here is the diff:
Index: tests/src/helpers/Makefile.am
===================================================================
RCS file: /home/cvspublic/logging-log4cxx/tests/src/helpers/Makefile.am,v
retrieving revision 1.5
diff -r1.5 Makefile.am
15c15
< optionconvertertestcase.cpp
---
> optionconvertertestcase.cpp \
The larger problem is log4cxx/string.h.
The result is a compile-error starting:
g++ -DHAVE_CONFIG_H -I. -I. -I../include/log4cxx -I../include -I../include
-I/u
sr/local/apr/include/apr-1 -I/usr/include/libxml2 -DLOG4CXX -D_REENTRANT -g
-O2
-MT appenderattachableimpl.lo -MD -MP -MF .deps/appenderattachableimpl.Tpo -c
ap
penderattachableimpl.cpp -fPIC -DPIC -o .libs/appenderattachableimpl.o
In file included from /usr/include/c++/3.3/bits/char_traits.h:45,
from /usr/include/c++/3.3/string:47,
from ../include/log4cxx/string.h:20,
from ../include/log4cxx/spi/appenderattachable.h:20,
from ../include/log4cxx/helpers/appenderattachableimpl.h:20,
from appenderattachableimpl.cpp:17:
/usr/include/c++/3.3/cstring:79: error: `memcpy' not declared
/usr/include/c++/3.3/cstring:80: error: `memmove' not declared
/usr/include/c++/3.3/cstring:81: error: `strcpy' not declared
/usr/include/c++/3.3/cstring:82: error: `strncpy' not declared
I have linux (SuSE 9.2 x86-64) with gcc 3.3.
Autoconf/automake defines the compilerflag "-I../include/log4cxx".
When /usr/include/c++/3.3/cstring tries to include /usr/include/string.h with
"#include <string.h>" to get the definition of memcpy et al, g++ includes
log4cxx/string.h. That's why memcpy stays undefined.
The reason, why this is defined is that this config_auto.h is defined there.
When I move config_auto.h.in to include/log4cxx-config_auto.h.in and redefine
it in configure.in, the compilerflags disappears and the build-process go on
until "appenderskeleton.cpp:24:24: apr_atomic.h: No such file or directory".
But that's another story.
Tommi
Re: build-problem
Posted by Curt Arnold <ca...@apache.org>.
Tommi Mäkitalo wrote:
>Hi,
>
>I tried to compile the CVS-version, but run into a minor problem and a big
>problem.
>
>The minor problem was, that there is a missign '\' in
>tests/src/helpers/Makefile.am. Here is the diff:
>
>
>The larger problem is log4cxx/string.h.
>
>
>
Thanks for the feedback. I had added the missing backslash and have
renamed <log4cxx/string.h> to <log4cxx/logstring.h> to avoid conflicts
with the C RTL's string.h if include/log4cxx is on the include path.
At the present time, I expect that only the ant build using GCC will
work and only if you use the same apr locations that I did in my
development machine. Sorry if I didn't make that clear in my earlier
message. However, you should be able to gauge the changes necessary to
compile applications that use log4cxx applications without actually
building log4cxx.