Closed GoogleCodeExporter closed 9 years ago
This is still not the mailing list which I said should be used. Am still
waiting on laptop to be repaired so still cannot investigate.
Original comment by Graham.Dumpleton@gmail.com
on 13 Feb 2014 at 10:32
What do you get if you run:
which lib tool
and:
libtool -V
Is it definitely from:
/usr/bin/libtool
and if so what version?
Original comment by Graham.Dumpleton@gmail.com
on 14 Feb 2014 at 4:45
Also provide the output of running:
ls -las /usr/share/apr-1/build-1/libtool
and:
/usr/share/apr-1/build-1/libtool --version
Original comment by Graham.Dumpleton@gmail.com
on 14 Feb 2014 at 4:48
And finally from running:
las -las /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/usr/share/apr-1/build-1/libtool
and:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/usr/share/apr-1/build-1/libtool --version
Original comment by Graham.Dumpleton@gmail.com
on 14 Feb 2014 at 4:49
Next up, provide the output from running:
apxs -q CC
Original comment by Graham.Dumpleton@gmail.com
on 14 Feb 2014 at 5:09
inside:~ madhu$ libtool -V
Apple Inc. version cctools-846.2.4
inside:~ madhu$ apxs -q CC
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bi
n/cc
Regards, Madhu
Original comment by madhuses...@gmail.com
on 17 Feb 2014 at 11:20
I haven't yet tried on MacOS X 10.9, but do have my laptop back now.
From my investigation on MacOS X 10.8, the reason you are getting the error
about tagged configuration is because you changed the apxs configuration to use:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/cc
You cannot do this, as it will only be able to find a tag configuration for:
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bi
n/cc
and will error with anything else, unless other parts of the configuration are
overridden to insert a '--tag CC' argument to the invocation of libtool.
You have to therefore put back any apxs configuration files to:
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bi
n/cc
you must then create the symlink as explained previously but adjust it to use
different name for tool chain on MacOS X 10.9. Thus:
cd /Applications/Xcode.app/Contents/Developer/Toolchains/
sudo ln -s XcodeDefault.xctoolchain OSX10.9.xctoolchain
So long as apxs configuration is left as the defaults and not touched, that
should be all that is required.
BTW, you previously quoted:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/usr/share/apr-1/build-1/libtool --silent --mode=compile
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin -DDARWIN ….
Was that a bad cut and paste as it is broken in a couple of ways? Specifically
lib tool path is bogus and 'cc' is missing on end of compiler path.
Original comment by Graham.Dumpleton@gmail.com
on 17 Feb 2014 at 11:30
Thanks. That seem to work but apache header files is not in /usr/include like
unix distribution.
So,
/usr/sbin/apxs -c
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE -Wc,'-arch x86_64'
mod_wsgi.c -Wl,-F/System/Library/Frameworks -framework Python -u _PyMac_Error
/System/Library/Frameworks/ -arch x86_64 -ldl -framework CoreFoundation
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bi
n/cc/usr/share/apr-1/build-1/libtool --silent --mode=compile
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bi
n/cc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/local/include
-I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apr-1 -arch
x86_64
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE -c -o mod_wsgi.lo
mod_wsgi.c && touch mod_wsgi.slo
mod_wsgi.c:34:10: fatal error: 'httpd.h' file not found
#include "httpd.h"
^
1 error generated.
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
I'm trying to get src of apache downloaded and compile that in mac. Is there
another way? I have run root level find for apache include files couldn't find
it. I shall download apache and see whether it compiles.
BTW, Mac OS X server distributes mod-wsgi with very little documentation on how
to get started. Is there any docs other than the PEP 333.
Regards, Madhu
Original comment by madhuses...@gmail.com
on 21 Feb 2014 at 9:09
The Apache header files are located under /usr/include/apache2 and the APR
headers files under /usr/include/apr-1. The compiler line has -I directories
for them. If you do not have those directories, then your operating system
installation has somehow been mucked up. Ensure you have the latest Xcode
version and that those directories exist.
I have no issues under 10.9.1 with only that symlink. I even have a solution
now that doesn't even require the symlink be added, but that still will not
help if for some reason the Apache headers have been removed from where they
are supposed to be.
Original comment by Graham.Dumpleton@gmail.com
on 21 Feb 2014 at 9:35
Thanks. I still don't have .so file but I have provided the listing.
madhu$ make
/usr/sbin/apxs -c
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE -Wc,'-arch x86_64'
mod_wsgi.c -Wl,-F/System/Library/Frameworks -framework Python -u _PyMac_Error
/System/Library/Frameworks/ -arch x86_64 -ldl -framework CoreFoundation
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bi
n/cc/usr/share/apr-1/build-1/libtool --silent --mode=compile
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bi
n/cc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/local/include
-I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apr-1 -arch
x86_64
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE -c -o mod_wsgi.lo
mod_wsgi.c && touch mod_wsgi.slo
mod_wsgi.c:9375:23: warning: using the result of an assignment as a condition
without parentheses
[-Wparentheses]
if (value = apr_table_get(r->notes, "mod_wsgi.process_group"))
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mod_wsgi.c:9375:23: note: place parentheses around the assignment to silence
this warning
if (value = apr_table_get(r->notes, "mod_wsgi.process_group"))
^
( )
mod_wsgi.c:9375:23: note: use '==' to turn this assignment into an equality
comparison
if (value = apr_table_get(r->notes, "mod_wsgi.process_group"))
^
==
mod_wsgi.c:9377:23: warning: using the result of an assignment as a condition
without parentheses
[-Wparentheses]
if (value = apr_table_get(r->notes, "mod_wsgi.application_group"))
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mod_wsgi.c:9377:23: note: place parentheses around the assignment to silence
this warning
if (value = apr_table_get(r->notes, "mod_wsgi.application_group"))
^
( )
mod_wsgi.c:9377:23: note: use '==' to turn this assignment into an equality
comparison
if (value = apr_table_get(r->notes, "mod_wsgi.application_group"))
^
==
mod_wsgi.c:9379:23: warning: using the result of an assignment as a condition
without parentheses
[-Wparentheses]
if (value = apr_table_get(r->notes, "mod_wsgi.callable_object"))
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mod_wsgi.c:9379:23: note: place parentheses around the assignment to silence
this warning
if (value = apr_table_get(r->notes, "mod_wsgi.callable_object"))
^
( )
mod_wsgi.c:9379:23: note: use '==' to turn this assignment into an equality
comparison
if (value = apr_table_get(r->notes, "mod_wsgi.callable_object"))
^
==
mod_wsgi.c:9382:23: warning: using the result of an assignment as a condition
without parentheses
[-Wparentheses]
if (value = apr_table_get(r->notes,
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
mod_wsgi.c:9382:23: note: place parentheses around the assignment to silence
this warning
if (value = apr_table_get(r->notes,
^
mod_wsgi.c:9382:23: note: use '==' to turn this assignment into an equality
comparison
if (value = apr_table_get(r->notes,
^
==
mod_wsgi.c:9403:23: warning: using the result of an assignment as a condition
without parentheses
[-Wparentheses]
if (value = entry->process_group)
~~~~~~^~~~~~~~~~~~~~~~~~~~~~
mod_wsgi.c:9403:23: note: place parentheses around the assignment to silence
this warning
if (value = entry->process_group)
^
( )
mod_wsgi.c:9403:23: note: use '==' to turn this assignment into an equality
comparison
if (value = entry->process_group)
^
==
mod_wsgi.c:9405:23: warning: using the result of an assignment as a condition
without parentheses
[-Wparentheses]
if (value = entry->application_group)
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
mod_wsgi.c:9405:23: note: place parentheses around the assignment to silence
this warning
if (value = entry->application_group)
^
( )
mod_wsgi.c:9405:23: note: use '==' to turn this assignment into an equality
comparison
if (value = entry->application_group)
^
==
mod_wsgi.c:9408:23: warning: using the result of an assignment as a condition
without parentheses
[-Wparentheses]
if (value = entry->pass_authorization) {
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
mod_wsgi.c:9408:23: note: place parentheses around the assignment to silence
this warning
if (value = entry->pass_authorization) {
^
( )
mod_wsgi.c:9408:23: note: use '==' to turn this assignment into an equality
comparison
if (value = entry->pass_authorization) {
^
==
7 warnings generated.
/usr/share/apr-1/build-1/libtool --silent --mode=link
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bi
n/cc -o mod_wsgi.la -rpath /usr/libexec/apache2 -module -avoid-version
mod_wsgi.lo -Wl,-F/System/Library/Frameworks -framework Python -u _PyMac_Error
/System/Library/Frameworks/ -arch x86_64 -ldl -framework CoreFoundation
warning: no debug symbols in executable (-arch x86_64)
Madhukumars-MacBook-Air:mod_wsgi-3.4 madhu$ ls
LICENCE configure mod_wsgi.lo posix-ap2X.mk.in
Makefile configure.ac mod_wsgi.o win32-ap22py26.mk
Makefile.in mod_wsgi.c mod_wsgi.slo win32-ap22py27.mk
README mod_wsgi.la posix-ap1X.mk.in win32-ap22py31.mk
Original comment by madhuses...@gmail.com
on 22 Feb 2014 at 8:15
Which looks correct. The results are in the .libs subdirectory. If you were to
use 'sudo make install' it will install the .so file in the Apache modules
directory.
Original comment by Graham.Dumpleton@gmail.com
on 22 Feb 2014 at 9:04
Thanks! It was very helpful
Original comment by madhuses...@gmail.com
on 4 Mar 2014 at 6:01
Wish we can wrap this but mske install errors out.
sh-3.2# make install
mkdir -p
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bi
n/cc/usr/libexec/apache2
mkdir:
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bi
n/cc/usr/libexec/apache2: Not a directory
make: ***
[/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/b
in/cc/usr/libexec/apache2] Error 1
Is there any documentation other than Pep 333 which provides a sample .py?
Original comment by madhuses...@gmail.com
on 4 Mar 2014 at 7:32
There is still something broken in your operating system configuration files
for apxs etc from whatever changes you made and then tried to revert.
What are the DESTDIR and LIBEXECDIR settings from the Makefile?
What do yo get from running:
apxs -q LIBEXECDIR
What do you get from running :
env | grep DESTDIR
The settings in the Makefile on MacOS X 10.9 should be:
DESTDIR =
LIBEXECDIR = /usr/libexec/apache2
For some reason, due to the changes you have been making they don't appear to
be set to this.
After you made your changes, did you go back and do a:
make distclean
in the source code and rerun 'configure'.
If you didn't you likely didn't replace the Makefile with one which used the
correct configuration.
As far as WSGI samples, don't use raw WSGI. Go use a simple framework such as
Flask to get started.
Original comment by Graham.Dumpleton@gmail.com
on 4 Mar 2014 at 8:45
Closing this as don't deem there is anything to do. Version 4.X of mod_wsgi
greatly improves the build experience for MacOS X and accommodates for fact
that Apple breaks their apxs configuration.
Original comment by Graham.Dumpleton@gmail.com
on 16 Sep 2014 at 6:48
Original issue reported on code.google.com by
madhuses...@gmail.com
on 13 Feb 2014 at 7:10