I try to compile mod_wsgi with Cool Stack 1.3.1 on the Solaris platform:
export PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/sfw/bin:/usr开发者_开发技巧/ccs/bin
FLAGS="-I/opt/coolstack/include" LIBS="-lintl -lgettextlib" \
LD_LIBRARY_PATH=/opt/coolstack/lib LDFLAGS="-L/opt/coolstack/lib -R/opt/coolstack/lib" \
./configure --prefix=/usr/local/mod_wsgi \
--with-apxs=/opt/coolstack/apache2/bin/apxs \
--with-python=/opt/csw/bin/python
I get this error message:
# make
/opt/coolstack/apache2/bin/apxs -c -I/usr/local/include/python2.6 -DNDEBUG mod_wsgi.c -L/opt/coolstack/lib -R/opt/coolstack/lib -L/usr/local/lib -L/usr/local/lib/python2.6/config -lpython2.6 -lsocket -lnsl -lrt -ldl -lm
/opt/coolstack/apache2/build/libtool --silent --mode=compile cc -prefer-pic -DSSL_EXPERIMENTAL -DSSL_ENGINE -xO4 -xtarget=generic -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/coolstack/apache2/include -I/opt/coolstack/apache2/include -I/opt/coolstack/apache2/include -I/opt/coolstack/include -I/usr/local/include/python2.6 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
/opt/coolstack/apache2/build/libtool: line 1320: cc: command not found
apxs:Error: Command failed with rc=65536
What's wrong?
You don't have SUN C/C++ compiler installed. The Cool Stack packages appear to have been built with that compiler and not gcc and in the case of Apache apxs/libtool, that is probably hardwired into the tools. Thus, when those tools are used, they will fail as can't find that compiler.
Note that it is not enough just to change 'cc' to 'gcc' as the tools are specifically configured for the compiler in question and use different options depending on which compiler it was configured for. In other words, it is not dynamic, with such information only filled out when the tools are configure/installed.
精彩评论