[mod_python] Newbie needs help: Compile errors, segfault, and warnings on Solaris 2.6 w/ apache 2.0.44 and mod_python 3.0.1

Mike Looijmans mike.looijmans at asml.com
Fri Feb 14 09:46:01 EST 2003


System & software:

SUN Ultra-10 (called wsasd464)
Solaris 2.6 installed (SunOS 5.6)
GCC version 2.8.1 (Please don't tell me to use 2.9.5 - It's company politics
prohibiting me from using that - I had no problems compiling apache and
python)
Apache 2.0.44 compiled, installed, up and running (/usr/local/apache/...)
Python 2.2.2 compiled, installed (/usr/local)

(Also MySQL and Python-to-MySQL 0.91 but this seems irrelevant)

Problem:

wsasd464:/scratch/download/apache/mod_python-3.0.1 %
./configure --with-apxs=/usr/local/apache/bin/apxs --with-python=/usr/local/bi
n/python

[== lots of OK's here, no problems ==]

wsasd464:/scratch/download/apache/mod_python-3.0.1 % smake
ar -x `gcc -print-libgcc-file-name` _eprintf.o
ar -x `gcc -print-libgcc-file-name` _floatdidf.o

Compiling for DSO. For static, do "make static"

/usr/local/apache/bin/apxs -I/usr/local/asm/download/apache/mod_python-3.0.1/s
rc/include -I/usr/local/apache/include -I/usr/local/include/python2.2 -c
mod_python.c _apachemodule.c requestobject.c tableobject.c util.c
serverobject.c connobject.c filterobject.c hlist.c
hlistobject.c -L/usr/local/lib/python2.2/config -lm  -lpython2.2   -lsocket -l
nsl -ldl  -lpthread -lthread   -lm _eprintf.o _floatdidf.o
/usr/local/apache/build/libtool --silent --mode=compile
cc -prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -DSOLARIS2=6 -D_POSIX_PTHREAD
_SEMANTICS -D_REENTRANT -g -O2 -I/usr/local/apache/include -I/usr/local/asm/do
wnload/apache/mod_python-3.0.1/src/include -I/usr/local/apache/include -I/usr/
local/include/python2.2  -c -o mod_python.lo mod_python.c && touch
mod_python.slo
In file included from /usr/local/include/python2.2/Python.h:24,
                 from
/usr/local/asm/download/apache/mod_python-3.0.1/src/include/mod_python.h:92,
                 from mod_python.c:67:
/usr/local/include/python2.2/pyconfig.h:104: warning: `_FILE_OFFSET_BITS'
redefined
/usr/include/sys/feature_tests.h:80: warning: this is the location of the
previous definition


[==this warning appears a dozen times repeatedly==]

[===Then I get this near the end ===]

*** Warning: Linking the shared library mod_python.la against the non-libtool
*** objects  _eprintf.o _floatdidf.o is not portable!
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
grep: illegal option -- L
grep: illegal option -- /
grep: illegal option -- u
grep: illegal option -- r
grep: illegal option -- /
grep: illegal option -- o
grep: illegal option -- a
grep: illegal option -- /
grep: illegal option -- /
grep: illegal option -- p
grep: illegal option -- t
grep: illegal option -- o
grep: illegal option -- 2
grep: illegal option -- .
grep: illegal option -- 2
grep: illegal option -- /
grep: illegal option -- o
grep: illegal option -- f
grep: illegal option -- g
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
grep: illegal option -- p
grep: illegal option -- t
grep: illegal option -- o
grep: illegal option -- 2
grep: illegal option -- .
grep: illegal option -- 2
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
grep: illegal option -- o
grep: illegal option -- k
grep: illegal option -- e
grep: illegal option -- t
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
grep: illegal option -- d
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
grep: illegal option -- p
grep: illegal option -- t
grep: illegal option -- r
grep: illegal option -- e
grep: illegal option -- a
grep: illegal option -- d
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
grep: illegal option -- t
grep: illegal option -- r
grep: illegal option -- e
grep: illegal option -- a
grep: illegal option -- d
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- e
grep: illegal option -- m
Usage: grep -hblcnsviw pattern file . . .

Now su and make install
  (or, if you only want to perform a partial install,
   you can use make install_dso and make install_py_lib)

wsasd464:/scratch/download/apache/mod_python-3.0.1 % smake install

[== stuff here appears OK ==]

Took a gamble and installed it anyway. Investigating the Makefiles leaded me
to conclude that the "grep" errors seem to come from the 'apxs' program in
Apache, which unfortunately appears to have been written in Perl so I couldn't
understand much of it.

Now, I configured apache to load the module, and created 'mptest.py' as
suggested in the manual. Attempting to access it will yield an empty document
(no data at all, no headers).

Looking in the error_log of apache yields:

[Fri Feb 14 09:06:46 2003] [notice] child pid 10171 exit signal Segmentation
fault (11)








More information about the Mod_python mailing list