I downloaded the latest source of mod_wsgi from https://code.google.com/p/modwsgi/source/checkout, but I can’t compile it in Windows with Apache 2.2 & Python 3.2. There are some undefined variables because MOD_WSGI_WITH_DAEMONS is undefined; MOD_WSGI_WITH_DAEMONS is undefined because APR_HAS_FORK is 0.
In “mod_wsgi.c”:
#if APR_HAS_OTHER_CHILD && APR_HAS_THREADS && APR_HAS_FORK
#define MOD_WSGI_WITH_DAEMONS 1
#endif
...
#if defined(MOD_WSGI_WITH_DAEMONS)
...
static WSGIDaemonProcess *wsgi_daemon_process = NULL;
...
#endif
In “apr.h”:
#define APR_HAS_FORK 0
Is there any chance I compile mod_wsgi with Apache 2.2 & Python 3.2 for Windows? If so, how?
Update:
In the default branch, in “wsgi_apache.h”:
#if (APR_MAJOR_VERSION == 0) && \
(APR_MINOR_VERSION == 9) && \
(APR_PATCH_VERSION < 5)
extern apr_status_t wsgi_apr_unix_file_cleanup(void *);
extern apr_status_t wsgi_apr_os_pipe_put_ex(apr_file_t **, apr_os_file_t *,
int, apr_pool_t *);
#define apr_unix_file_cleanup wsgi_apr_unix_file_cleanup
#define apr_os_pipe_put_ex wsgi_apr_os_pipe_put_ex
#endif
But in “apr_version.h”:
#define APR_MAJOR_VERSION 1
...
#define APR_MINOR_VERSION 4
...
#define APR_PATCH_VERSION 5
So apr_unix_file_cleanup will not be defined.
I am using Apache 2.2.22 and Python 3.2.3 in Windows 7 (x64).
The latest mod_wsgi-3.X can be compiled to an “.so” file, but got this error:
mod_wsgi.so.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
I am worried about this. I don’t know if this is a real problem.
And also, I can’t load mod_wsgi module. The Apache’s error log says:
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding: cp0
[Sat May 05 18:35:43 2012] [crit] (OS 1813)The specified resource type cannot be found in the image file. : master_main: create child process failed. Exiting.
I found this: http://bugs.python.org/review/6501/diff/2518/6050. It may cause the issue. I’m not sure.
Try again with the very latest source code. You may also want to use the 3.X branch instead of default branch for time being.