[mod_python] Make problem on solaris - ld: fatal: library -lpython2.5: not found

Brian Lyttle lists at sourcefoundry.co.uk
Sun May 11 17:31:23 EDT 2008


Hi

I'm a mod_python newbie and was following a tutorial at
http://www.8bitb.us/post/django-joyent-accelerator-hard-way/ and
trying to build mod_python-3.3.1 from source. Server OS is Sun/Solaris
and I have Python 2.5.1 with the patch from the tutorial.  Make
results in this error:

ld: fatal: File processing errors. No output written to
build/lib.solaris-2.11-i86pc-2.5/m
od_python/_psp.so
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
gmake[1]: *** [build] Error 1
gmake[1]: Leaving directory
`/home/brianly/sandbox/djsetup/mod_python-3.3.1/dist'
gmake: *** [do_dso] Error 2

Do I need to install a particular shared library?

I've looked at the previous responses
(http://www.modpython.org/pipermail/mod_python/2007-February/023219.html)
but not sure what to change? My ./configure for the python build
includes --enable-shared

-Brian

Configure output:

[xyz123:~/sandbox/djsetup/mod_python-3.3.1] brianly$ ./configure
--with-apxs=/opt/local/
apache2/bin/apxs --with-python=/opt/local/bin/python
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... /opt/csw/bin/ginstall -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... /opt/local/apache2/bin/apxs executable, good
checking Apache version... 2.2.8
checking for Apache libexec directory... /opt/local/apache2/modules
checking for Apache include directory... -I/opt/local/apache2/include
checking for gcc on Solaris possible missing _eprintf problem... "done"
checking for --with-python... /opt/local/bin/python
checking Python version... 2.5
checking Python install prefix... /opt/local
checking checking where python libraries are installed...
/opt/local/lib/python2.5
checking for Py_NewInterpreter in -lpython2.5... yes
checking what libraries Python was linked with... -lpython2.5
-lsocket -lnsl -ldl    -lm

checking linker flags used to link Python...
checking where Python include files are... -I/opt/local/include/python2.5
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... /opt/csw/bin/flex
found /opt/csw/bin/flex, we'll use this. Use --with-flex to specify another.
checking flex version... configure: WARNING: Flex version 2.5.4 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

Make output (truncated):

building 'mod_python._psp' extension
creating build/temp.solaris-2.11-i86pc-2.5
creating build/temp.solaris-2.11-i86pc-2.5/home
creating build/temp.solaris-2.11-i86pc-2.5/home/brianly
creating build/temp.solaris-2.11-i86pc-2.5/home/brianly/sandbox
creating build/temp.solaris-2.11-i86pc-2.5/home/brianly/sandbox/djsetup
creating build/temp.solaris-2.11-i86pc-2.5/home/brianly/sandbox/djsetup/mod_python-3.3.1
creating build/temp.solaris-2.11-i86pc-2.5/home/brianly/sandbox/djsetup/mod_python-3.3.1/s
rc
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-fPIC -I/home/brianly/s
andbox/djsetup/mod_python-3.3.1/src/include
-I/opt/local/include/python2.5 -c /home/brianl
y/sandbox/djsetup/mod_python-3.3.1/src/psp_string.c -o
build/temp.solaris-2.11-i86pc-2.5/h
ome/brianly/sandbox/djsetup/mod_python-3.3.1/src/psp_string.o
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-fPIC -I/home/brianly/s
andbox/djsetup/mod_python-3.3.1/src/include
-I/opt/local/include/python2.5 -c /home/briany
/sandbox/djsetup/mod_python-3.3.1/src/psp_parser.c -o
build/temp.solaris-2.11-i86pc-2.5/ho
me/brianly/sandbox/djsetup/mod_python-3.3.1/src/psp_parser.o
In file included from /opt/local/include/python2.5/Python.h:8,
                 from
/home/brianly/sandbox/djsetup/mod_python-3.3.1/src/include/psp_parse
r.h:23,
                 from psp_parser.l:29:
/opt/local/include/python2.5/pyconfig.h:917:1: warning:
"_FILE_OFFSET_BITS" redefined
In file included from /usr/include/iso/stdarg_c99.h:52,
                 from /usr/include/stdarg.h:51,
                 from
/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/include/stdio.h:14,
                 from psp_parser.c:20:
/usr/include/sys/feature_tests.h:209:1: warning: this is the location
of the previous defi
nition
psp_parser.c:1436: warning: 'yyunput' defined but not used
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-fPIC -I/home/brianly/s
andbox/djsetup/mod_python-3.3.1/src/include
-I/opt/local/include/python2.5 -c /home/brianl
y/sandbox/djsetup/mod_python-3.3.1/src/_pspmodule.c -o
build/temp.solaris-2.11-i86pc-2.5/h
ome/brianly/sandbox/djsetup/mod_python-3.3.1/src/_pspmodule.o
In file included from /opt/local/include/python2.5/Python.h:8,
                 from
/home/brianly/sandbox/djsetup/mod_python-3.3.1/src/include/psp_parse
r.h:23,
                 from
/home/brianly/sandbox/djsetup/mod_python-3.3.1/src/_pspmodule.c:26:
/opt/local/include/python2.5/pyconfig.h:917:1: warning:
"_FILE_OFFSET_BITS" redefined
In file included from /usr/include/iso/stdarg_c99.h:52,
                 from /usr/include/stdarg.h:51,
                 from
/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/include/stdio.h:14,
                 from include/psp_flex.h:24,
                 from
/home/brianly/sandbox/djsetup/mod_python-3.3.1/src/_pspmodule.c:25:
/usr/include/sys/feature_tests.h:209:1: warning: this is the location
of the previous defi
nition
/home/brianly/sandbox/djsetup/mod_python-3.3.1/src/_pspmodule.c:32:
warning: 'yy_init_glob
als' defined but not used
gcc -shared build/temp.solaris-2.11-i86pc-2.5/home/brianly/sandbox/djsetup/mod_python-3.3.
1/src/psp_string.o
build/temp.solaris-2.11-i86pc-2.5/home/brianly/sandbox/djsetup/mod_pyth
on-3.3.1/src/psp_parser.o
build/temp.solaris-2.11-i86pc-2.5/home/brianly/sandbox/djsetup/m
od_python-3.3.1/src/_pspmodule.o -lpython2.5 -o
build/lib.solaris-2.11-i86pc-2.5/mod_pytho
n/_psp.so
ld: fatal: library -lpython2.5: not found
ld: fatal: File processing errors. No output written to
build/lib.solaris-2.11-i86pc-2.5/m
od_python/_psp.so
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
gmake[1]: *** [build] Error 1
gmake[1]: Leaving directory
`/home/brianly/sandbox/djsetup/mod_python-3.3.1/dist'
gmake: *** [do_dso] Error 2


More information about the Mod_python mailing list