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 John Reynolds <Jo...@flightman.com> on 2005/09/20 12:38:22 UTC

Build problems

On RedHat Enterprise Linux 3, I get the following build problem with
Andreas Fester tarball (from littletux.net) using due to @ problems I
have with CVS-HEAD.
 
Any ideas (I want to evaluate if I should use log4cxx for a project as
already use log4j)
 
./configure -prefix=/usr -with-apr=/usr -with-apr-util=/usr
-with-logchar=wchar_t
 
make[3]: Leaving directory
`/usr/src/johnr/log4cxx-0.9.8/tests/src/helpers'
Making all in net
make[3]: Entering directory `/usr/src/johnr/log4cxx-0.9.8/tests/src/net'
if 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_SWPRINTF=1 -DHAVE_SYSLOG=1 -DHAVE_PTHREAD=1
-DHAVE_THREAD=1 -DHAVE_GETHOSTBYNAME=1 -DHAVE_SETSOCKOPT=1
-DHAVE_LIBXML2=1 -DHAVE_XML=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_FTIME=1
-DHAVE_SETENV=1 -DHAVE_MBSNRTOWCS=1 -DHAVE_WCSNRTOMBS=1  -I. -I.
-I../../../include -I../../../include  -DLOG4CXX   -DLINUX=2
-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE  -I/usr/include/apr-1
-I/usr/include/apr-1  -D_REENTRANT  -g -O2 -MT socketservertestcase.o
-MD -MP -MF ".deps/socketservertestcase.Tpo" \
  -c -o socketservertestcase.o `test -f 'socketservertestcase.cpp' ||
echo './'`socketservertestcase.cpp; \
then mv -f ".deps/socketservertestcase.Tpo"
".deps/socketservertestcase.Po"; \
else rm -f ".deps/socketservertestcase.Tpo"; exit 1; \
fi
socketservertestcase.cpp: In constructor
   `ShortSocketServerLauncher::ShortSocketServerLauncher()':
socketservertestcase.cpp:115: `::fork' undeclared (first use here)
socketservertestcase.cpp:117: `::execl' undeclared (first use here)
socketservertestcase.cpp:124: `sleep' undeclared (first use this
function)
socketservertestcase.cpp:124: (Each undeclared identifier is reported
only once
   for each function it appears in.)
make[3]: *** [socketservertestcase.o] Error 1
 
Many Thanks 
John

Re: Build problems

Posted by Andreas Fester <An...@gmx.de>.
Hi,

I do not have a RHE available, and I can not reproduce the issue
on Debian GNU/Linux. However, the man page for fork() sais that

#include <sys/types.h>
#include <unistd.h>

is necessary, and maybe it is indirectly included on my system.
execl() and sleep() also need unistd.h, so I would try
to add the above #includes to socketservertestcase.cpp and try again.

Otherwise, these are "only" the unit tests, so the library itself
should already been built.

Regards,

	Andreas

John Reynolds wrote:
> On RedHat Enterprise Linux 3, I get the following build problem with
[...]
> socketservertestcase.cpp:115: `::fork' undeclared (first use here)
> socketservertestcase.cpp:117: `::execl' undeclared (first use here)
> socketservertestcase.cpp:124: `sleep' undeclared (first use this
[...]

-- 
Andreas Fester
mailto:andreas@littletux.net
WWW: http://www.littletux.net
ICQ: 326674288