[mod_python] mod_python & Leopard

Brian brianlong at cox.net
Mon Mar 17 23:36:46 EDT 2008


Have read many posts on the internet and I can not get mod_python running on my Mac.

I am getting the following error ::

httpd: Syntax error on line 95 of /private/etc/apache2/httpd.conf: Can't locate API module structure `python_module' in file /usr/libexec/apache2/mod_python.so: dlsym(0x100204600, python_module): symbol not found


I am using MacOSX Leopard 10.5.2
Apache 2.2.6
Python 2.5

./src/Makefile

LDFLAGS= -Wl,-framework,Python  -u _PyMac_Error $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) -arch ppc -arch ppc64 -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
OPT=
CFLAGS=$(OPT) $(INCLUDES) -Wc,"-arch ppc" -Wc,"-arch ppc64" -Wc,"-arch i386" -Wc,"-arch x86_64"
srcdir=.

SRCS=   mod_python.c _apachemodule.c requestobject.c tableobject.c util.c \
                serverobject.c connobject.c filterobject.c hlist.c \
                hlistobject.c finfoobject.c

all:    dso

psp_parser.c: psp_parser.l
        @rm -f psp_parser.c
        $(LEX) -R -opsp_parser.c --header-file=include/psp_flex.h psp_parser.l

dso:    mod_python.so
        @echo dso > .install

mod_python.so: $(SRCS)
        @echo
        @echo 'Compiling for DSO.'
        @echo
        $(APXS) $(INCLUDES) -c -Wc,"-arch x86_64" $(SRCS) $(LDFLAGS) $(LIBS)
        @rm -f mod_python.so
        @ln -s .libs/mod_python.so mod_python.so

RESULT OF file /usr/libexec/apache2/mod_python.so

/usr/libexec/apache2/mod_python.so: Mach-O universal binary with 3 architectures
/usr/libexec/apache2/mod_python.so (for architecture i386):	Mach-O bundle i386
/usr/libexec/apache2/mod_python.so (for architecture ppc):	Mach-O bundle ppc
/usr/libexec/apache2/mod_python.so (for architecture x86_64):	Mach-O 64-bit bundle x86_64

When I do a 'Get Info' on /usr/src/httpd, the kind is listed as 'Universal'

Thanx for any help
B





More information about the Mod_python mailing list