This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: UnicodeError in compileall if "make install" is run before "make".
Type: behavior Stage:
Components: Build Versions: Python 2.6, Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: collinwinter, jafo, swarren, vanandel
Priority: normal Keywords: patch

Created on 2007-04-20 13:01 by vanandel, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py_1704287.diff swarren, 2007-09-21 06:04
Messages (7)
msg31846 - (view) Author: Joseph VanAndel (vanandel) Date: 2007-04-20 13:01
"make install" fails unless you've already run "make".
Not a show-stopper, but specifying the correct dependencies for "make install" would force everything to be built before it was installed.
msg31847 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-06-05 18:43
What do you mean by "fails"? What platform are you using? What version of make are you using?

I'm unable to reproduce this on Ubuntu Dapper Drake (using GNU Make 3.81beta4).
msg31848 - (view) Author: Joseph VanAndel (vanandel) Date: 2007-06-05 21:55
With CentOS 5 (clone of Redhat Enterprise 5), if you run "make install" before running "make", the make stops with the error:

Compiling /opt/local/lib/python2.5/xml/sax/saxutils.py ...
Compiling /opt/local/lib/python2.5/xml/sax/xmlreader.py ...
Compiling /opt/local/lib/python2.5/xmllib.py ...
Compiling /opt/local/lib/python2.5/xmlrpclib.py ...
Compiling /opt/local/lib/python2.5/zipfile.py ...
make: *** [libinstall] Error 1


make version is 3.81



msg56069 - (view) Author: Stephen Warren (swarren) Date: 2007-09-21 05:29
I can confirm this happens for me too, also on CentOS 5, with SVN 2.5
HEAD as of now.

It seems that this problem occurs, whilst running the first compileall
command for the libinstall target:

Compiling /somewhere/lib/python2.5/test/test_multibytecodec.py ...
Sorry: UnicodeError:
  ("\\N escapes not supported (can't load unicodedatamodule)",)
msg56070 - (view) Author: Stephen Warren (swarren) Date: 2007-09-21 06:04
The attached patch should solve the problem by adding appropriate
dependencies to the libinstall target.

I have tested:

./configure; make install

but not yet:

./configure; make all install
./configure; make all; make install

Note: I introduced a new "build_all" phony target so that both all and
libinstall could depend on this, rather than making libinstall either:

* depend on all (which I guess would cause nasty looping dependencies if
one were to run "make all install")

* duplicate all the dependencies of all, thus causing a maintenance issue

Possibly, the new dependencies should be added to install instead of
libinstall?

Alternatively, I guess one could make "all" touch a file, and "install"
or "libinstall" validate that the file exists, and error out if it doesn't.
msg56071 - (view) Author: Stephen Warren (swarren) Date: 2007-09-21 06:31
Now, I have also tested:

./configure; make all install
./configure; make all; make install

The "install" piece of each of the above doesn't seem to accidentally
duplicate any of the building work, so the patch seems to check out OK -
no negative side-effects.
msg56072 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2007-09-21 06:34
I can verify that this happens in trunk (2.6) on CentOS 5, 32-bit. 
Patch review looks good, and solves the problem.  I've committed it to
trunk as revision 58225.
History
Date User Action Args
2022-04-11 14:56:23adminsetgithub: 44873
2007-09-21 06:34:59jafosetstatus: open -> closed
versions: + Python 2.6
nosy: + jafo
messages: + msg56072
resolution: accepted
type: behavior
2007-09-21 06:31:47swarrensetmessages: + msg56071
2007-09-21 06:08:51jafosetkeywords: + patch
2007-09-21 06:04:30swarrensetfiles: + py_1704287.diff
messages: + msg56070
2007-09-21 05:44:04jafosettitle: must run "make" before "make install" -> UnicodeError in compileall if "make install" is run before "make".
2007-09-21 05:29:52swarrensetnosy: + swarren
messages: + msg56069
2007-04-20 13:01:23vanandelcreate