I am trying to configure XAMPP 1.7.3 on OSX 10.7.2 Lion to use mod_wsgi 3.3. Here is what I am doing:
Installed XAMPP for OSX 1.7.3 and the Developer Package. All is running well at this point.
Downloaded and extracted http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
./configure
make
sudo make install
This copies the compiled mod_wsgi.so file into the OSX apache, but I want it in XAMPP, so I copy:
sudo cp /usr/libexec/apache2/mod_wsgi.so /Applications/XAMPP/xamppfiles/modules/
Add the module to the XAMPP httpd.conf LoadModule wsgi_module modules/mod_wsgi.so
Start XAMPP Apache, I get the following notice in the error_log:
[notice] Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_wsgi/3.3 Python/2.7.1 PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
When I visit http://localhost, i get this error (via Chrome):
`Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.`
and this error is printed to the error_log:
`[notice] child pid 22847 exit signal Bus error (10)`
I don't know how to troubleshoot this error or what I am missing. Any insight is appreciated!!
UPDATE
I found a blog here that discusses using apache extensions module with this command:
./configure --with-apxs=/Applications/XAMPP/xamppfiles/bin/apxs --with-python=/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
The configure looks good, but I get this compiler error:
/Applications/XAMPP/xamppfiles/bin/apxs -c -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE -Wc,'-arch i386' -Wc,'-arch ppc' mod_wsgi.c -Wl,-F/System/Library/Frameworks -framework Python -u _PyMac_Error /System/Library/Frameworks/ -arch i386 -arch ppc -ldl -framework CoreFoundation
Use of assignment to $[ is deprecated at /Applications/XAMPP/xamppfiles/bin/apxs line 86.
/Applications/XAMPP/xamppfiles/build/libtool --silent --mode=compile gcc -prefer-pic -I/Applications/XAMPP/xamppfiles/include -L/Applications/XAMPP/xamppfiles/lib -mmacosx-version-min=10.4 -arch i386 -arch ppc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/Applications/XAMPP/xamppfiles/include -I/Applications/XAMPP/xamppfiles/include -I/Applications/XAMPP/xamppfiles/include -I/Applications/XAMPP/xamppfiles/include -arch i386 -arch ppc -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//cco5iCcm.out
apxs:Error: Command failed with rc=65536
You need to use --with-apxs option to configure to make it use the apxs from XAMPP distro. If they don't supply one so as to be able to compile extra Apache modules, then the XAMPP distro can't be used.
In other words, you need to compile mod_wsgi against the Apache you want to use, not a different one.
Go read about --with-apxs in instructions:
http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide#Configuring_The_Source_Code
Related
I am trying to install Lektor on a MacbookPro with OS X 10.6.8.
Imagemagick and Python2.7 are already installed.
When I run the installation command:
curl -sf https://www.getlektor.com/install.sh | sh
The build process runs until it gets an error when building '_watchdog_fsevents' extension. The error is:
cc1: error: -Werror=unused-command-line-argument-hard-error-in-future: No option -Wunused-command-line-argument-hard-error-in-future
I've cut and pasted the output just prior to the error into the following code section.
How should I overcome this?
running build_ext
building '_watchdog_fsevents' extension
creating build/temp.macosx-10.6-x86_64-2.7
creating build/temp.macosx-10.6-x86_64-2.7/src
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -Wno-error=unused-command-line-argument-hard-error-in-future -DWATCHDOG_VERSION_STRING="0.8.3" -DWATCHDOG_VERSION_MAJOR=0 -DWATCHDOG_VERSION_MINOR=8 -DWATCHDOG_VERSION_BUILD=3 -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/watchdog_fsevents.c -o build/temp.macosx-10.6-x86_64-2.7/src/watchdog_fsevents.o -std=c99 -pedantic -Wall -Wextra -fPIC -Wno-error=unused-command-line-argument-hard-error-in-future
cc1: error: -Werror=unused-command-line-argument-hard-error-in-future: No option -Wunused-command-line-argument-hard-error-in-future
cc1: error: -Werror=unused-command-line-argument-hard-error-in-future: No option -Wunused-command-line-argument-hard-error-in-future
error: command 'gcc-4.2' failed with exit status 1
----------------------------------------
Failed building wheel for watchdog
Failed to build watchdog
Most likely your version of OS X is too old to support the installation of watchdog with the version of gcc you have. If you cannot upgrade your OS X installation then I recommend installing a recent version of clang via brew and install lektor after exporting CC=clang.
Note though that Lektor is not tested for OS X < 10.9.
Your problem may be an updated version of Xcode in which you have not agreed to the license. Try running this first:
sudo xcodebuild -license
scroll to the very bottom and it will allow you to type "agree".
This resolved the issue for me.
When I execute
sudo pip install pandas
I get the error:
creating build/temp.macosx-10.9-intel-2.7/pandas/src/datetime
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Ipandas/src/klib -Ipandas/src -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/index.c -o build/temp.macosx-10.9-intel-2.7/pandas/index.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
I have installed xcode and xcode command line tools.
In fact, I can confirm that cc is installed by executing:
cc -v
which returns:
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
These flags ended up letting me install it:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
and then (of course):
sudo -E pip install pandas
Thanks #user3378649 for the flags suggestion - that got me thinking along the right track!
Can you please these commands for more information.
As long as you didn't mention what you used to overcome this problem, I'd suggest different approaches to help narrow down in order to find the problem:
First Solution :
Run these flags :
export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
if it doesn't work
run these flags :
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
Second Solution :
Get Homebrew - it's a one-line shell script to install!
Edit your .profile, or whatever is appropriate, and put /usr/local/bin at the start of -your PATH so that Homebrew binaries are found before system binaries
brew install python - this installs a newer version of python in /usr/local
run "pip install pandas"
Third Solution :
use easy_install.
Execute the following command in Terminal
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:$(PATH)}"
export PATH
Then :
$ sudo easy_install pandas
I get the error oci.h missing on running the installation:
cpan DBD::Oracle on OS X 10.8.
How can I fix this?
The specific error message is:
/usr/bin/perl -p -e "s/~DRIVER~/Oracle/g" /Library/Perl/5.12/darwin-thread-multi- 2level/auto/DBI/Driver.xst > Oracle.xsi
/usr/bin/perl /System/Library/Perl/5.12/ExtUtils/xsubpp -typemap /System/Library/Perl/5.12/ExtUtils/typemap -typemap typemap Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c
clang -c -I/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBI -arch i386 -arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include -Os -DVERSION=\"1.68\" -DXS_VERSION=\"1.68\" "-I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0.3\" -DORA_OCI_102 -DORA_OCI_112 Oracle.c
In file included from Oracle.xs:1:
./Oracle.h:37:10: fatal error: 'oci.h' file not found
I had the same issue and I managed to solve it by adding the include directory of the oracle instance client sdk to C_INCLUDE_PATH env variable and installing it from the source directory:
tar xzf DBD-Oracle-1.74.tar.gz
cd DBD-Oracle-1.74
export C_INCLUDE_PATH="/opt/oracle/instantclient_12_2/sdk/include"
perl Makefile.PL
make
make install
It looks like you're trying to install DBD::Oracle without having installed the appropriate Oracle client prerequisite. Consult DBD::Oracle::Troubleshooting::Macos, DBD::Oracle installation nodes, ensure that the require environment variables are setup. It's easier to install this module outside of the cpan tool.
I took the following steps after reading suggestions from http://andhikalegawa.wordpress.com/2012/01/05/installing-mysql-python-on-snow-leopard-using-xampp-mysql/
Downloaded MySQL-python-1.2.4b4 and unzipped
Changed the mysql_config = /Applications/XAMPP/xamppfiles/bin/mysql_config (as I am using XAMPP 1.7.3)
Downloaded mysql-5.1.70-osx10.6-x86 (I could not find 5.1.55 which is the version used in XAMPP) kept the include folder at /Applications/XAMPP/xamppfiles/
I am new to development so, downloaded XCode 4.6.3 with command line tools.
Logically it should have worked I am getting the following error
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.7-intel-2.7/MySQLdb
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.7-intel-2.7
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,4,'beta',4) -D_version_=1.2.4b4 -I/Applications/XAMPP/xamppfiles/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -mmacosx-version-min=10.4 -arch i386 -arch ppc -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
In file included from _mysql.c:44:
/Applications/XAMPP/xamppfiles/include/my_config.h:1088:1: warning: "HAVE_WCSCOLL" redefined
In file included from /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:8,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h:891:1: warning: this is the location of the previous definition
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/6p/8bxdl12d2nq05dmwbmdzttt40000gn/T//cc0v0ehE.out
error: command 'llvm-gcc-4.2' failed with exit status 255
Looks like it's trying to compile universal for PowerPC, which you probably don't have?
error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2'
I would suggest setting the ARCHFLAGS:
shell> rm -Rf build/
shell> ARCHFLAGS="-arch i386" /usr/bin/python setup.py build
Or instead of i386, on 64-bit x86_64. But since you are downloading 32-bit MySQL, might be good to use i386.
Good luck! (Shameless advert: you can always try MySQL Connector/Python)
Trying to install Cython so I can use openKinect Python wrapper.
I downloaded Xcode from the appstore (no install options. lame).
Im getting the following compile errors when trying to install
I also tried easy_install and that failed as well.
Error Code below
creating build/temp.macosx-10.6-universal-2.6/Cython/Plex
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -
Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -
I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c
./Cython/Plex/Scanners.c -o build/temp.macosx-10.6-universal-
2.6/./Cython/Plex/Scanners.o
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler
(/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as)
for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
./Cython/Plex/Scanners.c:6694: fatal error: error writing to -: Broken pipe
Before your command (but after any sudo) put
env ARCHFLAGS="-arch i386 -arch x86_64"
(When installing, you may want to omit the arch you don't have)
I do not have a Mac, I'm just putting through advice from python easy_install fails with "assembler for architecture ppc not installed" on Mac OS X
I had the same issue (with Cython installation and other modules).
Using krzysz00's advice, here are the exact steps (Mac OS X 10.6.8) :
$ uname -a
Darwin machine_name 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
$ cd Cython-0.14.1
$ sudo su -
# export ARCHFLAGS="-arch i386 -arch x86_64"
# python ./setup.py install
# exit
$
$ which cython
/usr/local/bin/cython