perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: httpd24 on Windows?
Date Tue, 05 Nov 2013 14:47:32 GMT
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.)


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

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.


> C:\Dev\Temp\build\httpd-2.4.6\build\win32\httpd.rc(40) : error RC2135 :
> file not
>  found: VERSIONINFO
>

What I have seen with rc is the snowballing of errors, which appears to
happen here.

OTOH, the UTF-8 issue from the stackoverflow link triggered file not found
everywhere.


> C:\Dev\Temp\build\httpd-2.4.6\build\win32\httpd.rc(41) : error RC2135 :
> file not
>  found: 4
>
> C:\Dev\Temp\build\httpd-2.4.6\build\win32\httpd.rc(42) : error RC2135 :
> file not
>  found: PRODUCTVERSION
> NMAKE : fatal error U1077: 'C:\PROGRA~2\MIA713~1\Windows\v7.0A\Bin\RC.Exe'
> : ret
> urn code '0x5'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
> Studio 10.0
> \VC\BIN\nmake.exe"' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
> Studio 10.0
> \VC\BIN\nmake.exe"' : return code '0x2'
> Stop.
>
> I will dig more later, but if anything springs to mind what might have
> gone wrong there I'd be grateful to hear.
>



-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Mime
View raw message