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 Thorsten Schöning <ts...@am-soft.de> on 2014/09/02 08:40:39 UTC

Re: Using VC6 on XP to build log4cxx from latest trunk [was Re: Status of log4cxx under Windows using VS 2010]

Guten Tag ToddA,
am Dienstag, 2. September 2014 um 06:13 schrieben Sie:

> 8. The steps at http://ant-contrib.sourceforge.net/ say to, "See the cc
> tasks for installation instructions for cpptasks." When I go to the link for
> 'cc' (http://ant-contrib.sourceforge.net/cpptasks/index.html) it says,
> "Place cpptasks.jar into Ant's classpath by placing in Ant's lib 
> directory..."

> But now I'm stuck because there is no cpptasks.jar in cpptasks-1.0b5.zip.

Use maven, it's easy to install as well and will download cpptasks
form a maven repository as Jar, else you might download it manually
form whatever source you like. But I would prefer using maven, that's
what I did as well.

http://mvnrepository.com/artifact/ant-contrib/cpptasks/1.0b5

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Mittwoch, 17. September 2014 um 03:20 schrieben Sie:

> This is discouraging. :(  In the research I had done, log4cxx kept turning up
> as recommended software and that it was compilable under VC6. I guess that must
> have been true of the latest stable release, 0.10.0. It doesn't sound like the
> newer/next release of log4cxx can be built under VC6 any more.

Regarding the logs, fallbackerrorhandler.h has not been touched since
0.10.0. And regarding ODBC, I guess you just need to deactivate it for
the build as I said before.

> I guess it's not
> too surprising since VC6 is pretty old. Oh well, I tried, and thanks very much
> for your help. I still want to try to use log4cxx since it is so highly
> recommended, I'll just have to try a newer version of VC.

Luckily we have the express editions these days. :-)

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Thorsten Schöning <tschoening <at> am-soft.de> writes:

> I guess the warnings there are because of your old compiler, that's
> something you need to fiddle on your own... The ODBC error may be
> removed using "with-ODBC=no", because the default behavior is "auto",
> which enables ODBC by default on Windows. The documentation is wrong
> in that part, I fixed that on trunk already but didn't update the
> site.
> 
> Regarding fallbackerrorhandler.h, I guess the problem here is with
> your old compiler as well, but have no idea right now. Have a look at
> the file and object.h for the cast macros and see if you somehow can
> get them working by rewriting or if they are needed at all...
> 


Hi Thorsten,

This is discouraging. :(  In the research I had done, log4cxx kept turning up 
as recommended software and that it was compilable under VC6. I guess that must 
have been true of the latest stable release, 0.10.0. It doesn't sound like the 
newer/next release of log4cxx can be built under VC6 any more. I guess it's not 
too surprising since VC6 is pretty old. Oh well, I tried, and thanks very much 
for your help. I still want to try to use log4cxx since it is so highly 
recommended, I'll just have to try a newer version of VC.



Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Montag, 8. September 2014 um 08:55 schrieben Sie:

> I thought I did. I provided a link to the complete compile log, with all
> errors, here: http://pastebin.com/zpKfm7i9

Sorry, I've missed the link. Regarding ODBC, it seems intptr_t is
missing and needs to be included from somewhere, MSDN suggests
stddef.h. I've implemented a workaround for a maybe similar problem
for C++ Builder, but just can't remember anymore if it was for the
same missing types. Doesn't matter, the important thing is that it's
only applied if C++ Builder is the chosen compile, therefore the
workaround may work for you as well. Search apr-util-build.xml for
"bcc-needs-stdint" and do what it does manually to the mentioned
header file, either with the included stated there or stddef.h or
where ever the missing type comes from. If that fixes some of the ODBC
compile errors we can think of a way to include this workaround in the
build as well.

> I did a search through my build folders apache-ant-1.9.4, apache-log4cxx-
> from-svn.140907, apache-maven-3.2.3, apr, apr-util and there is only one file
> that defines XMLPARSEAPI: apr-util\xml\expat\lib\expat.h

That's bad, you need to test that on your own using #ifdef ... and
#error in expat.h right before the macro gets defined there.

> To see if I could make some progress in getting log4cxx to build, I decided
> to temporarily disable ODBC by editing apr-util\include\apu.hw and setting
> APU_HAVE_ODBC to zero. Here's the complete log: http://pastebin.com/qcHmZX4f

I guess the warnings there are because of your old compiler, that's
something you need to fiddle on your own... The ODBC error may be
removed using "with-ODBC=no", because the default behavior is "auto",
which enables ODBC by default on Windows. The documentation is wrong
in that part, I fixed that on trunk already but didn't update the
site.

Regarding fallbackerrorhandler.h, I guess the problem here is with
your old compiler as well, but have no idea right now. Have a look at
the file and object.h for the cast macros and see if you somehow can
get them working by rewriting or if they are needed at all...

Sorry, but I don't have the time to look into this any more detailed.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Hi Thorsten,


> You need to provide all of the errors

I thought I did. I provided a link to the complete compile log, with all 
errors, here: http://pastebin.com/zpKfm7i9

Regarding the problem with XMLPARSEAPI:

> No idea currently, only found the following which suggests you are
> defining the same macro differently for some reason.

I did a search through my build folders apache-ant-1.9.4, apache-log4cxx-
from-svn.140907, apache-maven-3.2.3, apr, apr-util and there is only one file 
that defines XMLPARSEAPI: apr-util\xml\expat\lib\expat.h

If XMLPARSEAPI is being defined differently, it isn't by me that I know of, 
since I'm using expat.h as provided by apr-util. In fact, I have not even 
attempted to add my own code anywhere since I just want to get log4cxx 
compiled.

To see if I could make some progress in getting log4cxx to build, I decided 
to temporarily disable ODBC by editing apr-util\include\apu.hw and setting 
APU_HAVE_ODBC to zero. Here's the complete log: http://pastebin.com/qcHmZX4f

No error 2 anymore but now there are new and different error and warning 
messages. I highlighted them in yellow to make it easy to scroll to them.




Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Sonntag, 7. September 2014 um 20:14 schrieben Sie:

> 1) Multiple errors when building apr_dbd_odbc.c. Of course, odbc is one of
> the appenders I do want to use with log4cxx. :(

You need to provide all of the errors, ODBC should be activated by
default. There might be some problem with your old VC6, I guess only
few people are using it anymore. The build generates or edits some
header files as well, have a look around apu.h*. For some compilers,
like Borland C++ Builder, I had to change the build to include
stdint.h for example, maybe your are missing some headers as well.

> 2) Identical error when compiling xmlparse.c and apr_xml.c:
>        [cc] C:\Documents and Settings\taa\Desktop\project92\apr-
> util\xml\expat\lib\expat.h(83) : note C6311: unknown(0) : see previous
> definition of 'XMLPARSEAPI'

No idea currently, only found the following which suggests you are
defining the same macro differently for some reason.

http://stackoverflow.com/questions/2676822/how-do-i-inhibit-note-c6311-in-microsoft-c-compiler

> [ERROR] C:\Documents and
> Settings\taa\Desktop\project92\apache-log4cxx-from-
> svn.140907\src\ant\apr-util-build.xml:284: cl failed with return code 2

Error code 2 normally means a missing file somewhere, you may use
Process Monitor from Sysinternals to follow the build process and see
which file is missing or try "mvn -X ..." which generates a lot of
debug output.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Thorsten Schöning <tschoening <at> am-soft.de> writes:

> 
> Guten Tag ToddA,
> am Sonntag, 7. September 2014 um 02:32 schrieben Sie:
> 
> > I had used TortoiseSVN Repository Browser to download trunk and didn't
> > realize it would be incomplete.
> 
> It normally isn't, it doesn't matter which client or OS you use to
> checkout, you should always get the same content. Did you maybe only
> checkout "src" instead of trunk?
> 
> > Just to clarify, after I did 'svn checkout' on my Linux box I 
transferred
> > the etnire contents to Win XP. I'm still doing the build on Win XP and 
not
> > Linux.
> 
> That shouldn't be necessary and is unsupported by Subversion as well,
> you should avoid such things. Instead checkout using Tortoise again
> and double check the paths you select in the browser and get
> afterwards in your file system. I user Tortoise myself, there really
> is no problem with checking out trunk or whatever. I even checked out
> the whole directory structure with all tags and branches.
> 
> > [ERROR] C:\Documents and
> > Settings\taa\Desktop\project92\apache-log4cxx-from-
> > svn.140905\src\ant\common.xml:102: Execute failed: java.io.IOException:
> > Cannot run program "where": CreateProcess error=2, The system cannot 
find
> > the file specified
> [...]
> > Where do I get the program 'where'?
> 
> This is by default available on newer versions of Windows, so just buy
> a Windows 8 and get happy.  I removed the logic which used
> where.exe, it has been introduced to make the build usable with
> another compiler, but it looks as if this goal can't be reached with
> the current approach anyways. So update your trunk and give it another
> try.
> 
> https://issues.apache.org/jira/browse/LOGCXX-421
> 
> Mit freundlichen Grüßen,
> 
> Thorsten Schöning
> 


Hi Thorsten,

You're right -- I downloaded only src by mistake and not trunk so pom.xml 
was missing because of that.

I downloaded the latest trunk this morning and have new and different build 
errors. Complete log is here: http://pastebin.com/zpKfm7i9

Short version:

1) Multiple errors when building apr_dbd_odbc.c. Of course, odbc is one of 
the appenders I do want to use with log4cxx. :(

2) Identical error when compiling xmlparse.c and apr_xml.c:
       [cc] C:\Documents and Settings\taa\Desktop\project92\apr-
