Hi Bill,

Thank you for the follow up.  I'm glad to hear that priority one is sorting out 
the build process.  There were two problems that I had run into.  The first was 
httpd's attempt to directly build expat via xml.mak which can be seen here:

httpd-2.4.29/Makefile.win
Line 429:
        cd srclib\apr-util\$(EXPAT)
         $(MAKE) $(MAKEOPT) -f xml.mak             CFG="xml - Win32 $(LONG)" 
RECURSE=0 $(CTARGET)

The second issue which I had run into was the necessity of passing 
XML_PARSER="libexpat" on the nmake command line.  This should fall within APR's 
realm and just needs a documentation note.  For getting the build running on 
Windows, I did the following:

1. copy the expat folder to srclib/apr-util/xml/expat
2. copy the xml.mak and xml.dep files from a prior build/older apr-util
3. copy libexpat.lib into srclib/apr-util (since this worked, I did not 
investigate if there was an alternative way to specify additional Link folders)
4. Specify XML_PARSER="libexpat" on the nmake command line for httpd:
        Nmake /f Makefile.win installr XML_PARSER="libexpat"
(running "Nmake /f Makefile.win installr" failed with an attempt by apr-util to 
link ".lib")

I hope this helps,
Steve Bush

-----Original Message-----
From: William A Rowe Jr [mailto:wr...@rowe-clan.net]
Sent: Thursday, November 09, 2017 1:20 PM
To: BUSH Steve
Cc: dev@apr.apache.org
Subject: Re: Building apr-util-1.6.1 within httpd on Windows: expat xml.mak 
missing

Hi Steve,

thank you for your observations and valid criticisms. I'm reviewing your use 
case right now.

I presume this is your use of httpd's Makefile.win, not your use of 
Makefile.win distributed with apr-util. Please correct me if I made a wrong 
assumption.

The underlying issue (which is not likely to be truly fixed until httpd-2.5 and
later) is that building httpd presumes it can build these independent 
components such as apr & apr-util (much like we used to do with pcre, expat, etc
etc.) But it
fails to use the APR project's build schema, leading to perpetual mismatches.

I'm already looking at correcting both apr and httpd behavior on 1.6.x and 
2.4.x, your report is really useful. That includes additional documentation. 
For the future httpd-2.5 evolution, delegating the apr and apr-util builds to 
those projects and avoiding mismatches due to httpd and apr being out of step 
of one another is priority one.

Thanks again,

Bill


