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 ti...@scubazone.co.za on 2005/06/08 17:31:25 UTC

build problem on solaris

Hi,
I am desperately struggling to build log4cxx on Solaris 9 with fairly
recent versions of automake/autoconf/libtool.

tiaan@dev:/export/home/tiaan/log4cxx-0.9.7$ 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


... changing to AC_PROG_LIBTOOL in configure.in ...


tiaan@dev:/export/home/tiaan/log4cxx-0.9.7$ 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


can you please help me to get it built.
thank you

RE: build problem on solaris

Posted by Chris Williams <ch...@yahoo.com>.
Here are the instructions I used to get the latest HEAD with CVS to compile
on Solaris.  Compiling on Solaris is very doable...

For those interested, here are the steps I took to compile logging-log4cxx
on Solaris 10.  This *might* work for those working on earlier versions of
Solaris.  I am using a stock Solaris 10 install with the Sun Freeware CD
installed which places a bunch of applications under /usr/sfw and /opt/sfw.
The version of gcc that I have installed is 3.4.2.

1) Downloaded and installed ant 1.6.3.
2) Fetch from CVS ant-contrib and built it.
3) Fetch from CVS cpptasks and built it.
4) I copied the jars from ant-contrib and cpptasks to the ant lib directory.
5) Download the expat package from www.sunfreeware.com and install it.
(/usr/local)
6) Download apr-1.1.0.  Run configure, make, and make install.
7) Download apr-util-1.1.0. Run configure with the following args:
--with-apr=/usr/local/apr --with-berkeley-db=/usr/local/BerkeleyDB.4.2
LDFLAGS="-R/opt/sfw/lib".  Then do a make and make install.
8) Download cppunit-1.10.2.  Run configure, make, and make install. 
9) Modified the build.xml to add <linkerarg value="-L/usr/local/lib"/> to
the following targets: build, build-example, build-socketserver,
build-unittest, build-standalone-unittest
10) Run ant -Dapr.dir=/usr/local/apr
-Dcppunit.dir=/export/disk10/cppProjects/cppunit-1.10.2 -Dlogchar=utf8
-Dhas.wchar_t=0



-----Original Message-----
From: Curt Arnold [mailto:carnold@apache.org] 
Sent: Friday, June 10, 2005 1:18 PM
To: Log4CXX User
Subject: Re: build problem on solaris




On Jun 10, 2005, at 9:10 AM, tiaan@scubazone.co.za wrote:


thank you for your help but after one day of suffering i am abandoning my
effort to compile it on Solaris with the workshop compiler. I probably am
doing something wrong somewhere but
ant -Dcompiler=CC
results in miles and miles of compiler errors. as far as I can gather it
does appear as if ant does not detect various aspects correctly e..g
sigwait taking only one argument and hundreds more such things.



Ant+cpptasks doesn't attempt to do any capability sniffing.  That is like
blaming make for a problem in configure.  log4cxx doesn't call sigwait
directly, so you are likely seeing an APR build problem, though maybe one
that is specific to how log4cxx builds APR.




i am very
dissapointed as I really wanted to use this on Solaris but I can only
conclude that if you are not an expert on ant and the likes, you will
never get it to compile. 



There appear to be several issues with log4cxx on Solaris.  Maybe some are
related to the use of ant but it appears that at least some of them are
related to other issues.  I've got an x86 Solaris media kit at home and one
of my to-do list items is to get a Solaris build machine up so I can knock
these down.




I am not even starting to talk to get it compiled
64-bit which is how I really have to compile it. the log4cxx community
would probably make some people very happy to get it working on Solaris as
easy as it is on Linux as the mailing lists does indicate a lot of
interrest on using it on Solaris.




I've added bug logcxx-92 (http://issues.apache.org/jira/browse/LOGCXX-92)
for this and marked it as blocking our next release 0.9.8.   Before 0.9.8,
we should have Solaris builds with both autotools or ant.


Re: build problem on solaris

Posted by Curt Arnold <ca...@apache.org>.
On Jun 10, 2005, at 9:10 AM, tiaan@scubazone.co.za wrote:

> thank you for your help but after one day of suffering i am  
> abandoning my
> effort to compile it on Solaris with the workshop compiler. I  
> probably am
> doing something wrong somewhere but
> ant -Dcompiler=CC
> results in miles and miles of compiler errors. as far as I can  
> gather it
> does appear as if ant does not detect various aspects correctly e..g
> sigwait taking only one argument and hundreds more such things.

Ant+cpptasks doesn't attempt to do any capability sniffing.  That is  
like blaming make for a problem in configure.  log4cxx doesn't call  
sigwait directly, so you are likely seeing an APR build problem,  
though maybe one that is specific to how log4cxx builds APR.


> i am very
> dissapointed as I really wanted to use this on Solaris but I can only
> conclude that if you are not an expert on ant and the likes, you will
> never get it to compile.

There appear to be several issues with log4cxx on Solaris.  Maybe  
some are related to the use of ant but it appears that at least some  
of them are related to other issues.  I've got an x86 Solaris media  
kit at home and one of my to-do list items is to get a Solaris build  
machine up so I can knock these down.


