[mod_python] Problem installing on Mac OS X

Matthew O'Riordan matt at aqueduct.co.uk
Sun Mar 1 20:20:44 EST 2009


Thanks Graham, again really appreciate your help.

On 1 Mar 2009, at 22:45, Graham Dumpleton wrote:

> 2009/3/2 Matthew O'Riordan <matt at aqueduct.co.uk>:
>> Hi Graham
>>
>> Thank you very much, that worked a treat.  Thank you for the very  
>> prompt
>> response.
>>
>> BTW. I am not clear on why I would use a WSGI capable applciation  
>> as opposed
>> to what mod_python offers.  Can you point me in the direction of  
>> something I
>> can read on the differences and why mod_wsgi may in fact be better  
>> (I am
>> going to be building my application on Django)?
>
> WSGI is a generic interface which allows a Python web application to
> be hosted on different hosting mechanisms. The mod_wsgi module for
> Apache is purpose built for it. With how you are running Django now
> you are relying on a mod_python specific binding for Django rather
> than the generic WSGI interface that Django also supports. By going
> the mod_python route you are encumbering yourself with greater memory
> usage as mod_python is loading a lot of stuff you don't need for
> hosting Django. The raw performance of mod_python is also not as good
> as mod_wsgi. The mod_wsgi module also has daemon mode, which allows
> separation from Apache child processes for your application, giving
> more predictable performance if you haven't been bothered to customise
> default Apache MPM settings, which aren't suitable for large Python
> web applications.
>
> For some real data see:
>
>  http://collingrady.wordpress.com/2009/01/06/mod_python-versus-mod_wsgi/
>  http://code.google.com/p/modwsgi/wiki/PerformanceEstimates
>
> Go onto #django irc and you will very much find that mod_python is out
> of favour these days, despite what official Django documentation still
> says about it.
>
> Graham
>
>> Thanks,
>> Matt
>>
>> On 1 Mar 2009, at 20:12, Graham Dumpleton wrote:
>>
>>> 2009/3/2 Matthew O'Riordan <matt at aqueduct.co.uk>:
>>>>
>>>> Hi
>>>> I am running Python 2.5 and Apache 2.2.11 on Mac OS X, and have  
>>>> been
>>>> trying
>>>> to install Mod_Python (3.3.1) but unfortunately keep getting an  
>>>> error
>>>> "apxs:Error: Command failed with rc=65536".
>>>> I have tried upgrading to Python 2.6 and that has made no  
>>>> difference.
>>>> I would really appreciate some help / advice to get Mod_Python  
>>>> running
>>>> under
>>>> Apache but am stumped as I can't seem to find any answers on the  
>>>> web
>>>> specific to this issue, although have found a few people who have  
>>>> run
>>>> into
>>>> this issue.
>>>
>>> Use mod_python source code from subversion repository.
>>>
>>> svn co https://svn.apache.org/repos/asf/quetzalcoatl/mod_python/ 
>>> trunk
>>> mod_python-trunk
>>>
>>> The fix for that and various other MacOS X build issues is contained
>>> there.
>>>
>>> BTW, if you are only wanting to host a WSGI capable application,  
>>> such
>>> as Django, Trac or TurboGears, you may want to look at mod_wsgi
>>> instead.
>>>
>>> Graham
>>>
>>>> Thanks,
>>>> Matthew O'Riordan
>>>> ----
>>>>
>>>> Here is the output from the Console:
>>>> Macintosh:mod_python-3.3.1 matthew$ ./configure
>>>> checking for gcc... gcc
>>>> checking for C compiler default output file name... a.out
>>>> checking whether the C compiler works... yes
>>>> checking whether we are cross compiling... no
>>>> checking for suffix of executables...
>>>> checking for suffix of object files... o
>>>> checking whether we are using the GNU C compiler... yes
>>>> checking whether gcc accepts -g... yes
>>>> checking for gcc option to accept ANSI C... none needed
>>>> checking for ar... ar
>>>> checking for a BSD-compatible install... /usr/bin/install -c
>>>> checking whether make sets $(MAKE)... yes
>>>> checking for main in -lm... yes
>>>> checking for an ANSI C-conforming const... yes
>>>> checking your blood pressure... a bit high, but we can proceed
>>>> configure: checking whether apxs is available...
>>>> checking for --with-apxs... no
>>>> checking for apxs in /usr/local/apache/sbin... no
>>>> checking for apxs in your PATH... checking for apxs... /usr/sbin/ 
>>>> apxs
>>>> found /usr/sbin/apxs, we'll use this. Use --with-apxs to specify  
>>>> another.
>>>> checking Apache version... 2.2.11
>>>> checking for Apache libexec directory... /usr/libexec/apache2
>>>> checking for Apache include directory... -I/usr/include/apache2
>>>> checking for --with-python... no
>>>> checking for python... /usr/bin/python
>>>> checking Python version... 2.6
>>>> checking Python install prefix...
>>>> /Library/Frameworks/Python.framework/Versions/2.6
>>>> checking checking where python libraries are installed...
>>>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
>>>> checking what libraries Python was linked with... -framework   
>>>> Python
>>>> -ldl
>>>>
>>>> checking linker flags used to link Python...
>>>> checking where Python include files are...
>>>> -I/Library/Frameworks/Python.framework/Versions/2.6/include/ 
>>>> python2.6
>>>> checking for --with-python-src... no
>>>> checking for --with-mutex-dir... no
>>>> Using MUTEX_DIR /tmp
>>>> checking for --with-max-locks... no
>>>> Using 8 MAX_LOCKS.
>>>> checking for --with-flex... no
>>>> checking for flex... /usr/bin/flex
>>>> found /usr/bin/flex, we'll use this. Use --with-flex to specify  
>>>> another.
>>>> checking flex version... 2.5.33. Good
>>>> configure: creating ./config.status
>>>> config.status: creating Makefile
>>>> config.status: creating src/Makefile
>>>> config.status: creating Doc/Makefile
>>>> config.status: creating src/include/mod_python.h
>>>> config.status: creating test/Makefile
>>>> config.status: creating test/testconf.py
>>>> config.status: creating dist/setup.py
>>>> config.status: creating dist/Makefile
>>>> Macintosh:mod_python-3.3.1 matthew$ make
>>>> Compiling for DSO.
>>>> /usr/sbin/apxs -I/Users/matthew/Downloads/mod_python-3.3.1/src/ 
>>>> include
>>>> -I/usr/include/apache2
>>>> -I/Library/Frameworks/Python.framework/Versions/2.6/include/ 
>>>> python2.6 -c
>>>> mod_python.c _apachemodule.c requestobject.c tableobject.c util.c
>>>> serverobject.c connobject.c filterobject.c hlist.c hlistobject.c
>>>> finfoobject.c -Wl,-framework,Python  -u _PyMac_Error / 
>>>> Versions//   -arch
>>>> ppc
>>>> -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g    -lm
>>>> -framework
>>>> Python    -ldl
>>>> /usr/share/httpd/build/libtool --silent --mode=compile gcc - 
>>>> prefer-pic
>>>> -arch
>>>> i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk  -DDARWIN
>>>> -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/usr/include/ 
>>>> apache2
>>>> -I/usr/include/apache2   -I/usr/include/apache2 -I/usr/include
>>>> -I/Users/matthew/Downloads/mod_python-3.3.1/src/include
>>>> -I/usr/include/apache2
>>>> -I/Library/Frameworks/Python.framework/Versions/2.6/include/ 
>>>> python2.6  -c
>>>> -o
>>>> mod_python.lo mod_python.c && touch mod_python.slo
>>>> mod_python.c: In function ‘python_init’:
>>>> mod_python.c:826: warning: initialization from incompatible  
>>>> pointer type
>>>> /usr/share/httpd/build/libtool --silent --mode=compile gcc - 
>>>> prefer-pic
>>>> -arch
>>>> i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk  -DDARWIN
>>>> -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/usr/include/ 
>>>> apache2
>>>> -I/usr/include/apache2   -I/usr/include/apache2 -I/usr/include
>>>> -I/Users/matthew/Downloads/mod_python-3.3.1/src/include
>>>> -I/usr/include/apache2
>>>> -I/Library/Frameworks/Python.framework/Versions/2.6/include/ 
>>>> python2.6  -c
>>>> -o
>>>> _apachemodule.lo _apachemodule.c && touch _apachemodule.slo
>>>> /usr/share/httpd/build/libtool --silent --mode=compile gcc - 
>>>> prefer-pic
>>>> -arch
>>>> i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk  -DDARWIN
>>>> -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/usr/include/ 
>>>> apache2
>>>> -I/usr/include/apache2   -I/usr/include/apache2 -I/usr/include
>>>> -I/Users/matthew/Downloads/mod_python-3.3.1/src/include
>>>> -I/usr/include/apache2
>>>> -I/Library/Frameworks/Python.framework/Versions/2.6/include/ 
>>>> python2.6  -c
>>>> -o
>>>> requestobject.lo requestobject.c && touch requestobject.slo
>>>> /usr/share/httpd/build/libtool --silent --mode=compile gcc - 
>>>> prefer-pic
>>>> -arch
>>>> i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk  -DDARWIN
>>>> -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/usr/include/ 
>>>> apache2
>>>> -I/usr/include/apache2   -I/usr/include/apache2 -I/usr/include
>>>> -I/Users/matthew/Downloads/mod_python-3.3.1/src/include
>>>> -I/usr/include/apache2
>>>> -I/Library/Frameworks/Python.framework/Versions/2.6/include/ 
>>>> python2.6  -c
>>>> -o
>>>> tableobject.lo tableobject.c && touch tableobject.slo
>>>> tableobject.c:329: warning: initialization from incompatible  
>>>> pointer type
>>>> tableobject.c:1092: warning: initialization from incompatible  
>>>> pointer
>>>> type
>>>> /usr/share/httpd/build/libtool --silent --mode=compile gcc - 
>>>> prefer-pic
>>>> -arch
>>>> i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk  -DDARWIN
>>>> -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/usr/include/ 
>>>> apache2
>>>> -I/usr/include/apache2   -I/usr/include/apache2 -I/usr/include
>>>> -I/Users/matthew/Downloads/mod_python-3.3.1/src/include
>>>> -I/usr/include/apache2
>>>> -I/Library/Frameworks/Python.framework/Versions/2.6/include/ 
>>>> python2.6  -c
>>>> -o
>>>> util.lo util.c && touch util.slo
>>>> /usr/share/httpd/build/libtool --silent --mode=compile gcc - 
>>>> prefer-pic
>>>> -arch
>>>> i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk  -DDARWIN
>>>> -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/usr/include/ 
>>>> apache2
>>>> -I/usr/include/apache2   -I/usr/include/apache2 -I/usr/include
>>>> -I/Users/matthew/Downloads/mod_python-3.3.1/src/include
>>>> -I/usr/include/apache2
>>>> -I/Library/Frameworks/Python.framework/Versions/2.6/include/ 
>>>> python2.6  -c
>>>> -o
>>>> serverobject.lo serverobject.c && touch serverobject.slo
>>>> serverobject.c:387: warning: initialization from incompatible  
>>>> pointer
>>>> type
>>>> /usr/share/httpd/build/libtool --silent --mode=compile gcc - 
>>>> prefer-pic
>>>> -arch
>>>> i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk  -DDARWIN
>>>> -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/usr/include/ 
>>>> apache2
>>>> -I/usr/include/apache2   -I/usr/include/apache2 -I/usr/include
>>>> -I/Users/matthew/Downloads/mod_python-3.3.1/src/include
>>>> -I/usr/include/apache2
>>>> -I/Library/Frameworks/Python.framework/Versions/2.6/include/ 
>>>> python2.6  -c
>>>> -o
>>>> connobject.lo connobject.c && touch connobject.slo
>>>> connobject.c: In function ‘_conn_read’:
>>>> connobject.c:142: error: request for member ‘next’ in something  
>>>> not a
>>>> structure or union
>>>> apxs:Error: Command failed with rc=65536
>>>> .
>>>> make[1]: *** [mod_python.so] Error 1
>>>> make: *** [do_dso] Error 2
>>>> Macintosh:mod_python-3.3.1 matthew$
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Mod_python mailing list
>>>> Mod_python at modpython.org
>>>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>>>
>>>>
>>
>>




More information about the Mod_python mailing list