util\xml\expat\lib\expat.h(83) : note C6311: unknown(0) : see previous 
definition of 'XMLPARSEAPI'

3) Ending build errors:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-
plugin:1.7:run (compile) on project apache-log4cxx: An Ant BuildException 
has occured: The following error occurred while executing this line:
[ERROR] C:\Documents and Settings\taa\Desktop\project92\apache-log4cxx-from-
svn.140907\build.xml:644: The following error occurred while executing this 
line:
[ERROR] C:\Documents and Settings\taa\Desktop\project92\apache-log4cxx-from-
svn.140907\src\ant\apr-util-build.xml:284: cl failed with return code 2
[ERROR] around Ant part ...<ant target="build"/>... @ 4:24 in C:\Documents 
and Settings\taa\Desktop\project92\apache-log4cxx-from-
svn.140907\target\antrun\build-main.xml


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Sonntag, 7. September 2014 um 02:32 schrieben Sie:

> I had used TortoiseSVN Repository Browser to download trunk and didn't
> realize it would be incomplete.

It normally isn't, it doesn't matter which client or OS you use to
checkout, you should always get the same content. Did you maybe only
checkout "src" instead of trunk?

> Just to clarify, after I did 'svn checkout' on my Linux box I transferred
> the etnire contents to Win XP. I'm still doing the build on Win XP and not
> Linux.

