[Python-bugs-list] [ python-Bugs-446588 ] Python-2.2a1 build dies
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 01 Aug 2001 15:34:35 -0700
Bugs item #446588, was opened at 2001-07-31 15:17
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470
Category: Build
Group: Python 2.2
Status: Open
Resolution: Works For Me
Priority: 3
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python-2.2a1 build dies
Initial Comment:
after doing:
./configure --prefix=$HOME/local/STOW
make
the build bombs in the install phase with:
usr/bin/install -c ./install-sh
/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/install-sh
/usr/bin/install -c -m 644 ./Misc/Makefile.pre.in
/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/config/Makefile.pre.in
PYTHONPATH= ./python ./setup.py install \
--install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "./setup.py", line 6, in ?
import sys, os, getopt
ImportError: No module named os
make[1]: *** [sharedinstall] Error 1
make[1]: Leaving directory
`/mcallister0/home/mahler/local/SRC/Python-2.2a1'
make: *** [STOW/Python-2.2a1] Error 2
rm SRC/Python-2.2a1make: unlink: SRC/Python-2.2a1: Is a
directory
STOW/Python-2.2a1make: unlink: STOW/Python-2.2a1: Is a
directory
SRC/Python-2.2a1/Makefile
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-01 15:34
Message:
Logged In: YES
user_id=6380
Need more info. Try this:
./python
>>> import sys
>>> print sys.path
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2001-08-01 15:19
Message:
Logged In: NO
python only starts correctly if I give it the Lib path:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ ./python -v
'import site' failed; traceback:
ImportError: No module named site
Python 2.2a1 (#4, Aug 1 2001, 16:55:28)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on
linux2
Type "copyright", "credits" or "license" for more
information.
Traceback (most recent call last):
File "/home/mahler/.pythonrc.global.py", line 1, in ?
import os
ImportError: No module named os
>>>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ PYTHONPATH=Lib ./python -v
# Lib/site.pyc matches Lib/site.py
import site # precompiled from Lib/site.pyc
# Lib/os.pyc matches Lib/os.py
import os # precompiled from Lib/os.pyc
import posix # builtin
# Lib/posixpath.pyc matches Lib/posixpath.py
import posixpath # precompiled from Lib/posixpath.pyc
# Lib/stat.pyc matches Lib/stat.py
import stat # precompiled from Lib/stat.pyc
# Lib/UserDict.pyc matches Lib/UserDict.py
import UserDict # precompiled from Lib/UserDict.pyc
Python 2.2a1 (#4, Aug 1 2001, 16:55:28)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on
linux2
Type "copyright", "credits" or "license" for more
information.
#
/mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc
matches
/mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.py
import string # precompiled from
/mcallister0/home/mahler/local/SRC/Python-2.2a1/Lib/string.pyc
>>>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Daniel
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-01 15:08
Message:
Logged In: YES
user_id=6380
Hm. Why does the newly built image not know that ./Lib is
the library? This works for me! (Note that PYTHONPATH gets
appended to the default sys.path, so setting it empty
shouldn't make a difference.)
What happens when you execute ./python at the command line?
Does "import site" also fail there?
Please try to poke around for more evidence.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2001-08-01 15:00
Message:
Logged In: NO
Yes, I made a boo boo:
--prefix=$HOME/local/STOW/Python-2.2a1
$PYTHONHOME is $HOME/local
since I use stow to manage all my dowloaded software in
$HOME/local.
This has always worked in the past.
I have a script which automactes the whole
untar, configure,make, install process to stop me making
errors like the above.
The problem appears to be that last command:
PYTHONPATH= ./python ./setup.py install ...
sets the $PYTHONPATH to be empty and the newly built image
does not know that the libraries are in the Lib directory
just below it.
doing
PYTHONPATH=./Lib ./python ./setup.py install
--install-platlib=/home/mahler/local/STOW/Python-2.2a1/lib/python2.2/lib-dynload
does not crash but produces a whole bunch of warnings like:
building 'zlib' extension
skipping
/mcallister0/home/mahler/local/SRC/Python-2.2a1/Modules/zlibmodule.c
(build/temp.linux-i686-2.2/zlibmodule.o up-to-date)
gcc -shared build/temp.linux-i686-2.2/zlibmodule.o
-L/usr/local/lib -lz -o build/lib.linux-i686-2.2/zlib.so
WARNING: removing "zlib" since importing it failed
Daniel
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-01 13:55
Message:
Logged In: YES
user_id=6380
I can't reproduce this; configuring with a prefix works
fine.
Your story seems inconsistent: you say you configured with
prefix $HOME/local/STOW, but the output you cite looks like
it was configured with prefix $HOME/local/STOW/Python-2.2a1.
What platform? What's $PYTHONHOME?
Try adding -v to the python invocation that fails to see the
failure traceback.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446588&group_id=5470