> I am not even starting to talk to get it compiled
> 64-bit which is how I really have to compile it. the log4cxx community
> would probably make some people very happy to get it working on  
> Solaris as
> easy as it is on Linux as the mailing lists does indicate a lot of
> interrest on using it on Solaris.


I've added bug logcxx-92 (http://issues.apache.org/jira/browse/ 
LOGCXX-92) for this and marked it as blocking our next release  
0.9.8.   Before 0.9.8, we should have Solaris builds with both  
autotools or ant.

Re: build problem on solaris

Posted by ti...@scubazone.co.za.
thank you for your help but after one day of suffering i am abandoning my
effort to compile it on Solaris with the workshop compiler. I probably am
doing something wrong somewhere but
ant -Dcompiler=CC
results in miles and miles of compiler errors. as far as I can gather it
does appear as if ant does not detect various aspects correctly e..g
sigwait taking only one argument and hundreds more such things. i am very
dissapointed as I really wanted to use this on Solaris but I can only
conclude that if you are not an expert on ant and the likes, you will
never get it to compile. I am not even starting to talk to get it compiled
64-bit which is how I really have to compile it. the log4cxx community
would probably make some people very happy to get it working on Solaris as
easy as it is on Linux as the mailing lists does indicate a lot of
interrest on using it on Solaris.

