Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac 10.12.5 install mod_wsgi currently, configure not working #207

Closed
MichaelThompson32214 opened this issue Jun 24, 2017 · 9 comments
Closed

Comments

@MichaelThompson32214
Copy link

MichaelThompson32214 commented Jun 24, 2017

If you need a test subject, I think I can help in that department.

I guess some particulars:
Mac IOS 10.12.5
Apache 2.4.25
XCode 8.3.3

After downloaded your program and below is the outcome:

~/Downloads/mod_wsgi/mod_wsgi-develop$ ./configure
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: /usr/bin/apr-1-config: No such file or directory
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: exec: /usr/bin/apr-1-config: cannot execute: No such file or directory
Use of uninitialized value $apr_major_version in numeric lt (<) at /usr/sbin/apxs line 348.
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apu-1-config not found!.
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: /usr/bin/apr-1-config: No such file or directory
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: exec: /usr/bin/apr-1-config: cannot execute: No such file or directory
Use of uninitialized value $apr_major_version in numeric lt (<) at /usr/sbin/apxs line 348.
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apu-1-config not found!.
cat: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/share/apr-1/build-1/libtool: No such file or directory
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 ISO C89... none needed
checking for prctl... no
checking Apache version... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: /usr/bin/apr-1-config: No such file or directory
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: exec: /usr/bin/apr-1-config: cannot execute: No such file or directory
Use of uninitialized value $apr_major_version in numeric lt (<) at ./apxs line 348.
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apu-1-config not found!.
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: /usr/bin/apr-1-config: No such file or directory
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: exec: /usr/bin/apr-1-config: cannot execute: No such file or directory
Use of uninitialized value $apr_major_version in numeric lt (<) at ./apxs line 348.
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apu-1-config not found!.
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: /usr/bin/apr-1-config: No such file or directory
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: exec: /usr/bin/apr-1-config: cannot execute: No such file or directory
Use of uninitialized value $apr_major_version in numeric lt (<) at ./apxs line 348.
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apu-1-config not found!.
2.4.25
checking for python... /usr/bin/python
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: /usr/bin/apr-1-config: No such file or directory
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: exec: /usr/bin/apr-1-config: cannot execute: No such file or directory
Use of uninitialized value $apr_major_version in numeric lt (<) at ./apxs line 348.
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apu-1-config not found!.
configure: creating ./config.status
config.status: creating Makefile

It looks like Makefile was made, below is what I did next:

~/Downloads/mod_wsgi/mod_wsgi-develop$ sudo make
Password:
./apxs -c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE -Wc,-g -Wc,-O2 -Wc,'-arch x86_64' src/server/mod_wsgi.c src/server/wsgi_*.c -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -arch x86_64 -lpython2.7 -ldl -framework CoreFoundation
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: /usr/bin/apr-1-config: No such file or directory
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config: line 16: exec: /usr/bin/apr-1-config: cannot execute: No such file or directory
Use of uninitialized value $apr_major_version in numeric lt (<) at ./apxs line 348.
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apu-1-config not found!.
make: *** [src/server/mod_wsgi.la] Error 1
~/Downloads/mod_wsgi/mod_wsgi-develop$

At this point I am kind of lost, but still curious. Do you have any suggestions?

@GrahamDumpleton
Copy link
Owner

GrahamDumpleton commented Jun 26, 2017

What do you get if you run:

xcode-select  --install

Does it offer to install Xcode command line tools, or say you already have them installed?

And what do you get for:

ls -las /Applications/Xcode.app/Contents/Developer/Toolchains/

@GrahamDumpleton
Copy link
Owner

BTW, using the CMMI installation method on MacOS X is also not recommended as System Integrity Protection (SIP) on MacOS X can prevent you from installing additional Apache modules.

The recommended method of installation on MacOS X is to use pip install mod_wsgi method, as explained in:

That still requires working apr-1-config and apu-1-config programs though.

@GrahamDumpleton
Copy link
Owner

Closing. The configure/make/make install method is not supported on MacOS using Apple native tools anymore. Must use pip install method.

@Winnixiaowan
Copy link

`luxiaowandembp:mod_wsgi-4.6.4 luxiaowan$ ./configure
checking for apxs2... no
checking for apxs... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 ISO C89... none needed
checking for prctl... no
checking Apache version... ./configure: line 2765: apxs: command not found
./configure: line 2765: apxs: command not found
./configure: line 2766: apxs: command not found
./configure: line 2769: /: is a directory

checking for python... /usr/bin/python
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't map input file: / (Invalid argument)
./configure: line 2964: apxs: command not found
configure: creating ./config.status
config.status: creating Makefile
luxiaowandembp:mod_wsgi-4.6.4 luxiaowan$
`

checking for apxs... no mean that I should install apxs?

@GrahamDumpleton
Copy link
Owner

You now need to install both Xcode app, and Xcode command line tools. It is not enough to install just the command line tools.

@GrahamDumpleton
Copy link
Owner

GrahamDumpleton commented Aug 20, 2018

Actually, you can't use configure/make/make install on macos any more. Must use pip install method. See:

I actually say that above if read it.

@Winnixiaowan
Copy link

Got it.
Thanks a lot.

@tilek
Copy link

tilek commented Dec 13, 2018

Thanks Graham, that saved a ton of time!

@jonathanberger
Copy link

jonathanberger commented Sep 3, 2020

Would it be useful to change the documentation at https://modwsgi.readthedocs.io/en/develop/user-guides/installation-on-macosx.html to reflect this advice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants