views:

2633

answers:

2

I have no experience compiling code other than using Visual Studio's Build command. I am hoping we can create a step by step guide for compiling mod_python on windows. Please be as descriptive as possible.

This is what I've done so far:

  1. Download and install python 2.6.2
  2. Download and install apache 2.2.11
  3. Download the most recent source code for mod_python from svn

From here I'm lost to what the next step is. I've downloaded Microsoft Visual C++ 2008 Express Edition.

As mentioned by Hao I've already tried the tutorial mentioned in that link. Here is the error messages I'm receiving with that tutorial.

C:\mod_python\dist>build_installer.bat
Could Not Find C:\mod_python\src\*.obj
running bdist_wininst
running build
running build_py
creating build
creating build\lib.win32-2.6
creating build\lib.win32-2.6\mod_python
copying C:\mod_python\lib\python\mod_python\apache.py -> build\lib.win32-2.6\mod
_python
copying C:\mod_python\lib\python\mod_python\cache.py -> build\lib.win32-2.6\mod_
python
copying C:\mod_python\lib\python\mod_python\cgihandler.py -> build\lib.win32-2.6
\mod_python
copying C:\mod_python\lib\python\mod_python\Cookie.py -> build\lib.win32-2.6\mod
_python
copying C:\mod_python\lib\python\mod_python\importer.py -> build\lib.win32-2.6\m
od_python
copying C:\mod_python\lib\python\mod_python\psp.py -> build\lib.win32-2.6\mod_py
thon
copying C:\mod_python\lib\python\mod_python\publisher.py -> build\lib.win32-2.6\
mod_python
copying C:\mod_python\lib\python\mod_python\python22.py -> build\lib.win32-2.6\m
od_python
copying C:\mod_python\lib\python\mod_python\Session.py -> build\lib.win32-2.6\mo
d_python
copying C:\mod_python\lib\python\mod_python\testhandler.py -> build\lib.win32-2.
6\mod_python
copying C:\mod_python\lib\python\mod_python\util.py -> build\lib.win32-2.6\mod_p
ython
copying C:\mod_python\lib\python\mod_python\__init__.py -> build\lib.win32-2.6\m
od_python
running build_ext
building 'mod_python_so' extension
creating build\temp.win32-2.6
creating build\temp.win32-2.6\Release
creating build\temp.win32-2.6\Release\mod_python
creating build\temp.win32-2.6\Release\mod_python\src
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -DWIN32 -DNDEBUG -D_WINDOWS -IC:\mod_python\src\include -Ic:\apa
che\include -IC:\Python26\include -IC:\Python26\PC /TcC:\mod_python\src\mod_pyth
on.c /Fobuild\temp.win32-2.6\Release\mod_python\src\mod_python.obj
mod_python.c
c:\apache\include\ap_config.h(25) : fatal error C1083: Cannot open include file:
 'apr.h': No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2
A: 

One already exists.

Hao Lian
I've already tried that tutorial, but it fails when running build_installer.bat. It states that it cannot find the *.obj files in the mod_python/src directory.
John
I've updated the question with the error message I'm receiving.
John
+1  A: 

You should check this link: http://old.nabble.com/APR_BRIGADE_SENTINEL-macro-causes-compile-error-td20873779.html

rambler