ramkrishanbhatt / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

compile error on FreeBSD 7.0 with Apache 2.0.61 and Python 2.5 on version 2.3 #111

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
# ./configure
checking for apxs2... no
checking for apxs... /usr/local/sbin/apxs
checking Apache version... 2.0.61
checking for python... /usr/local/bin/python
configure: creating ./config.status
config.status: creating Makefile
# make
/usr/local/sbin/apxs -c -I/usr/local/include/python2.5 -DNDEBUG
-D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000  mod_wsgi.c
-L/usr/local/lib/python2.5/config -lpython2.5 -lutil
/usr/local/share/apache2/build/libtool --silent --mode=compile cc
-prefer-pic -O2 -fno-strict-aliasing -pipe -DAP_HAVE_DESIGNATED_INITIALIZER
-D_REENTRANT -D_THREAD_SAFE  -I/usr/local/include/apache2 
-I/usr/local/include/apache2   -I/usr/local/include/apache2
-I/usr/local/include -I/usr/local/include/python2.5 -DNDEBUG
-D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000  -c -o mod_wsgi.lo
mod_wsgi.c && touch mod_wsgi.slo
mod_wsgi.c: In function 'wsgi_hook_child_init':
mod_wsgi.c:10039: error: 'WSGIProcessGroup' undeclared (first use in this
function)
mod_wsgi.c:10039: error: (Each undeclared identifier is reported only once
mod_wsgi.c:10039: error: for each function it appears in.)
mod_wsgi.c:10039: error: 'entries' undeclared (first use in this function)
mod_wsgi.c:10040: error: 'entry' undeclared (first use in this function)
mod_wsgi.c:10047: error: expected expression before ')' token
apxs:Error: Command failed with rc=65536
.
*** Error code 1

Stop in /usr/src/mod_wsgi-2.3.

Note: This is done with in a FreeBSD jail on 32bit system. I am also
getting the same error from the FreeBSD port version.

Original issue reported on code.google.com by davids...@gmail.com on 24 Sep 2008 at 6:05

GoogleCodeExporter commented 8 years ago
This has already been fixed in subversion repository some time back. It only 
affects Windows, or UNIX boxes which have a slightly crippled 
Apache 2.X which doesn't have threading or some other feature compiled in to 
it, thereby preventing daemon mode to be enabled. Add #if 
around code in function at that line number as below.

static void wsgi_hook_child_init(apr_pool_t *p, server_rec *s)
{
#if defined(MOD_WSGI_WITH_DAEMONS)
    WSGIProcessGroup *entries = NULL;
    WSGIProcessGroup *entry = NULL;

    int i;

    /* Close listener sockets for daemon processes. */

    if (wsgi_daemon_list) {
        entries = (WSGIProcessGroup *)wsgi_daemon_list->elts;

        for (i = 0; i < wsgi_daemon_list->nelts; ++i) {
            entry = &entries[i];

            close(entry->listener_fd);
            entry->listener_fd = -1;
        }
    }
#endif

Original comment by Graham.Dumpleton@gmail.com on 24 Sep 2008 at 11:48