I'm having trouble installing mod_wsgi.
ENVIRONMENT
===========
FreeBSD 6.1-RELEASE
Apache 2.0.55
Python 2.4.3
STEPS TO REPRODUCE
==================
$ svn co http://modwsgi.googlecode.com/svn/trunk/mod_wsgi
$ cd mod_wsgi
$ ./configure
$ make
$ sudo make install
$ sudo apachectl restart
EXPECTED RESULT
===============
Apache restarts.
ACTUAL RESULT
=============
Syntax error on line 35 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_wsgi.so into server:
/usr/local/apache2/modules/mod_wsgi.so: Undefined symbol
"wsgi_execute_remote"
NOTES
=====
In the compile step I do get this warning:
mod_wsgi.c:4544: warning: 'wsgi_execute_remote' used but never
defined
The problem happens whether I use make or gmake.
> I'm having trouble installing mod_wsgi.
I believe I've resolved this issue.
> ENVIRONMENT
> ===========
> FreeBSD 6.1-RELEASE
> Apache 2.0.55
On FreeBSD, APR's --enable-threads option to configure defaults
to 'no' (see srclib/apr/build/apr_hints.m4 in the Apache
distribution). The result is that APR_HAS_THREADS is set to 0 in
apache2/include/apr.h, and therefore MOD_WSGI_WITH_DAEMONS is not
defined in mod_wsgi.c. This explains why this environment
triggers the error below.
> mod_wsgi.c:4544: warning: 'wsgi_execute_remote' used but
> never defined
The error here is sloppy preprocessor conditions. Once
MOD_WSGI_WITH_DAEMONS is set, this should be used around the
declaration, call, and definition of wsgi_execute_remote. As it
stands in r338, it is used only around the definition, and so our
function is indeed declared and called "but never defined."
I have filed a bug and patch.
It may also be helpful to document somewhere that on FreeBSD,
Apache must be built with --enable-threads in order to use
mod_wsgi's daemon mode. Additionally, it might be nice to issue a
warning at build time when daemon mode is not available on Unix
due to Apache 2+'s configuration.
chad
Thanks.
Graham
Thank you. :^)
chad