> You might want to try downloading the latest code from
> the CVS HEAD and build using the new ant build system.
>  I was able to build and run through the unit tests
> with gcc and sun studio 8 on solaris 10.  If you
> search the achives, I posted the steps I took to get
> the head running on Solaris.
>
> Chris
>
> --- tiaan@scubazone.co.za wrote:
>
>> Hi,
>> Thank you. I have just got it to compile by
>> installing the sources on a
>> Linux machine and generating the configure script
>> there so it probably
>> boils down to the same thing. I do get the feeling
>> that the package is not
>> stable at all on Solaris. The following core dumps
>> (I am new to log4cxx so
>> might be me making a mistake but the same works on
>> Linux)
>>
>> #include <log4cxx/logger.h>
>> #include <log4cxx/basicconfigurator.h>
>> #include <log4cxx/propertyconfigurator.h>
>> #include <log4cxx/helpers/exception.h>
>>
>> using namespace log4cxx;
>> using namespace log4cxx::helpers;
>>
>> LoggerPtr logger = Logger::getLogger(_T("MyApp"));
>>
>> int main(int argc, char **argv)
>> {
>>     int result = EXIT_SUCCESS;
>>     try
>>     {
>>         if (argc > 1)
>>         {
>>             // BasicConfigurator replaced with
>> PropertyConfigurator.
>>
>> PropertyConfigurator::configure(argv[1]);
>>         }
>>         else
>>         {
>>             BasicConfigurator::configure();
>>         }
>>
>>         LOG4CXX_FATAL(logger, "Entering
>> application.");
>>         LOG4CXX_FATAL(logger, "Exiting
>> application.");
>>     }
>>     catch(Exception&)
>>     {
>>         result = EXIT_FAILURE;
>>     }
>>
>>     return result;
>> }
>>
>> tiaan@dev:/export/home/tiaan/testlog$ ./test
>> You have tried to set a null level to root.
>> Segmentation Fault (core dumped)
>>
>> and also
>>
>> tiaan@dev:/export/home/tiaan/testlog$ ./test
>> socketServer1.properties
>> You have tried to set a null level to root.
>> Segmentation Fault (core dumped)
>>
>> Regards
>> Tiaan
>>
>>
>> > Hi,
>> >
>> > you can try using this package:
>> >
>> >
>>
> http://littletux.homelinux.org/debian/log4cxx/log4cxx_0.9.7.orig.tar.gz
>> >
>> > it is identical to log4cxx_0.9.7,tar.gz from the
>> apache site, but
>> > already contains the configure script so that it
>> can be built with
>> > the usual ./configure; make without calling
>> automake.
>> > I havent tried it on Solaris yet, if you have any
>> problems
>> > contact me, I have a Solaris 9 machine available
>> ...
>> >
>> > Regards,
>> >
>> > 	Andreas
>> >
>> > tiaan@scubazone.co.za wrote:
>> >> Hi,
>> >> I am desperately struggling to build log4cxx on
>> Solaris 9 with fairly
>> >> recent versions of automake/autoconf/libtool.
>> > [...]
>> >
>> >
>>
>>
>
>
>


Re: build problem on solaris

Posted by Chris Williams <ch...@yahoo.com>.
You might want to try downloading the latest code from
the CVS HEAD and build using the new ant build system.
 I was able to build and run through the unit tests
with gcc and sun studio 8 on solaris 10.  If you
search the achives, I posted the steps I took to get
the head running on Solaris.

Chris

--- tiaan@scubazone.co.za wrote:

> Hi,
> Thank you. I have just got it to compile by
> installing the sources on a
> Linux machine and generating the configure script
> there so it probably
> boils down to the same thing. I do get the feeling
> that the package is not
> stable at all on Solaris. The following core dumps
> (I am new to log4cxx so
> might be me making a mistake but the same works on
> Linux)
> 
> #include <log4cxx/logger.h>
> #include <log4cxx/basicconfigurator.h>
> #include <log4cxx/propertyconfigurator.h>
> #include <log4cxx/helpers/exception.h>
> 
> using namespace log4cxx;
> using namespace log4cxx::helpers;
> 
> LoggerPtr logger = Logger::getLogger(_T("MyApp"));
> 
> int main(int argc, char **argv)
> {
>     int result = EXIT_SUCCESS;
>     try
>     {
>         if (argc > 1)
>         {
>             // BasicConfigurator replaced with
> PropertyConfigurator.
>            
> PropertyConfigurator::configure(argv[1]);
>         }
>         else
>         {
>             BasicConfigurator::configure();
>         }
> 
>         LOG4CXX_FATAL(logger, "Entering
> application.");
>         LOG4CXX_FATAL(logger, "Exiting
> application.");
>     }
>     catch(Exception&)
>     {
>         result = EXIT_FAILURE;
>     }
> 
>     return result;
> }
> 
> tiaan@dev:/export/home/tiaan/testlog$ ./test
> You have tried to set a null level to root.
> Segmentation Fault (core dumped)
> 
> and also
> 
> tiaan@dev:/export/home/tiaan/testlog$ ./test
> socketServer1.properties
> You have tried to set a null level to root.
> Segmentation Fault (core dumped)
> 
> Regards
> Tiaan
> 
> 
> > Hi,
> >
> > you can try using this package:
> >
> >
>
http://littletux.homelinux.org/debian/log4cxx/log4cxx_0.9.7.orig.tar.gz
> >
> > it is identical to log4cxx_0.9.7,tar.gz from the
> apache site, but
> > already contains the configure script so that it
> can be built with
> > the usual ./configure; make without calling
> automake.
> > I havent tried it on Solaris yet, if you have any
> problems
> > contact me, I have a Solaris 9 machine available
> ...
> >
> > Regards,
> >
> > 	Andreas
> >
> > tiaan@scubazone.co.za wrote:
> >> Hi,
> >> I am desperately struggling to build log4cxx on
> Solaris 9 with fairly
> >> recent versions of automake/autoconf/libtool.
> > [...]
> >
> >
> 
> 


Re: build problem on solaris

Posted by ti...@scubazone.co.za.
Hi,
Thank you. I have just got it to compile by installing the sources on a
Linux machine and generating the configure script there so it probably
boils down to the same thing. I do get the feeling that the package is not
stable at all on Solaris. The following core dumps (I am new to log4cxx so
might be me making a mistake but the same works on Linux)

#include <log4cxx/logger.h>
#include <log4cxx/basicconfigurator.h>
#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/helpers/exception.h>

using namespace log4cxx;
using namespace log4cxx::helpers;

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

int main(int argc, char **argv)
{
    int result = EXIT_SUCCESS;
    try
    {
        if (argc > 1)
        {
            // BasicConfigurator replaced with PropertyConfigurator.
            PropertyConfigurator::configure(argv[1]);
        }
        else
        {
            BasicConfigurator::configure();
        }

        LOG4CXX_FATAL(logger, "Entering application.");
        LOG4CXX_FATAL(logger, "Exiting application.");
    }
    catch(Exception&)
    {
        result = EXIT_FAILURE;
    }

    return result;
}

tiaan@dev:/export/home/tiaan/testlog$ ./test
You have tried to set a null level to root.
Segmentation Fault (core dumped)

and also

tiaan@dev:/export/home/tiaan/testlog$ ./test socketServer1.properties
You have tried to set a null level to root.
Segmentation Fault (core dumped)

Regards
Tiaan


> Hi,
>
> you can try using this package:
>
> http://littletux.homelinux.org/debian/log4cxx/log4cxx_0.9.7.orig.tar.gz
>
> it is identical to log4cxx_0.9.7,tar.gz from the apache site, but
> already contains the configure script so that it can be built with
> the usual ./configure; make without calling automake.
> I havent tried it on Solaris yet, if you have any problems
> contact me, I have a Solaris 9 machine available ...
>
> Regards,
>
> 	Andreas
>
> tiaan@scubazone.co.za wrote:
>> Hi,
>> I am desperately struggling to build log4cxx on Solaris 9 with fairly
>> recent versions of automake/autoconf/libtool.
> [...]
>
>


Re: build problem on solaris

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

you can try using this package:

http://littletux.homelinux.org/debian/log4cxx/log4cxx_0.9.7.orig.tar.gz

it is identical to log4cxx_0.9.7,tar.gz from the apache site, but
already contains the configure script so that it can be built with
the usual ./configure; make without calling automake.
I havent tried it on Solaris yet, if you have any problems
contact me, I have a Solaris 9 machine available ...

Regards,

	Andreas

tiaan@scubazone.co.za wrote:
> Hi,
> I am desperately struggling to build log4cxx on Solaris 9 with fairly
> recent versions of automake/autoconf/libtool.
[...]