That shouldn't be necessary and is unsupported by Subversion as well,
you should avoid such things. Instead checkout using Tortoise again
and double check the paths you select in the browser and get
afterwards in your file system. I user Tortoise myself, there really
is no problem with checking out trunk or whatever. I even checked out
the whole directory structure with all tags and branches.

> [ERROR] C:\Documents and
> Settings\taa\Desktop\project92\apache-log4cxx-from-
> svn.140905\src\ant\common.xml:102: Execute failed: java.io.IOException:
> Cannot run program "where": CreateProcess error=2, The system cannot find
> the file specified
[...]
> Where do I get the program 'where'?

This is by default available on newer versions of Windows, so just buy
a Windows 8 and get happy. ;-) I removed the logic which used
where.exe, it has been introduced to make the build usable with
another compiler, but it looks as if this goal can't be reached with
the current approach anyways. So update your trunk and give it another
try.

https://issues.apache.org/jira/browse/LOGCXX-421

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Just to clarify, after I did 'svn checkout' on my Linux box I transferred 
the etnire contents to Win XP. I'm still doing the build on Win XP and not 
Linux.


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Thorsten Schöning <tschoening <at> am-soft.de> writes:

> 
> Guten Tag ToddA,
> am Mittwoch, 3. September 2014 um 07:43 schrieben Sie:
> 
> > (I hope it's not
> > a problem that I'm using the latest version of Maven, 3.x, and not 2.x 
as
> > listed in this URL.)
> 
> No:
> 
> > C:\Users\tschoening>mvn --version
> > Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 
17:22:2
> > 2+0200)
> 
> > So a new dependency has surfaced: Where do I get the necessary POM file?
> 
> pom.xml is the file and needed and should be contained in your
> checkout, depending on what you checked out exactly you might just be
> in the wrong path. You need to execute maven directly from the
> directory containing pom.xml, should be trunk.
> 
> Mit freundlichen Grüßen,
> 
> Thorsten Schöning
> 


