[mod_python] mod_python on OpenBSD

edgar mortiz pfunix at gmail.com
Mon Sep 11 12:21:19 EDT 2006


hello guys. was wondering if any of you can help me out on building
mod_python. I have the following configuration

OpenBSD 3.9

Python 2.4 (source build) --disabled-share
Apache 2.0.59 --enable-so
mod_python 3.2.10 --with-apxs

I was successfully able to build python and apache from source my only
problem is whenever i build mod_python it breaks during make install.
here's how i build mod_python


./configure --with-apxs=/web/httpd/bin/apxs

it looks like I'm missing something else that is not on my openbsd
box. and i was wondering if someone here can help me out to determine
what is needed.


1.) For a Python (source) build what is needed by mod_python?

here's my make install output

# make install

Compiling for DSO.

/usr/chroot/httpd/bin/apxs
-I/usr/chroot/src/mod_python-3.2.10/src/include -I/us
r/chroot/httpd/include -I/usr/local/include/python2.4 -c mod_python.c
_apachemod ule.c requestobject.c tableobject.c util.c  serverobject.c
connobject.c filterob ject.c hlist.c hlistobject.c
-L/usr/local/lib/python2.4/config  -Wl,--export-dyn amic -lm
-lpython2.4   -lpthread  -lutil   -lm
/usr/chroot/httpd/build/libtool --silent --mode=compile gcc
-prefer-pic  -DAP_HA VE_DESIGNATED_INITIALIZER -D_POSIX_THREADS -g -O2
-pthread -I/usr/chroot/httpd/i nclude  -I/usr/chroot/httpd/include
-I/usr/chroot/httpd/include  -I/usr/chroot
/src/mod_python-3.2.10/src/include -I/usr/chroot/httpd/include
-I/usr/local/incl ude/python2.4  -c -o mod_python.lo mod_python.c &&
touch mod_python.slo
mod_python.c: In function `python_cleanup':
mod_python.c:313: warning: passing arg 1 of `free' discards qualifiers
from poin ter target type
mod_python.c: In function `init_mutexes':
mod_python.c:427: warning: assignment discards qualifiers from pointer
target ty pe
mod_python.c:458: warning: assignment discards qualifiers from pointer
target ty pe
mod_python.c: In function `reinit_mutexes':
mod_python.c:540: warning: assignment discards qualifiers from pointer
target ty pe
/usr/chroot/httpd/build/libtool --silent --mode=compile gcc
-prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -D_POSIX_THREADS -g -O2
-pthread -I/usr/chroot/httpd/include  -I/usr/chroot/httpd/include
-I/usr/chroot/httpd/include
-I/usr/chroot/src/mod_python-3.2.10/src/include
-I/usr/chroot/httpd/include -I/usr/local/include/python2.4  -c -o
_apachemodule.lo _apachemodule.c && touch _apachemodule.slo
/usr/chroot/httpd/build/libtool --silent --mode=compile gcc
-prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -D_POSIX_THREADS -g -O2
-pthread -I/usr/chroot/httpd/include  -I/usr/chroot/httpd/include
-I/usr/chroot/httpd/include
-I/usr/chroot/src/mod_python-3.2.10/src/include
-I/usr/chroot/httpd/include -I/usr/local/include/python2.4  -c -o
requestobject.lo requestobject.c && touch requestobject.slo
requestobject.c: In function `req_get_options':
requestobject.c:426: warning: initialization discards qualifiers from
pointer target type
requestobject.c:427: warning: initialization from incompatible pointer type
requestobject.c: In function `getmakeobj':
requestobject.c:1447: warning: assignment from incompatible pointer type
requestobject.c:1454: warning: assignment from incompatible pointer type
requestobject.c: In function `request_tp_clear':
requestobject.c:1569: warning: assignment from incompatible pointer type
/usr/chroot/httpd/build/libtool --silent --mode=compile gcc
-prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -D_POSIX_THREADS -g -O2
-pthread -I/usr/chroot/httpd/include  -I/usr/chroot/httpd/include
-I/usr/chroot/httpd/include
-I/usr/chroot/src/mod_python-3.2.10/src/include
-I/usr/chroot/httpd/include -I/usr/local/include/python2.4  -c -o
tableobject.lo tableobject.c && touch tableobject.slo
tableobject.c:1057: warning: initialization from incompatible pointer type
/usr/chroot/httpd/build/libtool --silent --mode=compile gcc
-prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -D_POSIX_THREADS -g -O2
-pthread -I/usr/chroot/httpd/include  -I/usr/chroot/httpd/include
-I/usr/chroot/httpd/include
-I/usr/chroot/src/mod_python-3.2.10/src/include
-I/usr/chroot/httpd/include -I/usr/local/include/python2.4  -c -o
util.lo util.c && touch util.slo
/usr/chroot/httpd/build/libtool --silent --mode=compile gcc
-prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -D_POSIX_THREADS -g -O2
-pthread -I/usr/chroot/httpd/include  -I/usr/chroot/httpd/include
-I/usr/chroot/httpd/include
-I/usr/chroot/src/mod_python-3.2.10/src/include
-I/usr/chroot/httpd/include -I/usr/local/include/python2.4  -c -o
serverobject.lo serverobject.c && touch serverobject.slo
serverobject.c:351: warning: initialization from incompatible pointer type
/usr/chroot/httpd/build/libtool --silent --mode=compile gcc
-prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -D_POSIX_THREADS -g -O2
-pthread -I/usr/chroot/httpd/include  -I/usr/chroot/httpd/include
-I/usr/chroot/httpd/include
-I/usr/chroot/src/mod_python-3.2.10/src/include
-I/usr/chroot/httpd/include -I/usr/local/include/python2.4  -c -o
connobject.lo connobject.c && touch connobject.slo
/usr/chroot/httpd/build/libtool --silent --mode=compile gcc
-prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -D_POSIX_THREADS -g -O2
-pthread -I/usr/chroot/httpd/include  -I/usr/chroot/httpd/include
-I/usr/chroot/httpd/include
-I/usr/chroot/src/mod_python-3.2.10/src/include
-I/usr/chroot/httpd/include -I/usr/local/include/python2.4  -c -o
filterobject.lo filterobject.c && touch filterobject.slo
/usr/chroot/httpd/build/libtool --silent --mode=compile gcc
-prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -D_POSIX_THREADS -g -O2
-pthread -I/usr/chroot/httpd/include  -I/usr/chroot/httpd/include
-I/usr/chroot/httpd/include
-I/usr/chroot/src/mod_python-3.2.10/src/include
-I/usr/chroot/httpd/include -I/usr/local/include/python2.4  -c -o
hlist.lo hlist.c && touch hlist.slo
/usr/chroot/httpd/build/libtool --silent --mode=compile gcc
-prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -D_POSIX_THREADS -g -O2
-pthread -I/usr/chroot/httpd/include  -I/usr/chroot/httpd/include
-I/usr/chroot/httpd/include
-I/usr/chroot/src/mod_python-3.2.10/src/include
-I/usr/chroot/httpd/include -I/usr/local/include/python2.4  -c -o
hlistobject.lo hlistobject.c && touch hlistobject.slo
/usr/chroot/httpd/build/libtool --silent --mode=link gcc -o
mod_python.la  -rpath /usr/chroot/httpd/modules -module -avoid-version
   hlistobject.lo hlist.lo filterobject.lo connobject.lo
serverobject.lo util.lo tableobject.lo requestobject.lo
_apachemodule.lo mod_python.lo -L/usr/local/lib/python2.4/config
-Wl,--export-dynamic -lm -lpython2.4 -lpthread -lutil -lm

*** Warning: linker path does not have real file for library -lpython2.4.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libpython2.4 but no candidates were found. (...for regex pattern test)

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module mod_python.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.
`psp_parser.c' is up to date.
/usr/local/bin/python setup.py build
/usr/local/bin/python: not found
*** Error code 1

Stop in /usr/chroot/src/mod_python-3.2.10/dist (line 24 of Makefile).
*** Error code 1

Stop in /usr/chroot/src/mod_python-3.2.10 (line 32 of Makefile).
*** Error code 1

Stop in /usr/chroot/src/mod_python-3.2.10 (line 56 of Makefile).


any help will be greatly appreciated.


-ed


More information about the Mod_python mailing list