Loading...

log4cxx-dev@logging.apache.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: syslogappender patch for mingw Bob Rossi Mon Jan 01 00:03:49 2007

On Fri, Dec 29, 2006 at 11:18:28PM -0600, Curt Arnold wrote:
> 
> On Dec 29, 2006, at 6:10 PM, Bob Rossi wrote:
> 
> >On Mon, Dec 25, 2006 at 11:08:09PM -0500, Bob Rossi wrote:
> >>On Fri, Dec 15, 2006 at 09:33:12AM -0500, Bob Rossi wrote:
> >>>Hi,
> >>>
> >>>Here is a patch to get log4cxx to compile with mingw, using g+ 
> >>>+-4.1. Can
> >>>someone please apply this for me?
> >
> >This is a very simple patch. Can someone please review it?
> >
> >I recently switched from log4cpp to log4cxx because I thought log4cpp
> >was sort of a dead project. Anyone activily working on this project?
> >Anyone responsible for patch review?
> >
> >Thanks in advance!
> >Bob Rossi
> >
> 
> I committed a slightly different change in rev 491169.  I had spent  
> several hours today trying to get a working MinGW build going and  
> passing the unit tests so I wasn't applying a change in the dark.  I  
> did find a solution for LOGCXX-166, but it seems that that problem  
> must not occur with the 4.1 gcc you are using versus the 3.4.2 I'm  
> using.

You should use gcc 4.1. Apr, apr-util and expat build out-of-the-box
if you use svn trunk for apr and apr-util and expat official release
2.0.0. gcc 4.1 supports wchar_t and makes building log4cxx easy.

> I have run into several problems in APR on MinGW that I'm surprised  
> that you have not run into.  Again maybe it is due to the difference  
> in MinGW environments that we are using or changes between APR-1.2.7  
> and whatever source drop you are using.

Yes, it's not easy to build apr-1.2.7 with mingw 3.x series. Using svn
trunk and gcc 4.x is much easier.

> I had to remove a duplicate declaration of apr_wchar_t in include/ 
> arch/win32/apr_arch_file_io.h, add an include of "dce.h" to misc/ 
> win32/rand.c and tweak apr.hw.  I'll try to get those clean and  
> submit them as bug reports to APR.

Well, that's up to you, none of it is necessary if you use trunk and gcc
4.x.

> Even after that I'm still getting unresolved references when trying  
> to link either log4cxx.dll or the APR unit tests.  I can successfully  
> link tiny hello world programs that call the functions, so I know the  
> symbols are in the correct libraries, but I'm at a loss why they not  
> found when it counts.

I'm my own program just fine. However, what's the command to run the
unit tests for apr? I'll try that out.

> I tried reordering the -l options on the gcc command, but did not  
> seem to have any effect.
> 
> I guess I should see if the problem goes away with the version of  
> MinGW that you are using.

Yes, but it took hours for me to compile gcc 4.x. If you are going to
try it, let me know, I'll send you the configure && make options I used.
I can even upload the binary I have, it may work for you.

It would be possible for me to do builds of log4cxx with mingw every now
and then, especially before official releases. Is there a place where
beta's are announced, so that this can be done before official releases?

Bob Rossi