Hi Thorsten,

I had used TortoiseSVN Repository Browser to download trunk and didn't 
realize it would be incomplete. I did an 'svn checkout' on my Linux box to 
get a brand new copy of trunk as of Sep 5, 2014. Now 'mvn package' gets a 
lot further, but now it gives a build failure with the following message:

-----

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-
plugin:1.7:run (compile) on project apache-log4cxx: An Ant BuildException 
has occured: The following error occurred while executing this line:

[ERROR] C:\Documents and Settings\taa\Desktop\project92\apache-log4cxx-from-
svn.140905\src\ant\common.xml:102: Execute failed: java.io.IOException: 
Cannot run program "where": CreateProcess error=2, The system cannot find 
the file specified

[ERROR] around Ant part ...<ant target="build"/>... @ 4:24 in C:\Documents 
and Settings\taa\Desktop\project92\apache-log4cxx-from-
svn.140905\target\antrun\build-main.xml

-----

Where do I get the program 'where'?


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Mittwoch, 3. September 2014 um 07:43 schrieben Sie:

> (I hope it's not
> a problem that I'm using the latest version of Maven, 3.x, and not 2.x as
> listed in this URL.)

No:

> C:\Users\tschoening>mvn --version
> Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:2
> 2+0200)

> So a new dependency has surfaced: Where do I get the necessary POM file?

pom.xml is the file and needed and should be contained in your
checkout, depending on what you checked out exactly you might just be
in the wrong path. You need to execute maven directly from the
directory containing pom.xml, should be trunk.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Thorsten Schöning <tschoening <at> am-soft.de> writes:

> 
> Guten Tag ToddA,
> am Dienstag, 2. September 2014 um 06:13 schrieben Sie:
> 
> > 8. The steps at http://ant-contrib.sourceforge.net/ say to, "See the cc
> > tasks for installation instructions for cpptasks." When I go to the link 
for
> > 'cc' (http://ant-contrib.sourceforge.net/cpptasks/index.html) it says,
> > "Place cpptasks.jar into Ant's classpath by placing in Ant's lib 
> > directory..."
> 
> > But now I'm stuck because there is no cpptasks.jar in cpptasks-
1.0b5.zip.
> 
> Use maven, it's easy to install as well and will download cpptasks
> form a maven repository as Jar, else you might download it manually
> form whatever source you like. But I would prefer using maven, that's
> what I did as well.
> 
> http://mvnrepository.com/artifact/ant-contrib/cpptasks/1.0b5
> 
> Mit freundlichen Grüßen,
> 
> Thorsten Schöning
> 


Hi again Thorsten,

I appreciate your patience as I work through all these dependencies.

I downloaded and extracted the latest stable version of Maven:

     C:\Documents and Settings\taa>mvn --version
     Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-
11T13:58:10-07:00)
     Maven home: C:\Documents and Settings\taa\Desktop\project92\apache-
maven-3.2.3
     Java version: 1.8.0_20, vendor: Oracle Corporation
     Java home: C:\Program Files\Java\jdk1.8.0_20\jre
     Default locale: en_US, platform encoding: Cp1252
     OS name: "windows xp", version: "5.1", arch: "x86", family: "dos"

I'm now attempting to follow your advice to use Maven and perform the steps 
here: http://logging.apache.org/log4cxx/building/maven.html (I hope it's not 
a problem that I'm using the latest version of Maven, 3.x, and not 2.x as 
listed in this URL.)

Following the steps under "Building and testing log4cxx on a Microsoft 
Windows with APR and APR-Util built from source," Maven is complaining there 
is no POM file. Full log is here: http://pastebin.com/3b76Dmby

I tried doing 'mvn clean' but it gave the same "missing POM" error.

So a new dependency has surfaced: Where do I get the necessary POM file?