logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: Apache from sources
Author
Reuabreliz



Joined: 09 Aug 2010
Posts: 4

PostPosted: Mon 09 Aug '10 16:59    Post subject: Apache from sources Reply with quote

I wanted to install apache from the sources, but I hang on a really dump thing. I don't get it to add the Includepath (where windows.h is included) to my Includepath for compiling. I use the sdk 4.0 from windows 7 64bit.

My steps till yet, which worked:
1.) Downloaded apache 2.2 sources
2.) Downloaded awk.exe and gave it into my system32 directory.
3.) Downloaded zlib 1.2.5 sources. Compiled them and gave the lib and includes in the srclib/zlib directory
4.) Downloaded open-ssl-1.0.0 sources.

My problem:
5.) I have wanted to compile open-ssl-1.0.0 but it doesn't work, because I don't get the clue of windows directories. I even took the INSTALL.WIN64 manual of open-ssl-1.0.0 and followed every instruction.

What I made:
5.1.) Install active perl from http://www.activestate.com/ActivePerl
5.2.) Opened cmd and went into the directory where i unpacked my open-ssl-1.0.0 sources
5.3.) Then typed in: perl Configure no-rc5 no-idea enable-mdc2 enable-zlib VC-WIN64A -IC:\Apache22\httpd-2.2.16\srclib\zlib -LC:\Apache22\httpd-2.2.16\srclib\zlib -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include"
First I tried the Includepath from windows.h (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include) without "". I also tried to clasp it with the -I but windows is to silly to get the path. Because when I then run ms\do_win64a it lists me the options which didn't work:
Code:

C:\Users\Matthias\Downloads\openssl-1.0.0a>perl util\mk1mf.pl no-asm VC-WIN64A1>ms\nt.mak
unknown option - Files
unknown option - (x86)\Microsoft
unknown option - SDKs\Windows\v7.0A\Include

C:\Users\Matthias\Downloads\openssl-1.0.0a>perl util\mk1mf.pl dll no-asm VC-WIN64A  1>ms\ntdll.mak
unknown option - Files
unknown option - (x86)\Microsoft
unknown option - SDKs\Windows\v7.0A\Include


And this is what the compiler says when I still try to compile it nmake -f ms\ntdll.mak:
Code:

ms\uplink.c(11) : fatal error C1083: Datei (Include) kann nicht geöffnet werden:
 "windows.h": No such file or directory
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\bin\amd64\cl.EXE"": Rückgabe-Code "0x2"
Stop.


It is definitifly the include directory which doesn't fit, because I even changed the path in the uplink.c file to the absolute path from windows.h and then it found it. But I don't want to go through all files and change the paths.

Please can somebody give me a solution for that. THX
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 09 Aug '10 21:18    Post subject: Reply with quote

Hi Matthias,
brief description how to compile it.

unpack httpd-2.2.16-win32-src.zip to C:\build\httpd_x64
unpack openssl-0.9.8m.tar.gz and move it into srclib openssl (inside the unpacked apache source)
unpack zlib-1.2.3.tar.gz and move it into srclib zlib

to replace the MACHINE:X86 inside the make files there is php script
Code:

<?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";
   }
}
?>

copy php code to replace code into C:\builds\httpd_x64\replace.php
Consonle (open the x64 release console from the menu) If you don't find it run at first

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvarsx86_amd64.bat

(maybe you have a bit different path to vcvarsx86_amd64.bat)

Code:

cd \
cd builds\httpd_x64
srclib\apr\build\lineends.pl
C:\php\php.exe replace.php
cd srclib\zlib
nmake -f win32\Makefile.msc
cd ..\..\srclib\openssl
perl Configure VC-WIN64A --prefix=/Apache22 --openssldir=/Apache22/conf enable-camellia disable-idea
ms\do_win64a
nmake -f ms\ntdll.mak
REM edit ms\test.bat remove md2 and idea test
nmake -f ms\ntdll.mak test

