[mod_python] Help with Solaris build of mod_python with Apache 2.2

Graham Dumpleton graham.dumpleton at gmail.com
Thu Dec 18 16:06:36 EST 2008


2008/12/19 Baptista, Paulo <Paulo_Baptista at brown.edu>:
> Thanks for getting back to me Graham.
>
> I built Python from source.  Isn't that all I need and what you're
> saying?  I built Python 2.5.1 and 2.6.1.

Somehow it hasn't been installed properly as your output clearly shows:

  /usr/local/lib/python2.6/config/Makefile

as having not being installed.

Check to see if that directory exists and post what it contains.

Graham

> root at riker:/opt/local/src/Python-2.6.1 7 ls -lrt
> total 38314
> -rwxrwxr-x   1 1000     1000        7122 Jun 14  2003 install-sh
> -rw-rw-r--   1 1000     1000       13741 Feb 29  2008 LICENSE
> -rw-rw-r--   1 1000     1000       29240 Sep  7 01:15 pyconfig.h.in
> -rw-rw-r--   1 1000     1000       38629 Oct 21 12:48 Makefile.pre.in
> -rw-rw-r--   1 1000     1000       81908 Nov  4 15:43 setup.py
> -rw-rw-r--   1 1000     1000      105857 Nov 16 03:02 configure.in
> -rwxrwxr-x   1 1000     1000      676114 Nov 16 12:57 configure
> -rw-rw-r--   1 1000     1000       56949 Dec  3 21:59 README
> drwxrwxr-x   2 1000     1000        1536 Dec  4 22:58 PCbuild
> drwxrwxr-x   2 1000     1000        2048 Dec  4 22:58 Include
> drwxrwxr-x   2 1000     1000         512 Dec  4 22:58 Grammar
> drwxrwxr-x  23 1000     1000         512 Dec  4 22:58 Demo
> drwxrwxr-x   5 1000     1000        1024 Dec  4 22:58 Misc
> drwxrwxr-x  11 1000     1000         512 Dec  4 22:58 Mac
> drwxrwxr-x  20 1000     1000         512 Dec  4 22:58 Tools
> drwxrwxr-x  10 1000     1000        1024 Dec  4 22:58 PC
> drwxrwxr-x   5 1000     1000         512 Dec  4 22:58 RISCOS
> drwxrwxr-x  16 1000     1000        1024 Dec  4 23:25 Doc
> -rwxr-xr-x   1 root     other      42971 Dec 16 11:38 config.status
> -rw-r--r--   1 root     other      38609 Dec 16 11:38 Makefile.pre
> -rw-r--r--   1 root     other      30718 Dec 16 11:38 pyconfig.h
> -rw-r--r--   1 root     other      41758 Dec 16 11:38 Makefile
> -rw-r--r--   1 root     other     512575 Dec 16 11:38 config.log
> drwxrwxr-x   3 1000     1000        2048 Dec 16 11:45 Objects
> drwxrwxr-x   2 1000     1000        1024 Dec 16 11:46 Parser
> drwxrwxr-x   2 1000     1000        2560 Dec 16 11:47 Python
> drwxrwxr-x   8 1000     1000        3584 Dec 16 11:48 Modules
> -rw-r--r--   1 root     other    9575582 Dec 16 11:48 libpython2.6.a
> -rwxr-xr-x   1 root     other    8277432 Dec 16 11:48 python
> drwxrwxr-x  44 1000     1000        6144 Dec 16 11:48 Lib
> drwxr-xr-x   5 root     other        512 Dec 16 11:55 build
> -rw-r--r--   1 root     other         49 Dec 18 11:23 mail
> root at riker:/opt/local/src/Python-2.6.1 8
>
> -----Original Message-----
> From: Graham Dumpleton [mailto:graham.dumpleton at gmail.com]
> Sent: Thursday, December 18, 2008 4:00 PM
> To: Baptista, Paulo
> Cc: mod_python at modpython.org
> Subject: Re: [mod_python] Help with Solaris build of mod_python with
> Apache 2.2
>
> You don't have the headers files, configuration files etc, needed for
> Python development installed.
>
> If you have installed Python from set of prebuilt packages for
> Solaris, you need to install the 'dev' variant of that package as
> well. If you can't obtain it, you will need to build your own version
> of Python from source code.
>
> Graham
>
> 2008/12/19 Baptista, Paulo <Paulo_Baptista at brown.edu>:
>> Hoping to get help here.  I'm new to building from src packages and
>> Solaris.
>>
>> Trying to make mod_python 3.3.1
>> Have Python 2.6.1 built
>> Have Apache2.2.3 built
>>
>> Getting the following:
>>
>> root at riker:/opt/local/src/mod_python-3.3.1 583 ./configure
>> --with-apxs=/usr/local/apache_2.2.3/bin/apxs
>> --with-python="/opt/local/src/Python-2.6.1/python -E"
>>
>> checking for gcc... gcc
>> checking for C compiler default output file name... a.out
>> checking whether the C compiler works... yes
>> checking whether we are cross compiling... no
>> checking for suffix of executables...
>> 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 ANSI C... none needed
>> checking for ar... ar
>> checking for a BSD-compatible install... ./install-sh -c
>> checking whether make sets $(MAKE)... yes
>> checking for main in -lm... yes
>> checking for an ANSI C-conforming const... yes
>> checking your blood pressure... a bit high, but we can proceed
>> configure: checking whether apxs is available...
>> checking for --with-apxs... /usr/local/apache_2.2.3/bin/apxs
> executable,
>> good
>> checking Apache version... 2.2.3
>> checking for Apache libexec directory...
> /usr/local/apache_2.2.3/modules
>> checking for Apache include directory...
>> -I/usr/local/apache_2.2.3/include
>> checking for gcc on Solaris possible missing _eprintf problem...
> "done"
>> checking for --with-python... /opt/local/src/Python-2.6.1/python -E
>> checking Python version... 2.6
>> checking Python install prefix... /usr/local
>> checking checking where python libraries are installed...
>> /usr/local/lib/python2.6
>> grep: can't open /usr/local/lib/python2.6/config/Makefile
>> grep: can't open /usr/local/lib/python2.6/config/Makefile
>> grep: can't open /usr/local/lib/python2.6/config/Makefile
>> grep: can't open /usr/local/lib/python2.6/config/Makefile
>> checking what libraries Python was linked with...
>> /usr/local/lib/python2.6/config/libpython2.6.a
>> checking linker flags used to link Python... grep: can't open
>> /usr/local/lib/python2.6/config/Makefile
>> grep: can't open /usr/local/lib/python2.6/config/Makefile
>>
>> checking where Python include files are...
>> -I/usr/local/include/python2.6
>> checking for --with-python-src... no
>> checking for --with-mutex-dir... no
>> Using MUTEX_DIR /tmp
>> checking for --with-max-locks... no
>> Using 8 MAX_LOCKS.
>> checking for --with-flex... no
>> checking for flex... /usr/local/bin/flex
>> found /usr/local/bin/flex, we'll use this. Use --with-flex to specify
>> another.
>> checking flex version... awk: syntax error near line 1
>> awk: bailing out near line 1
>> awk: syntax error near line 1
>> awk: bailing out near line 1
>> awk: syntax error near line 1
>> awk: bailing out near line 1
>> ./configure: line 3187: test: : integer expression expected
>> configure: WARNING: Flex version 2.5.33 found.
>>    Version 2.5.31 or greater is required.  You can generally ignore
>> this
>>    warning unless you need to regenerate psp_parser.c from
> psp_parse.l.
>>    If you do need regenerate psp_parser.c, use --with-flex to specify
>> the
>>    location of the correct flex version. See the README for more
>> information.
>> configure: creating ./config.status
>> config.status: creating Makefile
>> config.status: creating src/Makefile
>> config.status: creating Doc/Makefile
>> config.status: creating src/include/mod_python.h
>> config.status: creating test/Makefile
>> config.status: creating test/testconf.py
>> config.status: creating dist/setup.py
>> config.status: creating dist/Makefile
>> root at riker:/opt/local/src/mod_python-3.3.1 584 make clean
>> cd src && make clean
>> make[1]: Entering directory `/opt/local/src/mod_python-3.3.1/src'
>> rm -rf  core libpython.a mod_python.so *~ .libs *.o *.slo *.lo *.la
>> make[1]: Leaving directory `/opt/local/src/mod_python-3.3.1/src'
>> cd dist && make clean
>> make[1]: Entering directory `/opt/local/src/mod_python-3.3.1/dist'
>> rm -rf mod_python build dist
>> make[1]: Leaving directory `/opt/local/src/mod_python-3.3.1/dist'
>> cd test && make clean
>> make[1]: Entering directory `/opt/local/src/mod_python-3.3.1/test'
>> rm -f *.pyc *.pyo
>> cd conf && rm -f test.conf
>> cd htdocs && rm -f *pyc *pyo
>> rm -rf logs
>> rm -rf tmp
>> make[1]: Leaving directory `/opt/local/src/mod_python-3.3.1/test'
>> rm -f core
>> root at riker:/opt/local/src/mod_python-3.3.1 585 make
>> make[1]: Entering directory `/opt/local/src/mod_python-3.3.1/src'
>> ar -x `gcc -print-libgcc-file-name` _eprintf.o
>> ar -x `gcc -print-libgcc-file-name` _floatdidf.o
>> ar -x `gcc -print-libgcc-file-name` _muldi3.o
>>
>> Compiling for DSO.
>>
>> /usr/local/apache_2.2.3/bin/apxs
>> -I/opt/local/src/mod_python-3.3.1/src/include
>> -I/usr/local/apache_2.2.3/include -I/usr/local/include/python2.6 -c
>> mod_python.c _apachemodule.c requestobject.c tableobject.c util.c
>> serverobject.c connobject.c filterobject.c hlist.c hlistobject.c
>> finfoobject.c  -lm  /usr/local/lib/python2.6/config/libpython2.6.a
>> _eprintf.o _floatdidf.o _muldi3.o
>> /usr/local/apr/build-1/libtool --silent --mode=compile gcc -prefer-pic
>> -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
>> -D_LARGEFILE64_SOURCE -g -O2 -pthreads
> -I/usr/local/apache_2.2.3/include
>> -I/usr/local/apr/include/apr-1   -I/usr/local/apr/include/apr-1
>> -I/opt/local/openldap/include/ -I/usr/local/include
>> -I/opt/local/src/mod_python-3.3.1/src/include
>> -I/usr/local/apache_2.2.3/include -I/usr/local/include/python2.6  -c
> -o
>> mod_python.lo mod_python.c && touch mod_python.slo
>> In file included from mod_python.c:28:
>> /opt/local/src/mod_python-3.3.1/src/include/mod_python.h:80:20:
>> Python.h: No such file or directory
>> /opt/local/src/mod_python-3.3.1/src/include/mod_python.h:81:26:
>> structmember.h: No such file or directory
>> In file included from
>> /opt/local/src/mod_python-3.3.1/src/include/mod_python.h:99,
>>                 from mod_python.c:28:
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:31: error: parse
>> error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:31: warning: data
>> definition has no type or storage class
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:32: error: parse
>> error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:32: warning: data
>> definition has no type or storage class
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:33: error: parse
>> error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:33: warning: data
>> definition has no type or storage class
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:34: error: parse
>> error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:34: warning: data
>> definition has no type or storage class
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:37: error: parse
>> error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:37: error: parse
>> error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:37: warning: data
>> definition has no type or storage class
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:38: error: parse
>> error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/util.h:38: warning: data
>> definition has no type or storage class
>> In file included from
>> /opt/local/src/mod_python-3.3.1/src/include/mod_python.h:100,
>>                 from mod_python.c:28:
>> /opt/local/src/mod_python-3.3.1/src/include/hlist.h:37: error: parse
>> error before "PyObject"
>> /opt/local/src/mod_python-3.3.1/src/include/hlist.h:37: warning: no
>> semicolon at end of struct or union
>> /opt/local/src/mod_python-3.3.1/src/include/hlist.h:49: error: parse
>> error before '}' token
>> /opt/local/src/mod_python-3.3.1/src/include/hlist.h:49: warning: data
>> definition has no type or storage class
>> /opt/local/src/mod_python-3.3.1/src/include/hlist.h:51: error: parse
>> error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/hlist.h:51: error: parse
>> error before "PyObject"
>> /opt/local/src/mod_python-3.3.1/src/include/hlist.h:54: warning: data
>> definition has no type or storage class
>> /opt/local/src/mod_python-3.3.1/src/include/hlist.h:55: error: parse
>> error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/hlist.h:55: error: parse
>> error before "hl_entry"
>> /opt/local/src/mod_python-3.3.1/src/include/hlist.h:58: warning: data
>> definition has no
>> .
>> .
>> .
>> .
>>
>> /local/src/mod_python-3.3.1/src/include/mod_python.h:216: error: parse
>> error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/mod_python.h:216: warning:
>> data definition has no type or storage class
>> /opt/local/src/mod_python-3.3.1/src/include/mod_python.h:217: error:
>> parse error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/mod_python.h:217: error:
>> parse error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/mod_python.h:217: warning:
>> data definition has no type or storage class
>> /opt/local/src/mod_python-3.3.1/src/include/mod_python.h:218: error:
>> parse error before '*' token
>> /opt/local/src/mod_python-3.3.1/src/include/mod_python.h:218: warning:
>> data definition has no type or storage class
>> mod_python.c:31: error: parse error before '*' token
>> mod_python.c:31: warning: data definition has no type or storage class
>> mod_python.c:35: error: parse error before '*' token
>> mod_python.c:35: warning: data definition has no type or storage class
>> mod_python.c:54: error: parse error before '*' token
>> mod_python.c: In function `make_interpreter':
>> mod_python.c:56: error: `PyThreadState' undeclared (first use in this
>> function)
>> mod_python.c:56: error: (Each undeclared identifier is reported only
>> once
>> mod_python.c:56: error: for each function it appears in.)
>> mod_python.c:56: error: `tstate' undeclared (first use in this
> function)
>> mod_python.c:64: warning: passing arg 5 of `ap_log_error' from
>> incompatible pointer type
>> mod_python.c: At top level:
>> mod_python.c:88: error: parse error before '*' token
>> mod_python.c: In function `make_obcallback':
>> mod_python.c:91: error: `PyObject' undeclared (first use in this
>> function)
>> mod_python.c:91: error: `m' undeclared (first use in this function)
>> mod_python.c:92: error: `obCallBack' undeclared (first use in this
>> function)
>> mod_python.c:108: error: `path' undeclared (first use in this
> function)
>> mod_python.c:112: warning: passing arg 5 of `ap_log_error' from
>> incompatible pointer type
>> mod_python.c:121: warning: passing arg 5 of `ap_log_error' from
>> incompatible pointer type
>> mod_python.c:133: error: `o' undeclared (first use in this function)
>> mod_python.c:134: error: `d' undeclared (first use in this function)
>> mod_python.c:135: error: `f' undeclared (first use in this function)
>> mod_python.c:139: warning: passing arg 5 of `ap_log_error' from
>> incompatible pointer type
>> mod_python.c:151: warning: assignment makes pointer from integer
> without
>> a cast
>> mod_python.c:158: warning: passing arg 5 of `ap_log_error' from
>> incompatible pointer type
>> mod_python.c:161: warning: passing arg 5 of `ap_log_error' from
>> incompatible pointer type
>> mod_python.c: At top level:
>> mod_python.c:176: error: parse error before '*' token
>> mod_python.c:176: error: parse error before "PyInterpreterState"
>> mod_python.c: In function `save_interpreter':
>> mod_python.c:178: error: `PyObject' undeclared (first use in this
>> function)
>> mod_python.c:178: error: `p' undeclared (first use in this function)
>> mod_python.c:179: error: `idata' undeclared (first use in this
> function)
>> mod_python.c:181: error: parse error before ')' token
>> mod_python.c:182: error: `istate' undeclared (first use in this
>> function)
>> mod_python.c:186: error: `name' undeclared (first use in this
> function)
>> mod_python.c: At top level:
>> mod_python.c:199: error: parse error before '*' token
>> mod_python.c: In function `python_interpreter_name':
>> mod_python.c:201: error: `PyObject' undeclared (first use in this
>> function)
>> .
>> .
>> .
>> mod_python.c:2906: error: `req' undeclared (first use in this
> function)
>> mod_python.c: At top level:
>> mod_python.c:2908: error: parse error before '*' token
>> mod_python.c: In function `PythonTypeHandler':
>> mod_python.c:2909: error: `req' undeclared (first use in this
> function)
>> apxs:Error: Command failed with rc=65536
>> .
>> make[1]: *** [mod_python.so] Error 1
>> make[1]: Leaving directory `/opt/local/src/mod_python-3.3.1/src'
>> make: *** [do_dso] Error 2
>> root at riker:/opt/local/src/mod_python-3.3.1 586
>>
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>
>


More information about the Mod_python mailing list