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: Can mod_security2/2.5.0 be compiled with VC6?
Author
glsmith
Moderator


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

PostPosted: Sat 23 Feb '08 0:43    Post subject: Can mod_security2/2.5.0 be compiled with VC6? Reply with quote

Just wondering as I am having problems as usual -sigh-

Gregg
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3049
Location: Hilversum, NL, EU

PostPosted: Sun 24 Feb '08 22:07    Post subject: Reply with quote

Please tell your issues, see forum rules.

Steffen
Back to top
glsmith
Moderator


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

PostPosted: Sat 01 Mar '08 2:44    Post subject: Reply with quote

Sorry for late reply, Mom broke her hip and have been taking care of her.

Anyhow, 2.1.6 compiles and loads successfully.

I would just use the Apache Lounge version but I am trying to keep away from msvcrxx.dll as long as I can.

have libxml2.dll and lua5.1.dll in apache22\bin

Now, in the install docs for 2.5.0 instructions specifically say for (VC++8)
This is why I ask if it even can be compiled with VC6

Specifically, after chasing down all the requirements (libxml2{iconv.h iconv.lib}, lua) it compiles but Apache errors with module not found (which in this case means it doesn't work)

The only Warning I get during compile is;

cL -MD -I. -IH:\BUILD\httpd-2.2.8\srclib\pcre\include -IH:\BUILD\httpd-
2.2.8\srclib\pcre -IH:\BUILD\libxml2-2.6.30+.win32\include -IH:\BUILD\lua-5.1.
3\include -IH:\BUILD\lua-5.1.3 -IH:\Apache22\include /nologo /O2 /LD /W3 /wd424
4 -DWIN32 -DWINNT -Dinline=APR_INLINE -c apache2_io.c -Foapache2_io.obj
Command line warning D4002 : ignoring unknown option '/wd4244'
apache2_io.c
apache2_io.c(429) : warning C4244: 'function' : conversion from '__int64 ' to 'u
nsigned int ', possible loss of data
apache2_io.c(434) : warning C4244: 'function' : conversion from '__int64 ' to 'u
nsigned long ', possible loss of data
apache2_io.c(569) : warning C4244: 'function' : conversion from '__int64 ' to 'u
nsigned int ', possible loss of data
apache2_io.c(574) : warning C4244: 'function' : conversion from '__int64 ' to 'u
nsigned long ', possible loss of data
apache2_io.c(658) : warning C4244: 'function' : conversion from '__int64 ' to 'u
nsigned int ', possible loss of data
apache2_io.c(663) : warning C4244: 'function' : conversion from '__int64 ' to 'u
nsigned long ', possible loss of data
apache2_io.c(766) : warning C4244: 'function' : conversion from '__int64 ' to 'u
nsigned int ', possible loss of data
apache2_io.c(771) : warning C4244: 'function' : conversion from '__int64 ' to 'u
nsigned long ', possible loss of data
apache2_io.c(569) : warning C4761: integral size mismatch in argument; conversio
n supplied
apache2_io.c(574) : warning C4761: integral size mismatch in argument; conversio
n supplied
apache2_io.c(658) : warning C4761: integral size mismatch in argument; conversio
n supplied
apache2_io.c(663) : warning C4761: integral size mismatch in argument; conversio
n supplied
apache2_io.c(766) : warning C4761: integral size mismatch in argument; conversio
n supplied
apache2_io.c(771) : warning C4761: integral size mismatch in argument; conversio
n supplied
apache2_io.c(429) : warning C4761: integral size mismatch in argument; conversio
n supplied
apache2_io.c(434) : warning C4761: integral size mismatch in argument; conversio
n supplied

and

cL -MD -I. -IH:\BUILD\httpd-2.2.8\srclib\pcre\include -IH:\BUILD\httpd-
2.2.8\srclib\pcre -IH:\BUILD\libxml2-2.6.30+.win32\include -IH:\BUILD\lua-5.1.
3\include -IH:\BUILD\lua-5.1.3 -IH:\Apache22\include /nologo /O2 /LD /W3 /wd424
4 -DWIN32 -DWINNT -Dinline=APR_INLINE -c msc_geo.c -Fomsc_geo.obj
Command line warning D4002 : ignoring unknown option '/wd4244'
msc_geo.c
msc_geo.c(431) : warning C4244: '=' : conversion from 'double ' to 'float ', pos
sible loss of data
msc_geo.c(443) : warning C4244: '=' : conversion from 'double ' to 'float ', pos
sible loss of data

Gregg
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Sun 02 Mar '08 16:36    Post subject: Reply with quote

I was able to build mod_security 2.5.0 with VC6 and run it with Apache 2.2.8 (also built with VC6). Here's what I did:

I built Apache 2.2.8 with VC6. My installation is in C:\Apache228
Code:
SET APACHE=C:\Apache228

First, build libxml2.dll and put it in Apache bin directory (downloaded from ftp://xmlsoft.org/libxml2/libxml2-sources-2.6.31.tar.gz)
Code:
CD      libxml2-2.6.31\win32
CSCRIPT configure.js include=%APACHE%\include lib=%APACHE%\lib iconv=no iso8859x=yes
NMAKE   /f Makefile.msvc
COPY    bin.msvc\libxml2.dll %APACHE%\bin

Next, build lua5.1.dll and put it in Apache bin directory (downloaded from http://www.lua.org/ftp/lua-5.1.3.tar.gz)
Code:
CD    lua-5.1.3\src
CL    /c /LD /nologo /O2 /W3 /MD -DWIN32 -DWINNT -DLUA_BUILD_AS_DLL *.c
REM           don't want these two .obj's in the library - they are for main executable progs
DEL   lua.obj luac.obj
LINK  /DLL  /OUT:lua5.1.dll *.obj
COPY  lua5.1.dll  %APACHE%\bin


Finally, build mod_security 2.5.0 and put it in Apache modules directory

Edit the file modsecurity-apache_2.5.0\apache2\Makefile.win and set the variables BASE, LIBXML2, LUA, and PCRE
    BASE is the Apache directory
    LIBXML2 is the libxml2-2.6.31 directory
    LUA is the lua-5.1.3\src directory
    PCRE is the Apache source \srclib\pcre directory
Code:
CD      modsecurity-apache_2.5.0\apache2
NMAKE   -f Makefile.win
COPY    mod_security2.so %APACHE%\modules\


I got the same compile warnings that you did, but this didn't prevent Apache from loading mod_security2.so for me. I haven't tested it very much yet.

Hope this helps,
-tom-


Last edited by tdonovan on Mon 03 Mar '08 5:07; edited 1 time in total
Back to top
glsmith
Moderator


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

PostPosted: Mon 03 Mar '08 4:47    Post subject: Reply with quote

Worked great, thank you!

Edit:

Note in above compile instructions.

-DWITH_LUA is missing from DEFS in the mod_security makefile.

What results seems to work anyway but what of LUA since this makes no dependency on lua5.1.dll viewing with Depends.
Back to top


Reply to topic   Topic: Can mod_security2/2.5.0 be compiled with VC6? View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads