Graham,

/usr/local/apache2/ is linked to /Applications/MAMP/Library/, so I
think they're one and the same from the compiler's perspective, and
yes they both have httpd.h and apr.h in them. (Although you're correct
that by default MAMP does not include them, I had to compile Apache
separately from the MAMP source so that these files would be
available. The compiler was throwing errors before I did this. What a
pain...)

As a last-ditch, I tried temporarily replacing the header files in usr/
include with those from the MAMP Apache build, just in case they were
corrupting things. Still no luck, "exit signal Bus error (10)."

I guess I'll move over to the Apple supplied Apache / Python stack.

Too bad, though. Maybe I can grab the working .so file from the guy
who got mod_wsgi working with MAMP (assuming our setups are similar
enough).

Thanks for all your help. Your support of this project is really above
and beyond.


On Feb 14, 9:18 pm, Graham Dumpleton <[email protected]>
wrote:
> Can you verify whether the following directories actually have
> apache/apr header file directories in them?
>
> /usr/local/apache2/include
> /Applications/MAMP/Library/include
>
> Ie., do they have 'httpd.h' and 'apr.h' in them?
>
> I sort of remember that MAMP may not provide header files for
> compiling modules against.
>
> As such, when compiling you may be picking up header files from
> different Apache installation to server MAMP provides and so stuff is
> different and module crashes when started. Am not sure where it would
> pick up the wrong header files from, as Apple supplied Apache is in a
> subdirectory of /usr/include and location would have to be listed
> specifically.
>
> Anyway, check anyway.
>
> Besides running gdb on httpd to track down where crashing, probably
> simply suggest you use the Apple supplied Apache as we all Apple
> supplied Python. They work now problems at all.
>
> Graham
>
> On 15 February 2010 13:02, Eric <[email protected]> wrote:
>
>
>
> > Ok, I gave that a try. Compiles fine, but Apache crashes and gives the
> > same "exit signal Bus error (10)" error.
>
> > And it seems like Apache / mod_wsgi is using the Apple supplied Python
> > (as it should, based on the /usr/bin/python config), since it prints
> > the following to the log at startup:
>
> > [notice] Apache/2.0.63 (Unix) DAV/2 mod_wsgi/3.1 Python/2.6.1 PHP/
> > 5.2.11 configured -- resuming normal operations
>
> > On Feb 14, 8:55 pm, Graham Dumpleton <[email protected]>
> > wrote:
> >> If you aren't bound to Python 2.6.4 then use the Apple supplied one.
>
> >> For whatever reason, the PSF supplied dmg doesn't want to always work
> >> with -F,-framework. Usually the --disable-framework to force -L/-l
> >> linking works, but not always. I am a bit baffled as to why.
>
> >> So, try a mod_wsgi configure line of:
>
> >>   ./configure --with-python=/usr/bin/python
>
> >> to force use of Apple supplied Python.
>
> >> Make sure you take your installed Python out of your PATH else when
> >> you install stuff later you will install for wrong version.
>
> >> Graham
>
> >> On 15 February 2010 12:50, Eric <[email protected]> wrote:
>
> >> > Graham,
>
> >> > env | grep DYLD returns nothing...
>
> >> > I'm using MAMP because it has been convenient in the past to drag and
> >> > drop the dev stack from machine to machine (obviously less feasible
> >> > with Python apps than for the PHP development the MAMP authors seemed
> >> > to have in mind.) I don't *have* to use it, but since others seem to
> >> > have succeeded in getting mod_wsgi to work with it, I wanted to give
> >> > it a try.
>
> >> > I installed 2.6.4 as a matter of course since I am just getting
> >> > started with Python and figured using the latest version was a good
> >> > idea. (Maybe not such a good idea?)
>
> >> > Thanks again for all of your time thus far.
>
> >> > On Feb 14, 8:40 pm, Graham Dumpleton <[email protected]>
> >> > wrote:
> >> >> Hmm, lets try something new. What do you get for:
>
> >> >>   env | grep DYLD
>
> >> >> BTW, why are you using MAMP to begin with, why not just use Apple
> >> >> Apache? Also, why not just use the Apple supplied Python 2.6. I know
> >> >> it is only 2.6.1 and not 2.6.4, but for most people the difference
> >> >> doesn't usually matter.
>
> >> >> Graham
>
> >> >> On 15 February 2010 12:30, Eric <[email protected]> wrote:
>
> >> >> > ls -las /Library/Frameworks/Python.framework/Versions/2.6/lib
> >> >> > total 14680
> >> >> >   0 drwxrwxr-x   20 root  admin      680 Feb  4 17:31 .
> >> >> >   0 drwxrwxr-x   11 root  admin      374 Feb  4 17:31 ..
> >> >> >  16 -rw-r--r--@   1 Mika  admin     6148 Feb  4 17:31 .DS_Store
> >> >> >  304 -rw-rw-r--    1 root  admin   155540 Oct 27 14:45 libform.5.dylib
> >> >> >  408 -rw-rw-r--    1 root  admin   205728 Oct 27 14:45 libform.a
> >> >> >   8 lrwxr-xr-x    1 root  admin       15 Jan 28 01:35 libform.dylib -
> >> >> >> libform.5.dylib
> >> >> > 1672 -rw-rw-r--    1 root  admin   853560 Oct 27 14:45 libform_g.a
> >> >> >  176 -rw-rw-r--    1 root  admin    86956 Oct 27 14:45 libmenu.5.dylib
> >> >> >  224 -rw-rw-r--    1 root  admin   111824 Oct 27 14:45 libmenu.a
> >> >> >   8 lrwxr-xr-x    1 root  admin       15 Jan 28 01:35 libmenu.dylib -
> >> >> >> libmenu.5.dylib
> >> >> >  936 -rw-rw-r--    1 root  admin   476072 Oct 27 14:45 libmenu_g.a
> >> >> > 1320 -rw-rw-r--    1 root  admin   672972 Oct 27 14:45 libncurses.
> >> >> > 5.dylib
> >> >> > 2208 -rw-rw-r--    1 root  admin  1126984 Oct 27 14:45 libncurses.a
> >> >> >   8 lrwxr-xr-x    1 root  admin       18 Jan 28 01:35
> >> >> > libncurses.dylib -> libncurses.5.dylib
> >> >> > 6824 -rw-rw-r--    1 root  admin  3492288 Oct 27 14:45 libncurses_g.a
> >> >> >  120 -rw-rw-r--    1 root  admin    58540 Oct 27 14:45 libpanel.
> >> >> > 5.dylib
> >> >> >  104 -rw-rw-r--    1 root  admin    49952 Oct 27 14:45 libpanel.a
> >> >> >   8 lrwxr-xr-x    1 root  admin       16 Jan 28 01:35 libpanel.dylib -
> >> >> >> libpanel.5.dylib
> >> >> >  336 -rw-rw-r--    1 root  admin   168552 Oct 27 14:45 libpanel_g.a
> >> >> >   0 drwxrwxr-x  633 root  admin    21522 Feb  4 17:31 python2.6
>
> >> >> > ls -als /Library/Frameworks/Python.framework/Versions/2.6/lib/
> >> >> > python2.6/config
> >> >> > total 224
> >> >> >  0 drwxrwxr-x   12 root  admin    408 Oct 27 14:50 .
> >> >> >  0 drwxrwxr-x  633 root  admin  21522 Feb  4 17:31 ..
> >> >> > 88 -rw-rw-r--    1 root  admin  43482 Oct 27 14:51 Makefile
> >> >> > 40 -rw-rw-r--    1 root  admin  18265 Oct 27 14:50 Setup
> >> >> >  8 -rw-rw-r--    1 root  admin    368 Oct 27 14:50 Setup.config
> >> >> >  8 -rw-rw-r--    1 root  admin     41 Oct 27 14:50 Setup.local
> >> >> >  8 -rw-rw-r--    1 root  admin   2128 Oct 27 14:50 config.c
> >> >> >  8 -rw-rw-r--    1 root  admin   1457 Oct 27 14:50 config.c.in
> >> >> > 16 -rwxrwxr-x    1 root  admin   7122 Oct 27 14:50 install-sh
> >> >> >  8 lrwxr-xr-x    1 root  admin     15 Jan 28 01:35 libpython2.6.a -
> >> >> >> ../../../Python
> >> >> > 16 -rwxrwxr-x    1 root  admin   7431 Oct 27 14:50 makesetup
> >> >> > 24 -rw-rw-r--    1 root  admin  11380 Oct 27 14:50 python.o
>
> >> >> > On Feb 14, 8:19 pm, Graham Dumpleton <[email protected]>
> >> >> > wrote:
> >> >> >> Send output from:
>
> >> >> >>   ls -las /Library/Frameworks/Python.framework/Versions/2.6/lib
> >> >> >>   ls -als 
> >> >> >> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config
>
> >> >> >> Graham
>
> >> >> >> On 15 February 2010 12:16, Eric <[email protected]> wrote:
>
> >> >> >> > Thanks Graham. I have been running make distclean before each re-
> >> >> >> > compile.
>
> >> >> >> > Here's what I get after running ./configure --disable-framework
>
> >> >> >> > checking for apxs2... no
> >> >> >> > checking for apxs... /Applications/MAMP/Library/bin/apxs
> >> >> >> > checking Apache version... 2.0.63
> >> >> >> > checking for python... 
> >> >> >> > /Library/Frameworks/Python.framework/Versions/
> >> >> >> > 2.6/bin/python
> >> >> >> > configure: creating ./config.status
> >> >> >> > config.status: creating Makefile
>
> >> >> >> > The Apache version is old because that's what ships with MAMP.
>
> >> >> >> > And here's what the makefile looks like. I've been changing the
> >> >> >> > LIBEXECDIR to point to MAMP's Apache module folder instead. (/
> >> >> >> > Applications/MAMP/Library/modules)
>
> >> >> >> > #  Copyright 2007 GRAHAM DUMPLETON
> >> >> >> > #
> >> >> >> > #  Licensed under the Apache License, Version 2.0 (the "License");
> >> >> >> > #  you may not use this file except in compliance with the License.
> >> >> >> > #  You may obtain a copy of the License at
> >> >> >> > #
> >> >> >> > #      http://www.apache.org/licenses/LICENSE-2.0
> >> >> >> > #
> >> >> >> > #  Unless required by applicable law or agreed to in writing, 
> >> >> >> > software
> >> >> >> > #  distributed under the License is distributed on an "AS IS" 
> >> >> >> > BASIS,
> >> >> >> > #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> >> >> >> > implied.
> >> >> >> > #  See the License for the specific language governing permissions 
> >> >> >> > and
> >> >> >> > #  limitations under the License.
>
> >> >> >> > APXS = /Applications/MAMP/Library/bin/apxs
> >> >> >> > PYTHON = 
> >> >> >> > /Library/Frameworks/Python.framework/Versions/2.6/bin/python
>
> >> >> >> > DESTDIR =
> >> >> >> > LIBEXECDIR = /usr/local/apache2/modules
>
> >> >> >> > CPPFLAGS =  -I/Library/Frameworks/Python.framework/Versions/2.6/
> >> >> >> > include/python2.6 -DNDEBUG
> >> >> >> > CFLAGS =   -Wc,'-arch ppc' -Wc,'-arch i386'
> >> >> >> > LDFLAGS =  -L/Library/Frameworks/Python.framework/Versions/2.6/lib 
> >> >> >> > -L/
> >> >> >> > Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config
> >> >> >> > -arch ppc -arch i386
> >> >> >> > LDLIBS =  -lpython2.6 -ldl
>
> >> >> >> > all : mod_wsgi.la
>
> >> >> >> > mod_wsgi.la : mod_wsgi.c
> >> >> >> >        $(APXS) -c $(CPPFLAGS) $(CFLAGS) mod_wsgi.c $(LDFLAGS) 
> >> >> >> > $(LDLIBS)
>
> >> >> >> > $(DESTDIR)$(LIBEXECDIR) :
> >> >> >> >        mkdir -p $@
>
> >> >> >> > install : all $(DESTDIR)$(LIBEXECDIR)
> >> >> >> >        $(APXS) -i -S LIBEXECDIR=$(DESTDIR)$(LIBEXECDIR) -n 
> >> >> >> > 'mod_wsgi'
> >> >> >> > mod_wsgi.la
>
> >> >> >> > clean :
> >> >> >> >        -rm -rf .libs
> >> >> >> >        -rm -f mod_wsgi.o mod_wsgi.la mod_wsgi.lo mod_wsgi.slo 
> >> >> >> > mod_wsgi.loT
> >> >> >> >        -rm -f config.log config.status
> >> >> >> >        -rm -rf autom4te.cache
>
> >> >> >> > distclean : clean
> >> >> >> >        -rm -f Makefile Makefile.in
>
> >> >> >> > realclean : distclean
> >> >> >> >        -rm -f configure
>
> >> >> >> > On Feb 14, 7:59 pm, Graham Dumpleton <[email protected]>
> >> >> >> > wrote:
> >> >> >> >> Can I see the output of 'make' after time you ran:
>
> >> >> >> >>   ./configure --disable-framework
>
> >> >> >> >> on mod_wsgi.
>
> >> >> >> >> You might want to make sure you run:
>
> >> >> >> >>   make distclean
>
> >> >> >> >> before running 'configure' again with different options.
>
> >> >> >> >> Graham
>
> >> >> >> >> On 15 February 2010 11:52, Eric <[email protected]> wrote:
>
> ...
>
> read more »

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to