[mod_python] mod_python & Leopard

Graham Dumpleton graham.dumpleton at gmail.com
Tue Mar 18 01:22:13 EDT 2008


Please use reply-all and keep discussion on mailing list. Do not reply
to just me.

On 18/03/2008, Brian <brianlong at cox.net> wrote:
> Graham ::
>
>  Went into ./src folder and ran make.... now get the following result ::

The instructions don't say to go into the 'src' directory. Why are you
doing that? The build and install should be done from the root
directory.

>  Compiling for DSO.
>
>  /usr/sbin/apxs -I/Users/brian/Downloads/mod_python_trunk/src/include -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -DNDEBUG -Wc,'-arch ppc7400' -Wc,'-arch ppc64' -Wc,'-arch i386' -Wc,'-arch x86_64' -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c hlistobject.c finfoobject.c -arch ppc7400 -arch ppc64 -arch i386 -arch x86_64 -Wl,-F/Library/Frameworks -framework Python -u _PyMac_Error  -ldl
>  /usr/share/apr-1/build-1/libtool --silent --mode=compile gcc    -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -I/usr/include/apache2  -I/usr/include/apr-1   -I/usr/include/apr-1  -arch ppc7400 -arch ppc64 -arch i386 -arch x86_64 -I/Users/brian/Downloads/mod_python_trunk/src/include -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -DNDEBUG  -c -o mod_python.lo mod_python.c && touch mod_python.slo
>  In file included from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:57,
>                  from /Users/brian/Downloads/mod_python_trunk/src/include/mod_python.h:80,
>                  from mod_python.c:28:
>  /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyport.h:730:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
>  In file included from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:57,
>                  from /Users/brian/Downloads/mod_python_trunk/src/include/mod_python.h:80,
>                  from mod_python.c:28:
>  /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyport.h:730:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
>  mod_python.c: In function 'python_init':
>  mod_python.c:826: warning: initialization from incompatible pointer type
>  mod_python.c: In function 'python_init':
>  mod_python.c:826: warning: initialization from incompatible pointer type
>  mod_python.c: In function 'python_init':
>  mod_python.c:826: warning: initialization from incompatible pointer type
>  mod_python.c: In function 'python_init':
>  mod_python.c:826: warning: initialization from incompatible pointer type
>  lipo: can't figure out the architecture type of: /var/folders/kR/kRbwQrcTHXWDKQTg-5pcGE+++TI/-Tmp-//cclvLoaY.out
>  apxs:Error: Command failed with rc=65536

Don't use MacPorts Python, use Python 2.5 that comes supplied with the
operating system. I said that in last email.

The MacPorts Python 2.5 appears to be broken when it comes to building
fully fat binaries for all architectures.

You may be able to get it to work by edit src/Makefile and
dist/setup.py and removing the arch flags for whatever architecture it
is that MacPorts doesn't work properly for. If you work out which
architecture it is then please tell me as one other person I have seen
with this problem didn't tell me.

BTW, make sure you have up to date MacPorts Python if you insist on
using it. This problem may occur where you have installed MacPorts
Python on Tiger and then upgraded to Leopard.

Graham

 .
>  make: *** [mod_python.so] Error 1
>
>
>
>  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