[mod_python] mod_python & Leopard

Graham Dumpleton graham.dumpleton at gmail.com
Tue Mar 18 01:09:28 EDT 2008


Please use reply-all and keep discussion on the list.

On 18/03/2008, Brian <brianlong at cox.net> wrote:
> Graham ::
>
>  I must be doing something stupid here... I run ./configure --with-apxs=/usr/sbin/apxs --with-python-src, below is the result.  However, when I run make, nothing happens.

You shouldn't use --with-python-src. What are you trying to achieve?
If you want to point it at a particular version of Python use the
--with-python option and point it at the 'python' executable location.
If using standard Python installation you don't need to specify it,
but it needs to be first in your PATH. Anyway, using --with-python-src
still should not affect things.

Other than that, please show all output generated when you run 'make',
even if you think it doesn't actually do anything.

Also, please don't use MacPorts Python 2.5. Use the OS supplied
Python. If need be use --with-python=/usr/bin/python as option to
configure. MacPorts Python often causes conflicts and causes things to
not work properly where Python 2.5 is installed when OS already
supplies that version.

Graham

>  sh-3.2# ./configure --with-apxs=/usr/sbin/apxs --with-python-src
>  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 Apache version... 2.2.6
>  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... /Library/Frameworks/Python.framework/Versions/Current/bin/python
>  checking Python version... 2.5
>  checking for --with-python-src... yes
>  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
>
>
>  B
>
>
>
>
>  ---- Graham Dumpleton <graham.dumpleton at gmail.com> wrote:
>  > Try mod_python from subversion source repository. See:
>  >
>  >  http://www.modpython.org/pipermail/mod_python/2008-March/024954.html
>  >
>  > Graham
>  >
>  > On 18/03/2008, Brian <brianlong at cox.net> wrote:
>  > > 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
>  > >
>  > >
>  > >
>  > >  _______________________________________________
>  > >  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