- install activeperl x64 if you haven’t done yet
- get the source from trunk
C:\build\>svn checkout https://svn.apache.org/repos/asf/perl/modperl /trunk/ mod_perl-2.0
- configure it
C:\build\mod_perl-2.0>perl Makefile.PL MP_AP_PREFIX=C:\Apache22
- nmake
- nmake test
- nmake install
- edit your httpd.conf ;-)
Category: apache
Compile openssl windows 64 bit
Sadly there is no asm available for 64 bit on windows. That makes openssl minimal slower than with asm, but there is the native 64 bit binary :-)
perl Configure VC-WIN64A --prefix=/Apache22 --openssldir=/Apache22/conf enable-camellia disable-idea
ms\do_win64a
nmake -f ms\ntdll.mak
REM remove md2 and idea test
nmake -f ms\ntdll.mak test
compile zlib 1.2.4 on 64 bit Windows command line
nmake -f win32\Makefile.msc
compile zlib 1.2.4 on Windows command line
cd contrib\masmx86 bld_ml32 cd ..\.. ML /coff /Zi /c contrib\masmx86\match686.asm NMAKE -f win32\Makefile.msc LOC="-D_CRT_SECURE_NO_DEPRECATE /wd4996 -DASMV" OBJA="match686.obj" MT -manifest zlib1.dll.manifest -outputresource:zlib1.dll;2
remove /MACHINE:X86 from make files with php
I use PHP on the command line cause I know it the syntax better than any other scriting language and it works on linux and windows. This is about removing the x86 to be able to build apache in x64 (64 bit) on windows.
<?php $files=array( "srclib/apr/libapr.mak", "srclib/apr-iconv/build/modules.mk.win", "srclib/apr-iconv/libapriconv.mak", "srclib/apr-util/dbd/apr_dbd_freetds.mak", "srclib/apr-util/dbd/apr_dbd_mysql.mak", "srclib/apr-util/dbd/apr_dbd_odbc.mak", "srclib/apr-util/dbd/apr_dbd_oracle.mak", "srclib/apr-util/dbd/apr_dbd_pgsql.mak", "srclib/apr-util/dbd/apr_dbd_sqlite2.mak", "srclib/apr-util/dbd/apr_dbd_sqlite3.mak", "srclib/apr-util/dbm/apr_dbm_db.mak", "srclib/apr-util/dbm/apr_dbm_gdbm.mak", "srclib/apr-util/ldap/apr_ldap.mak", "srclib/apr-util/libaprutil.mak" ); foreach($files as $file){ if(file_exists($file)){ echo "Replace in: ". $file ."\n\r"; file_put_contents($file,str_ireplace(" /MACHINE:X86","",file_get_contents($file))); } else { echo "FAILED: ". $file ."\n\r"; } } ?>
Compile apache from the source on Windows
Needed tools
- VC 2008 Express (Installer Compiler and Express SDK) [silverlight & sql server not needed]
- Perl 5.8 or newer
- GNU Tools
- NASM
Sources
- apache unix source code
- apr-iconv
- openssl [lastest] stable
- zlib 1.2.3
Unix sources require a couple steps to prep source first. Once they are untarred on the hard drive.
create a folder.
C:\builds
extract apache sourcecode into it.
e.g.
C:\builds\httpd-2.2.14
unpack zlib-1.2.3.tar.gz and move it into C:\builds\httpd-2.2.14\srclib\zlib
unpack apr-iconv-1.2.1.tar.gz and move it intoC:\builds\httpd-2.2.14\srclib\apr-iconv
unpackopenssl-0.9.8l.tar.gz and move it into C:\builds\httpd-2.2.14\srclib\openssl
open cmd
cd \
cd builds\httpd*
“C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat”
del /s /q *.sln *.vcproj*
srclib\apr\build\lineends.pl
zip -R dsps.zip “*.dsp” “*.dsw”
unzip -a -o dsps.zip
srclib\apr\build\cvtdsp.pl -2005
cd srclib\zlib
ML /coff /Zi /c contrib\masm686\match.asm
NMAKE -f win32\Makefile.msc LOC=”-D_CRT_SECURE_NO_DEPRECATE /wd4996 -DASMV” OBJA=”match.obj”
MT -manifest zlib1.dll.manifest -outputresource:zlib1.dll;2
cd ../..
cd srclib\openssl
perl Configure VC-WIN32 –prefix=/Apache22 –openssldir=/Apache22/conf enable-camellia disable-idea
ms\do_nasm
nmake /f ms\ntdll.mak
—
edit test.bat remove md2 and idea test
—
nmake /f ms\ntdll.mak test
close the console.
Open Apache.dsw with VS8/VS9 and answer “Yes to All” to the “convert projects” question
Close the Apache.dsw solution in VS8/VS9 and open Apache.sln
Select relase win32
Now build InstallBin
Test your build
Archive for category apache
Archives by Month:
- December 2024
- November 2024
- October 2024
- August 2024
- April 2024
- January 2024
- December 2023
- November 2023
- July 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- October 2022
- September 2022
- August 2022
- July 2022
- May 2022
- March 2022
- February 2022
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- February 2021
- January 2021
- August 2020
- July 2020
- June 2020
- April 2020
- January 2020
- December 2019
- November 2019
- October 2019
- May 2019
- April 2019
- March 2019
- January 2019
- October 2018
- August 2018
- June 2018
- April 2018
- March 2018
- February 2018
- November 2017
- June 2017
- April 2017
- February 2017
- January 2017
- November 2016
- September 2016
- May 2016
- February 2016
- September 2015
- August 2015
- July 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- July 2014
- June 2014
- April 2014
- January 2014
- December 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- August 2012
- July 2012
- June 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009