perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hay <steve.m....@googlemail.com>
Subject Re: httpd24 on Windows?
Date Tue, 05 Nov 2013 18:19:31 GMT
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 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. 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:

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.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message