On Wed, Nov 8, 2017 at 7:27 PM, BUSH Steve <steven.b...@3ds.com> wrote:
> Follow up:
>
>
>
> I was able to get a successful build.  After inspecting the various
> makefiles, I discovered that the default setting for XML_PARSER was
> not actually being set if it was not speciried in the nmake command
> line.  The comments within Makefile.win implied that “libexpat” was
> the default value if the setting had not been passed in, but running
> the build command as
>
> nmake /f Makefile.win installr XML_PARSER="libexpat"
>
> after copying libexpat.lib into the srclib\apr-util folder resulted in
> the build succeeding indicating that the default setting was not being
> utilized when not specified on the command line.
>
>
>
> It would be nice to update the APR documentation about this.  The
> blurb in the changelog was not helpful for windows builds and the
> comments within Makefile.win implied that leaving the XML_PARSER
> setting unspecified would use “libexpat” by default.
>
>
>
> Additionally, there seems to be a disconnect between the httpd build
> process and apr-util that has been exacerbated by unbundling expat.
>
> It is the httpd makefile that expects
> srclib\apr-util\xml\expat\lib\xml.mak
> to be present  and was causing the first error.
>
>
>
> Thanks,
>
> Steve
>
>
>
> From: BUSH Steve [mailto:steven.b...@3ds.com]
> Sent: Wednesday, November 08, 2017 4:36 PM
> To: dev@apr.apache.org
> Subject: Building apr-util-1.6.1 within httpd on Windows: expat
> xml.mak missing
>
>
>
> I’m trying to build 64-bit httpd-2.4.29 on Windows with apr-util-1.6.1
> and Visual Studio 2015 via command line nmake and I’m running into a
> problem with the expat unbundling from apr-util.
>
> Building with apr-util-1.5.4 works fine, but would prefer to not build
> with an older apr and apr-util.
>
>
>
> I downloaded the expat 2.2.0 source and copied into
> srclib\apr-util\xml\expat
>
> I also have a build of libexpat.lib (libexpat.dll), but I have no idea
> how to set up the folder structure/file location to take advantage of that.
>
>
>
> When building httpd, it is failing with ‘xml.mak’ not found:
>
>
>
>         cd srclib\apr-util\xml\expat\lib
>
>         "C:\Program Files (x86)\Microsoft Visual Studio
> 14.0\VC\BIN\amd64\nmake.
>
> exe" -nologo -f xml.mak             CFG="xml - Win32 Release" RECURSE=0
>
> NMAKE : fatal error U1052: file 'xml.mak' not found
>
> Stop.
>
>
>
> I tried to sort this out by copying the xml.mak from a prior
> apache/apr-util release into srclib\apr-util\xml\expat\lib, the expat
> portion of the build seems to proceed successfully, but apr-util still
> fails with this error during the link step:
>
>
>
>         rc.exe /l 0x409 /fo".\Release\libaprutil.res" /i "./include"
> /i "../apr/
>
> include" /d "NDEBUG" /d "APU_VERSION_ONLY" .\libaprutil.rc
>
> Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.17336
>
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
>
>
>         link.exe @C:\Users\build\AppData\Local\Temp\nm64F7.tmp
>
> LINK : fatal error LNK1181: cannot open input file '.lib'
>
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
> Studio
> 14.0
>
> \VC\BIN\amd64\link.exe"' : return code '0x49d'
>
> Stop.
>
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
> Studio
> 14.0
>
> \VC\BIN\amd64\nmake.exe"' : return code '0x2'
>
> Stop.
>
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
> Studio
> 14.0
>
> \VC\BIN\amd64\nmake.exe"' : return code '0x2'
>
> Stop.
>
>
>
> From the apr-util changelog, there is this:
>
>
>
> * The expat dependency of apr-util is no longer built with apr-util.
>
>      Install expat (including development headers and libraries) first
>
>      before building apr-util. [https://libexpat.github.io/]
>
>
>
> For Linux, that makes sense, but it’s not helpful for Windows since
> there isn’t the same concept of installing development headers and libraries.
>
>
>
> Is there documentation for the changes necessary for building on
> Windows with nmake?
>
>
>
> Thanks in advance,
>
> Steve Bush
>
> steve.b...@3ds.com
>
> This email and any attachments are intended solely for the use of the
> individual or entity to whom it is addressed and may be confidential
> and/or privileged.
>
> If you are not one of the named recipients or have received this email
> in error,
>
> (i) you should not read, disclose, or copy it,
>
> (ii) please notify sender of your receipt by reply email and delete
> this email and all attachments,
>
> (iii) Dassault Systemes does not accept or assume any liability or
> responsibility for any use of or reliance on this email.
>
> For other languages, go to http://www.3ds.com/terms/email-disclaimer
>
> This email and any attachments are intended solely for the use of the
> individual or entity to whom it is addressed and may be confidential
> and/or privileged.
>
> If you are not one of the named recipients or have received this email
> in error,
>
> (i) you should not read, disclose, or copy it,
>
> (ii) please notify sender of your receipt by reply email and delete
> this email and all attachments,
>
> (iii) Dassault Systemes does not accept or assume any liability or
> responsibility for any use of or reliance on this email.
>
> For other languages, go to http://www.3ds.com/terms/email-disclaimer
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systemes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.

For other languages, go to http://www.3ds.com/terms/email-disclaimer

Reply via email to