Return-Path: X-Original-To: apmail-perl-dev-archive@www.apache.org Delivered-To: apmail-perl-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0C7571069F for ; Tue, 5 Nov 2013 18:34:41 +0000 (UTC) Received: (qmail 30993 invoked by uid 500); 5 Nov 2013 18:34:40 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 30946 invoked by uid 500); 5 Nov 2013 18:34:40 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 30939 invoked by uid 99); 5 Nov 2013 18:34:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Nov 2013 18:34:40 +0000 X-ASF-Spam-Status: No, hits=3.7 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,MISSING_HEADERS,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of trawick@gmail.com designates 209.85.215.54 as permitted sender) Received: from [209.85.215.54] (HELO mail-la0-f54.google.com) (209.85.215.54) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Nov 2013 18:34:34 +0000 Received: by mail-la0-f54.google.com with SMTP id n7so3831634lam.27 for ; Tue, 05 Nov 2013 10:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=2nUvZ7rZd0daHhNevLy9QoZLaNTY0YpxJHc14WnVpjA=; b=QDtfJyBo3uOeF5MfWilK3aGXkx9b/3+KGM6QhIXHgmGK7xninNIfbAuKyDmFralIMv a0Abyp0sBrG6ORijllMDvJb1Qz++FM999BxjgjdS16dOBz4hZJ4zcvZIZEBbUdhtl0lp k5omprFzWwHsqrRpCa34U6fKO9hDkPCOs9mswasux0mnwJAhyp1trJMf1CzmOf3IuLej h98X2wwkpxjLAR6ipTisXlKx45vBdNLooAT/9iQ/qFaDzg38sqsPqTJks0/ZDisYzB9K FBtlT3d5JfPQFhS2+d5GzW0BGwLbHp2NoeqY3015ca7a8C+h/VS/hsxx3LXX1VGs4G8s NexA== MIME-Version: 1.0 X-Received: by 10.152.37.229 with SMTP id b5mr128983lak.53.1383676452551; Tue, 05 Nov 2013 10:34:12 -0800 (PST) Received: by 10.114.187.71 with HTTP; Tue, 5 Nov 2013 10:34:12 -0800 (PST) In-Reply-To: References: <5239812D.4040906@redhat.com> <52398EF8.2070506@redhat.com> <526FA19B.6050504@redhat.com> <5270E889.7070001@redhat.com> Date: Tue, 5 Nov 2013 13:34:12 -0500 Message-ID: Subject: Re: httpd24 on Windows? From: Jeff Trawick Cc: dev@perl.apache.org Content-Type: multipart/alternative; boundary=089e0141a74e7040b504ea7247d3 X-Virus-Checked: Checked by ClamAV on apache.org --089e0141a74e7040b504ea7247d3 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 5, 2013 at 1:19 PM, Steve Hay wrote: > On 5 November 2013 14:47, Jeff Trawick wrote: > > On Tue, Nov 5, 2013 at 9:23 AM, Steve Hay > > wrote: > >> > >> On 5 November 2013 13:08, Jeff Trawick wrote: > >> > On Tue, Nov 5, 2013 at 7:37 AM, Steve Hay > > >> > wrote: > >> >> A set of overlays for 2.4.6, apr 1.4.8 and apu 1.5.2 would be great. > >> > > >> > > >> > > >> > http://people.apache.org/~trawick/cmake-for-steve.zip > >> > (the enclosed patches are needed only if you want to run the apr or > >> > apr-util > >> > test suites from an out of source build tree, which is usual for > cmake) > >> > > >> > http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/README.cmake > >> > http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/README.cmake > >> > http://svn.apache.org/viewvc/httpd/httpd/trunk/README.cmake > >> > > >> > > >> > I have some other notes at http://people.apache.org/~trawick/cmake/ > >> > but the makefile there is probably too complex to see the gist of it. > >> > > >> > PCRE includes cmake support already. > >> > > >> > Snippets to roll into a makefile or script: > >> > > >> > PREFIX = $(HOME)\httpd > >> > CMAKE_BUILD_TYPE = Debug > >> > > >> > CMAKE_BASE_OPTS = -DCMAKE_INSTALL_PREFIX=$(PREFIX) -G "NMake > Makefiles" > >> > -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) > >> > > >> > APR_CMAKE_OPTS = $(CMAKE_BASE_OPTS) -DAPR_INSTALL_PRIVATE_H=ON > >> > APRUTIL_CMAKE_OPTS = $(CMAKE_BASE_OPTS) > >> > PCRE_CMAKE_OPTS = $(CMAKE_BASE_OPTS) -DBUILD_SHARED_LIBS=on > >> > HTTPD_CMAKE_OPTS = $(CMAKE_BASE_OPTS) -DENABLE_MODULES=a > >> > > >> > cd builddir\pcre > >> > cmake $(PCRE_CMAKE_OPTS) /path/to/pcre-8.33 > >> > nmake && nmake install > >> > cd ..\.. > >> > > >> > cd builddir\apr > >> > cmake $(APR_CMAKE_OPTS) /path/to/apr-1.4.8+overlays > >> > nmake && nmake install > >> > cd ..\.. > >> > > >> > cd builddir\apr-util > >> > cmake $(APRUTIL_CMAKE_OPTS) /path/to/apr-util-1.5.2+overlays > >> > nmake && nmake install > >> > cd ..\.. > >> > > >> > cd builddir\httpd > >> > cmake $(HTTPD_CMAKE_OPTS) /path/to/httpd-2.4.6+overlays > >> > nmake && nmake install > >> > cd ..\.. > >> > > >> > (In my attempts to simplify this from my more complex Makefiles that > >> > handle > >> > a number of variations, I may have omitted something.) > >> > >> Thanks for that. I've given it a try as follows: > >> > >> - Extracted httpd-2.4.6.tar.gz into C:\Dev\Temp\build > >> - Extracted httpd-2.4.6-deps.tar.gz over the top of it > >> - Extracted apr-iconv-1.2.1-win32-src-r2.zip into C:\Dev\Temp\build > >> and renamed apr-iconv-1.2.1 to apr-iconv [Will this actually get built > >> by the CMake build system anyway?] > > > > > > No, apr-iconv won't get built. There's no CMake build system for that > > project yet. (Does mod_perl need apr-iconv on Windows? If so, I need to > > get busy. The only httpd-related feature I know of that needs apr-iconv > is > > mod_charset_lite.) > > Ok. I'm not sure if mod_perl needs it or not. The only references I see to apr_xlate APIs (which need apr-iconv on Windows) are in Apache2::FunctionTable. I've always built with > it on Windows because I've always used the Makefile.win to build (up > to 2.2.x) and it does this if you haven't got apr-iconv: > The old build has no logic to say "no apr-iconv; that's okay as long as you don't tell me I must build mod_charset_lite". > > D:\temp\httpd-2.2.25>nmake /f Makefile.win INSTDIR=D:\temp\apache installr > > Microsoft (R) Program Maintenance Utility Version 10.00.30319.01 > Copyright (C) Microsoft Corporation. All rights reserved. > > Please check out or download and unpack the Apache Portability Runtime > sources (apr, apr-iconv and apr-util) into your srclib dir. > Apache cannot build without these libraries! > > Makefile.win(71) : fatal error U1050: Need srclib\ apr, apr-iconv and > apr-util > Stop. > > It was just easier to add it (or leave it, in the -win32-src zips) > rather than try to fight that. I suspect mod_perl doesn't specifically > require it, but I will let you know if it turns out otherwise (when I > hopefully get 2.4.6 building...). > > > > > >> > >> - Copied the apr, apr-util and httpd overlay files over the top of > >> C:\Dev\Temp\build\httpd-2.4.6\srclib\apr, > >> C:\Dev\Temp\build\httpd-2.4.6\srclib\apr and > >> C:\Dev\Temp\build\httpd-2.4.6 > >> - Set up a VC++ 2010 + CMake environment > >> > >> and then did the following in C:\Dev\Temp\build: > >> > >> cd pcre > >> cmake -DCMAKE_INSTALL_PREFIX=C:\Dev\Temp\apache -G "NMake Makefiles" > >> -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=on > >> C:\Dev\Temp\build\httpd-2.4.6\srclib\pcre > >> nmake && nmake install > >> [All ok] > >> > >> cd ..\apr > >> cmake -DCMAKE_INSTALL_PREFIX=C:\Dev\Temp\apache -G "NMake Makefiles" > >> -DCMAKE_BUILD_TYPE=Debug -DAPR_INSTALL_PRIVATE_H=on > >> C:\Dev\Temp\build\httpd-2.4.6\srclib\apr > >> nmake && nmake install > >> [All ok] > >> > >> cd ..\apr-util > >> cmake -DCMAKE_INSTALL_PREFIX=C:\Dev\Temp\apache -G "NMake Makefiles" > >> -DCMAKE_BUILD_TYPE=Debug C:\Dev\Temp\build\httpd-2.4.6\srclib\apr-util > >> nmake && nmake install > >> [All ok] > >> > >> cd ..\httpd-2.4.6 > >> cmake -DCMAKE_INSTALL_PREFIX=C:\Dev\Temp\apache -G "NMake Makefiles" > >> -DCMAKE_BUILD_TYPE=Debug -DENABLE_MODULES=a > >> C:\Dev\Temp\build\httpd-2.4.6 > >> nmake && nmake install > >> [...] > >> [ 20%] Building RC object > CMakeFiles/libhttpd.dir/build/win32/httpd.rc.res > >> Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385 > >> Copyright (C) Microsoft Corporation. All rights reserved. > >> > >> Linking C shared library libhttpd.dll > >> Creating library libhttpd.lib and object libhttpd.exp > >> [ 20%] Built target libhttpd > >> Scanning dependencies of target httpd > >> [ 20%] Building C object CMakeFiles/httpd.dir/server/main.c.obj > >> main.c > >> [ 20%] Building RC object CMakeFiles/httpd.dir/build/win32/httpd.rc.res > >> Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385 > >> Copyright (C) Microsoft Corporation. All rights reserved. > >> > >> > >> C:\Dev\Temp\build\httpd-2.4.6\build\win32\httpd.rc(34) : error RC2135 : > >> file not > >> found: C:/Dev/Temp/build/httpd > > > > > > I think I did something once to get file not found errors like those > > described in > > > http://stackoverflow.com/questions/15244065/error-rc2135-in-c-project-due-to-utf-8-encoding-of-rc-file > > > > Line 34 is in the middle of > > > > #ifdef ICON_FILE > > 1 ICON DISCARDABLE ICON_FILE > > #endif > > > > When building httpd.exe, ICON_FILE is defined as > > > > -DICON_FILE=${CMAKE_SOURCE_DIR}/build/win32/apache.ico > > > > You might disable the ifdef (ifdef ICONF_FILEXXX) to see if the error is > > specific to the ICON_FILE setting. > > That did the trick. I'll worry about it more later, but for now simply > disabling that #ifdef lets the build run to completion. Thanks for > your help with that. > > > > > > I'm picking up rc.exe from C:\Program Files (x86)\Windows > > Kits\8.0\bin\(machine), which I suppose was installed by VS 2010 or 2012. > > > > If I understand your notes correctly, your build dir is the same as your > > source dir. I've never tried that. It is great to have separate ones > > because cmake build artifacts may be tricky to clean up when you can't > "rm > > -rf" or equivalent. > > Yes, I was inadvertently doing that for httpd. I've separated its > source and build now. (That alone didn't make any difference to the > #ifdef trouble above, though.) > -- Born in Roswell... married an alien... http://emptyhammock.com/ --089e0141a74e7040b504ea7247d3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Nov 5, 2013 at 1:19 PM, Steve Hay <steve= .m.hay@googlemail.com> wrote:
<= div class=3D"gmail_quote">
On 5= November 2013 14:47, Jeff Trawick <trawick@gmail.com> wrote:
> On Tue, Nov 5, 2013 at 9:23 AM, Steve Hay <steve.m.hay@googlemail.com>
> wrote:
>>
>> On 5 November 2013 13:08, Jeff Trawick <trawick@gmail.com> wrote:
>> > On Tue, Nov 5, 2013 at 7:37 AM, Steve Hay <steve.m.hay@googlemail.com>
>> > wrote:
>> >> A set of overlays for 2.4.6, apr 1.4.8 and apu 1.5.2 woul= d be great.
>> >
>> >
>> >
>> > http://people.apache.org/~trawick/cmake-for-steve.zi= p
>> > (the enclosed patches are needed only if you want to run the = apr or
>> > apr-util
>> > test suites from an out of source build tree, which is usual = for cmake)
>> >
>> > http://svn.apache.org/viewvc/apr/apr/bran= ches/1.5.x/README.cmake
>> > http://svn.apache.org/viewvc/apr/apr= -util/branches/1.5.x/README.cmake
>> > http://svn.apache.org/viewvc/httpd/httpd/trunk= /README.cmake
>> >
>> >
>> > I have some other notes at http://people.apache.org/~trawick/cmak= e/
>> > but the makefile there is probably too complex to see the gis= t of it.
>> >
>> > PCRE includes cmake support already.
>> >
>> > Snippets to roll into a makefile or script:
>> >
>> > PREFIX =3D $(HOME)\httpd
>> > CMAKE_BUILD_TYPE =3D Debug
>> >
>> > CMAKE_BASE_OPTS =3D -DCMAKE_INSTALL_PREFIX=3D$(PREFIX) -G &qu= ot;NMake Makefiles"
>> > -DCMAKE_BUILD_TYPE=3D$(CMAKE_BUILD_TYPE)
>> >
>> > APR_CMAKE_OPTS =3D $(CMAKE_BASE_OPTS) -DAPR_INSTALL_PRIVATE_H= =3DON
>> > APRUTIL_CMAKE_OPTS =3D $(CMAKE_BASE_OPTS)
>> > PCRE_CMAKE_OPTS =3D $(CMAKE_BASE_OPTS) -DBUILD_SHARED_LIBS=3D= on
>> > HTTPD_CMAKE_OPTS =3D $(CMAKE_BASE_OPTS) -DENABLE_MODULES=3Da<= br> >> >
>> > cd builddir\pcre
>> > cmake $(PCRE_CMAKE_OPTS) /path/to/pcre-8.33
>> > nmake && nmake install
>> > cd ..\..
>> >
>> > cd builddir\apr
>> > cmake $(APR_CMAKE_OPTS) /path/to/apr-1.4.8+overlays
>> > nmake && nmake install
>> > cd ..\..
>> >
>> > cd builddir\apr-util
>> > cmake $(APRUTIL_CMAKE_OPTS) /path/to/apr-util-1.5.2+overlays<= br> >> > nmake && nmake install
>> > cd ..\..
>> >
>> > cd builddir\httpd
>> > cmake $(HTTPD_CMAKE_OPTS) /path/to/httpd-2.4.6+overlays
>> > nmake && nmake install
>> > cd ..\..
>> >
>> > (In my attempts to simplify this from my more complex Makefil= es that
>> > handle
>> > a number of variations, I may have omitted something.)
>>
>> Thanks for that. I've given it a try as follows:
>>
>> - Extracted httpd-2.4.6.tar.gz into C:\Dev\Temp\build
>> - Extracted httpd-2.4.6-deps.tar.gz over the top of it
>> - Extracted apr-iconv-1.2.1-win32-src-r2.zip into C:\Dev\Temp\buil= d
>> and renamed apr-iconv-1.2.1 to apr-iconv [Will this actually get b= uilt
>> by the CMake build system anyway?]
>
>
> No, apr-iconv won't get built. =A0There's no CMake build syste= m for that
> project yet. =A0(Does mod_perl need apr-iconv on Windows? =A0If so, I = need to
> get busy. =A0The only httpd-related feature I know of that needs apr-i= conv is
> mod_charset_lite.)

Ok. I'm not sure if mod_perl needs it or not.
=

The only references I see to apr_xlate APIs (which need= apr-iconv on Windows) are in Apache2::FunctionTable.

I've always built with
it on Windows because I've always used the Makefile.win to build (up to 2.2.x) and it does this if you haven't got apr-iconv:

The old build has no logic to say "no apr-iconv;= that's okay as long as you don't tell me I must build mod_charset_= lite".
=A0

D:\temp\httpd-2.2.25>nmake /f Makefile.win INSTDIR=3DD:\temp\apache inst= allr

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. =A0All rights reserv= ed.

Please check out or download and unpack the Apache Portability Runtim= e
sources (apr, apr-iconv and apr-util) into your srclib dir.
Apache cannot build without these libraries!

Makefile.win(71) : fatal error U1050: Need srclib\ =A0apr, apr-iconv and ap= r-util
Stop.

It was just easier to add it (or leave it, in the -win32-src zips)
rather than try to fight that. I suspect mod_perl doesn't specifically<= br> require it, but I will let you know if it turns out otherwise (when I
hopefully get 2.4.6 building...).


>
>>
>> - Copied the apr, apr-util and httpd overlay files over the top of=
>> C:\Dev\Temp\build\httpd-2.4.6\srclib\apr,
>> C:\Dev\Temp\build\httpd-2.4.6\srclib\apr and
>> C:\Dev\Temp\build\httpd-2.4.6
>> - Set up a VC++ 2010 + CMake environment
>>
>> and then did the following in C:\Dev\Temp\build:
>>
>> cd pcre
>> cmake -DCMAKE_INSTALL_PREFIX=3DC:\Dev\Temp\apache -G "NMake M= akefiles"
>> -DCMAKE_BUILD_TYPE=3DDebug -DBUILD_SHARED_LIBS=3Don
>> C:\Dev\Temp\build\httpd-2.4.6\srclib\pcre
>> nmake && nmake install
>> [All ok]
>>
>> cd ..\apr
>> cmake -DCMAKE_INSTALL_PREFIX=3DC:\Dev\Temp\apache -G "NMake M= akefiles"
>> -DCMAKE_BUILD_TYPE=3DDebug -DAPR_INSTALL_PRIVATE_H=3Don
>> C:\Dev\Temp\build\httpd-2.4.6\srclib\apr
>> nmake && nmake install
>> [All ok]
>>
>> cd ..\apr-util
>> cmake -DCMAKE_INSTALL_PREFIX=3DC:\Dev\Temp\apache -G "NMake M= akefiles"
>> -DCMAKE_BUILD_TYPE=3DDebug C:\Dev\Temp\build\httpd-2.4.6\srclib\ap= r-util
>> nmake && nmake install
>> [All ok]
>>
>> cd ..\httpd-2.4.6
>> cmake -DCMAKE_INSTALL_PREFIX=3DC:\Dev\Temp\apache -G "NMake M= akefiles"
>> -DCMAKE_BUILD_TYPE=3DDebug -DENABLE_MODULES=3Da
>> C:\Dev\Temp\build\httpd-2.4.6
>> nmake && nmake install
>> [...]
>> [ 20%] Building RC object CMakeFiles/libhttpd.dir/build/win32/http= d.rc.res
>> Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385=
>> Copyright (C) Microsoft Corporation. =A0All rights reserved.
>>
>> Linking C shared library libhttpd.dll
>> =A0 =A0Creating library libhttpd.lib and object libhttpd.exp
>> [ 20%] Built target libhttpd
>> Scanning dependencies of target httpd
>> [ 20%] Building C object CMakeFiles/httpd.dir/server/main.c.obj >> main.c
>> [ 20%] Building RC object CMakeFiles/httpd.dir/build/win32/httpd.r= c.res
>> Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385=
>> Copyright (C) Microsoft Corporation. =A0All rights reserved.
>>
>>
>> C:\Dev\Temp\build\httpd-2.4.6\build\win32\httpd.rc(34) : error RC2= 135 :
>> file not
>> =A0found: C:/Dev/Temp/build/httpd
>
>
> I think I did something once to get file not found errors like those > described in
> http://stack= overflow.com/questions/15244065/error-rc2135-in-c-project-due-to-utf-8-enco= ding-of-rc-file
>
> Line 34 is in the middle of
>
> #ifdef ICON_FILE
> 1 ICON DISCARDABLE ICON_FILE
> #endif
>
> When building httpd.exe, ICON_FILE is defined as
>
> =A0-DICON_FILE=3D${CMAKE_SOURCE_DIR}/build/win32/apache.ico
>
> You might disable the ifdef (ifdef ICONF_FILEXXX) to see if the error = is
> specific to the ICON_FILE setting.

That did the trick. I'll worry about it more later, but for= now simply
disabling that #ifdef lets the build run to completion. Thanks for
your help with that.


>
> I'm picking up rc.exe from C:\Program Files (x86)\Windows
> Kits\8.0\bin\(machine), which I suppose was installed by VS 2010 or 20= 12.
>
> If I understand your notes correctly, your build dir is the same as yo= ur
> source dir. =A0I've never tried that. =A0It is great to have separ= ate ones
> because cmake build artifacts may be tricky to clean up when you can&#= 39;t "rm
> -rf" or equivalent.

Yes, I was inadvertently doing that for httpd. I've separated its=
source and build now. (That alone didn't make any difference to the
#ifdef trouble above, though.)



--
Born in Rosw= ell... married an alien...
http://emptyhammock.com/
--089e0141a74e7040b504ea7247d3--