You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Milan Reznicek <re...@gytool.cz> on 2003/11/12 00:30:36 UTC

[users@httpd] Problem compiling apache with SSL on win32

Hi,
    I have s problem with compiling apache-2.0.48 with SSL 0.9.7c on win32
platform.
    I get the following error:

bison is not a recognized system command.
System cannot find the file specified.
Cannot find R:\Projects\Apache WebServer\httpd-2.0.48\modules\ssl\y.tab.c
System cannot find the file specified.
Cannot find R:\Projects\Apache WebServer\httpd-2.0.48\modules\ssl\y.tab.h
NMAKE : fatal error U1077: 'tempfile.bat' : return code '0x1'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC98\BIN\NMAKE.EXE' :
return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC98\BIN\NMAKE.EXE' :
return code '0x2'
Stop.

    Can anyone please help, or point out where can be a problem.

                                        Thanks in advance Milan


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Problem compiling apache with SSL on win32

Posted by hunter <th...@sympatico.ca>.
On Tue, 2003-11-11 at 18:30, Milan Reznicek wrote:
> Hi,
>     I have s problem with compiling apache-2.0.48 with SSL 0.9.7c on win32
> platform.
>     I get the following error:
> 
> bison is not a recognized system command.
> System cannot find the file specified.
> Cannot find R:\Projects\Apache WebServer\httpd-2.0.48\modules\ssl\y.tab.c
> System cannot find the file specified.
> Cannot find R:\Projects\Apache WebServer\httpd-2.0.48\modules\ssl\y.tab.h
> NMAKE : fatal error U1077: 'tempfile.bat' : return code '0x1'
> Stop.
> NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC98\BIN\NMAKE.EXE' :
> return code '0x2'
> Stop.
> NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~3\VC98\BIN\NMAKE.EXE' :
> return code '0x2'
> Stop.
> 
>     Can anyone please help, or point out where can be a problem.
> 
>                                         Thanks in advance Milan
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
Milan,

You need some *nix like tools from CYGWIN.

bison, flex, sed and awk.

My notes from previous replies to others...

You must compile from the command line - not from within the IDE.  The
IDE buys you nothing when building open source - it only benefits you
when you are creating your own code. Debugging is easily done by
envoking MSDEV from the command line - but you will likely not be
debugging Apache - I don't and I have been working with it for years.

In every case it is the build environment that makes or breaks your
build process. 

You need to have the following tools for building:

1. Microsoft Visual Studio 6 (5 and .net will also work). When you
install it you must tick the tick-box that says - set environment
variables for command line building (something like that), it is not set
by default. Or, you can find the batch file that sets this for you when
ever you need to build from the command line - VCVARS32.BAT in the
\VC98\bin directory.

2. MASM - you can download the Microsoft DDK for free or get it from my
tools directory. You can also use Visual Studio to compile openssl but
then it will be slower. I put MASM into c:\masm and then add it to the
path - you won't need to have the include and lib directories added to
the INCLUDE and LIB paths. But the make must be able to find ml.exe
which will be in c:\masm\bin - add c:\masm\bin to your path.

3. Perl5 - you can get from the internet or from my tools directory. I
put mine into c:\perl. Then add c:\perl\bin to the path. Note: it must
come before CYGWIN in the path - the version of perl with CYGWIN will
break the openssl build process.  

4. CIGWIN - you can install from the internet or get it from my tools
directory. I put mine into c:\cygwin and you must include c:\cygwin\bin
into the path - after perl. If you install from the internet you need to
get the following components: awk, flex, bison and sed. You will have to
fix awk as well. There will be two files with the name awk.exe and
awk(something).exe. -- awk.exe will be small and the other large --
delete the small one and rename the large one as awk.exe (a cygwin
symlink that will not work outside of cygwin). If you take the CYGWIN
from my tools directory the you will not have perl and awk is already
fixed, but you have to import both .reg files (they expect CYGWIN to be
in c:\cygwin) - this is very important - it will not work if you do not
do this step. regedit cygwin2.reg and regedit cygwin2.reg

Summary (simple one using my tools)

Download the following tools: perl.zip, masm.zip and cygwin.zip from
http://tor.ath.cx/~hunter/tools

1. Install Microsoft Visual Studio and remember to tick the environment
tick box.

2. create c:\masm ... put masm.zip into this and unzip (with directories
included) - add c:\masm\bin to your path.

3. create c:\perl ... put perl.zip into this and unzip (with directories
included) - add c:\perl\bin to your path.

4. create c:\cygwin ... put cygwin.zip into this and unzip (with
directories included) - add c:\cygwin\bin to your path (after perl). Run
regedit cygwin1.reg and regedit cygwin2.reg from c:\cygwin. 

After this you should be able to follow the instruction from the
packages.

Download the sources for: openssl, mod_ssl and apache.

openssl-0.9.7c.tar.gz
httpd_2.0.48-win32-scr.zip

Check the md5's for each of these files. You can get a windows md5 tool
from my tools directory.

Make a directory c:\build
Expand openssl-0.9.7c.tar.gz into c:\build\openssl-0.9.7c
Expand httpd_2.0.48-win32-scr.zip into c:\build\httpd_2.0.48
                
Build openssl first...

In a console go to the c:\build\openssl-0.9.7c read INSTALL.W32 and
follow the instructions.

Summarized here...

Firstly you should run Configure:
perl Configure VC-WIN32

- If you are using MASM then run:
ms\do_masm

- If you don't want to use the assembly language files at all then run:
ms\do_ms

The most common error here is if you use the wrong perl.

Then from the command line do:
nmake -f ms\ntdll.mak

If all is well it should compile and you will have some DLLs and
executables in out32dll. 

Do the tests:
 
cd out32dll
..\ms\test

Never mind the Tweaks

Copy the contents of 
c:\build\openssl-0.9.7c 
to 
c:\build\httpd_2.0.48\srclib\openssl

Now build Apache...

In a console go to the c:\build\httpd_2.0.48 

You will be using makefile.win.

To build run the following command...
 
>>From c:\build\httpd_2.0.48

nmake /f Makefile.win INSTDIR="c:\apache" installr

You should now have a properly built Apache 2 in c:\apache.


I hope this helps...

Chris Lewis



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org