logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiong, Wei (Wei)" <wxi...@lucent.com>
Subject RE: Help: I find it's too hard to build log4cxx on Solaris.
Date Mon, 18 Oct 2004 06:24:11 GMT
In fact, I get into trouble when I run ./autogen.sh. So it must none of
business of the compiler. Maybe it's caused by the lack of some necessary
application (or they do not work properly). But what may be it? I am
confused.
 
Bill David
2004.10.18
 
-----Original Message-----
From: renny.koshy@rubixinfotech.com [mailto:renny.koshy@rubixinfotech.com]
Sent: Friday, October 15, 2004 9:50 PM
To: Log4CXX User
Cc: carnold@apache.org; cdevienne@apache.org;
log4cxx-user@logging.apache.org; mcatan@apache.org
Subject: Re: Help: I find it's too hard to build log4cxx on Solaris.




I'm surprised.... I followed the directions, and it built without any
problems on the first try...  Solaris 8 (Intel/Sparc)... of course I"m using
Forte compilers... 

Renny Koshy
President & CEO

--------------------------------------------
RUBIX Information Technologies, Inc.
www.rubixinfotech.com 



	"Xiong, Wei (Wei)" <wxiong@lucent.com> 


10/15/2004 06:04 AM 
Please respond to "Log4CXX User" 


        
        To:        log4cxx-user@logging.apache.org 
        cc:        mcatan@apache.org, carnold@apache.org,
cdevienne@apache.org 
        Subject:        Help: I find it's too hard to build log4cxx on
Solaris.



Hi, Everybody,

I want to have a study on log4cxx 0.9.7. But I find it's too hard to build
log4cxx on Solaris. I don't know why  the authors do not publish a ordinary
configure or makefile, but I think many programmers including me will be
very appreciated if they do so.

I follow the INSTALL guide and run ./autogen.sh on my Solaris 9 x86. But
many errors occur and stop me from try log4cxx. The following is the output:

david@billdavid>./autogen.sh
/usr/local/share/aclocal/cppunit.m4:4: warning: underquoted definition of
AM_PATH_CPPUNIT
 run info '(automake)Extending aclocal'
 or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:32: /usr/local/bin/m4: ERROR: Reading inserted file: No such
file or directory
autom4te: /usr/local/bin/m4 failed with exit status: 1
aclocal: autom4te failed with exit status: 1
autoheader: error: AC_CONFIG_HEADERS not found in configure.in
configure.in:21: error: possibly undefined macro: AM_CONFIG_HEADER
     If this token and others are legitimate, please use m4_pattern_allow.
     See the Autoconf documentation.
configure.in:27: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.in:32: error: possibly undefined macro: AM_PROG_LIBTOOL
configure.in:86: error: possibly undefined macro: AM_CONDITIONAL
configure.in: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.in: You should verify that configure.in invokes AM_INIT_AUTOMAKE,
configure.in: that aclocal.m4 is present in the top-level directory,
configure.in: and that aclocal.m4 was recently regenerated (using aclocal).
configure.in: installing `./install-sh'
configure.in: installing `./missing'
docs/Makefile.am:6: DOC does not appear in AM_CONDITIONAL
docs/Makefile.am:22: LATEX_DOC does not appear in AM_CONDITIONAL
examples/Makefile.am: installing `./depcomp'
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL
src/Makefile.am:1: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:1:
src/Makefile.am:1: The usual way to define `LIBTOOL' is to add
`AC_PROG_LIBTOOL'
src/Makefile.am:1: to `configure.in' and run `aclocal' and `autoconf' again.
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL
tests/Makefile.am:4: TESTS does not appear in AM_CONDITIONAL
tests/src/Makefile.am:6: TESTS does not appear in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL
tests/src/customlogger/Makefile.am:4: TESTS does not appear in
AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL
tests/src/defaultinit/Makefile.am:3: TESTS does not appear in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL
tests/src/helpers/Makefile.am:3: TESTS does not appear in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL
tests/src/net/Makefile.am:4: TESTS does not appear in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in 
AM_CONDITIONAL
tests/src/pattern/Makefile.am:4: TESTS does not appear in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL
tests/src/util/Makefile.am:4: TESTS does not appear in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL
tests/src/varia/Makefile.am:3: TESTS does not appear in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL
tests/src/xml/Makefile.am:4: TESTS does not appear in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: am__fastdepCXX does not appear
in AM_CONDITIONAL
/usr/local/share/automake-1.9/am/depend2.am: AMDEP does not appear in
AM_CONDITIONAL

I do not know well about autoconf, so I don't know how to solve this
problem.
I have installed the following programs on my computer:
GNU m4 1.4.1
autoconf (GNU Autoconf) 2.59
automake (GNU automake) 1.9.1
gcc 3.4.2
(GNU libtool) 1.5.10
cppunit 1.10.2
libxml2 2.6.4 (I found it need libxml2 when I try to write a makefile for
it, so I installed it)
I don't know if they are enough to build log4cxx.
I tried to write a makefile and added a config_auto.h by myself. I
successfully build the .a file, but when I compile the following program, I
failed.

// My program
#include <log4cxx/logger.h>
#include <log4cxx/basicconfigurator.h>
#include <log4cxx/helpers/exception.h>
#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/xml/domconfigurator.h>
#include <log4cxx/helpers/loglog.h>

using namespace log4cxx;
using namespace log4cxx::helpers;
using namespace log4cxx::xml;

LoggerPtr logger = Logger::getLogger(_T("MyApp"));

class Bar
{
       static log4cxx::LoggerPtr logger;

public:
       void doIt();
};


LoggerPtr Bar::logger = Logger::getLogger(_T("MyApp"));

void Bar::doIt()
{
       logger->debug(_T("Did it again!"));
}


int main(int argc, char **argv)
{
      int result = EXIT_SUCCESS;

      try
      {
              DOMConfigurator::configure(argv[1]);

              logger->info(_T("Entering application."));
              Bar bar;
              bar.doIt();
              logger->info(_T("Exiting application."));
      }
      catch(Exception&)
      {
              result = EXIT_FAILURE;
      }

      return result;
}

// build
david@billdavid>make -f log4cxx.mak
g++ -g -o log4cxxtest -I../research/log4cxx-0.9.7/include
-L../research/log4cxx-0.9.7/lib -llog4cxx log4cxxtest.cpp
log4cxxtest.cpp:10: error: expected namespace-name before ';' token
log4cxxtest.cpp:10: error: `<type error>' is not a namespace
log4cxxtest.cpp: In function `int main(int, char**)':
log4cxxtest.cpp:37: error: `DOMConfigurator' has not been declared
log4cxxtest.cpp:37: error: `configure' undeclared (first use this function)
log4cxxtest.cpp:37: error: (Each undeclared identifier is reported only once
for
each function it appears in.)
make: *** [all] Error 1

How could gcc can't parse the line 10:
using namespace log4cxx::xml;
I am puzzled.
(notes: I build the above program on Windows successfully and get the right
result.)

Eager for any help from anyone who saw this mail. Thank you.

Bill David
Oct. 15 2004





Mime
View raw message