This might is a help (-:
Back to top
Reuabreliz



Joined: 09 Aug 2010
Posts: 4

PostPosted: Tue 10 Aug '10 1:08    Post subject: Reply with quote

Thanks for your answer, but I still get errors on the compiling steps:
nmake -f win32\Makefile.msc

Code:

        cl -c -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -nologo -MD
 -W3 -O2 -Oy- -Zi -Fd"zlib"  adler32.c
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\bin\cl.EXE"": Return-Code "0xc0000135"
Stop.


I have zlib already compiled (on my way), but with the settings in the directory /contrib/vstudio, where there is already a workspace for vstudio 10. Can I maybe use that lib than?

And I also tried to compile openssl, which gave me the same error as I had before:

Code:

ms\uplink.c(11) : fatal error C1083: Data (Include) could not be opened:
 "windows.h": No such file or directory
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\bin\amd64\cl.EXE"": Rückgabe-Code "0x2"
Stop.


So do you know how I can solve these compiling errors with some settings?[/code]
Back to top
Virsacer



Joined: 16 Jan 2010
Posts: 108
Location: Germany, Darmstadt

PostPosted: Tue 10 Aug '10 8:35    Post subject: Reply with quote

Are you using the "SetEnv.Cmd" from the SDK?
I had the same Problem when using it.

You have to use the "vcvars64.bat" from Visual Studio...
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 10 Aug '10 12:12    Post subject: Reply with quote

I found my shortcut. Yesterday I was on a different PC.

So my shortcut from the startmenu
Code:

C:\Windows\System32\cmd.exe /E:ON /V:ON /T:0E /K "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd" /Release


Than you have the right env without calling any batch script by yourself. I haven't tried VC10 yet.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 10 Aug '10 19:41    Post subject: Reply with quote

ZLIB 1.2.5 = NO GO on x64 ... this may be your problem on that step. 1.2.4 compiles fine.
Back to top
Reuabreliz



Joined: 09 Aug 2010
Posts: 4

PostPosted: Tue 10 Aug '10 20:38    Post subject: Reply with quote

NICE ... sorry for the trouble I am really a newbie in Windows Programming. And I hope I never get more to do with it Laughing

I used the zlib 1.2.4, openssl-0.9.8.m.
I changed the command a little:
Code:
C:\Windows\System32\cmd.exe /E:ON /V:ON /T:0E /K "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat" /Release


The test (nmake -f ms\ntdll.mak test) didn't work...Maybe a last idea?
Code:
Der Befehl "ideatest" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
problems.....
[/code]
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 10 Aug '10 21:39    Post subject: Reply with quote

yeah, if you remove the idea cipher, you need to remove the test for it manually since the test.bat file in not generated during the build but a static file included in the tarball.

So open ..\openssl-0.9.8m\ms\test.bat
find and remove these three lines (not far down from the top of the file).

Code:
echo ideatest
ideatest
if errorlevel 1 goto done



why 0.9.8m and not 0.9.8o?
Build "m" lasted all of one week. I think a pretty serious bug was found either the day of release or the very next day after.
Back to top
Reuabreliz



Joined: 09 Aug 2010
Posts: 4

PostPosted: Wed 11 Aug '10 18:27    Post subject: Reply with quote

glsmith wrote:
yeah, if you remove the idea cipher, you need to remove the test for it manually since the test.bat file in not generated during the build but a static file included in the tarball.

So open ..\openssl-0.9.8m\ms\test.bat
find and remove these three lines (not far down from the top of the file).


Code:
passed all tests

it worked thx

glsmith wrote:

why 0.9.8m and not 0.9.8o?
Build "m" lasted all of one week. I think a pretty serious bug was found either the day of release or the very next day after.

Oh I didn't know that. So I will take the o version. thx

thx a lot to all who helped me.[/code]
Back to top


Reply to topic   Topic: Apache from sources View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads