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

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

Sources

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: