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.

Author malcolmp
Recipients malcolmp
Date 2011-09-20.01:44:50
SpamBayes Score 4.021465e-08
Marked as misclassified No
Message-id <1316483091.36.0.96391936283.issue13011@psf.upfronthosting.co.za>
In-reply-to
Content
In Python 2.7.2, Linux executables built with freeze.py will only run on the machine that contains the original build directory.  This defeats the purpose of having frozen programs.  This problem did not exist in Python 2.5.

The following steps reproduce the problem:

1) Build a copy of python:

$ tar -xf Python-2.7.2.tar.bz2
$ cd Python-2.7.2
$ ./configure --prefix=`pwd`/install
$ make
$ make install

2) In another directory, build a frozen program:

$ echo 'print "Hello World"' >hello.py
$ ~/src/Python-2.7.2/python ~/src/Python-2.7.2/Tools/freeze/freeze.py hello.py
$ make
$  ./hello 
Hello World

Copy the binary to another machine:

$ $ ./hello 
Traceback (most recent call last):
  File "/home/malcolmp/src/Python-2.7.2/Lib/site.py", line 563, in <module>
  File "/home/malcolmp/src/Python-2.7.2/Lib/site.py", line 545, in main
  File "/home/malcolmp/src/Python-2.7.2/Lib/site.py", line 278, in addusersitepackages
  File "/home/malcolmp/src/Python-2.7.2/Lib/site.py", line 253, in getusersitepackages
  File "/home/malcolmp/src/Python-2.7.2/Lib/site.py", line 243, in getuserbase
  File "/home/malcolmp/src/Python-2.7.2/Lib/sysconfig.py", line 520, in get_config_var
  File "/home/malcolmp/src/Python-2.7.2/Lib/sysconfig.py", line 419, in get_config_vars
  File "/home/malcolmp/src/Python-2.7.2/Lib/sysconfig.py", line 287, in _init_posix
IOError: invalid Python installation: unable to open /home/malcolmp/src/Python-2.7.2/install/lib/python2.7/config/Makefile (No such file or directory)
History
Date User Action Args
2011-09-20 01:44:51malcolmpsetrecipients: + malcolmp
2011-09-20 01:44:51malcolmpsetmessageid: <1316483091.36.0.96391936283.issue13011@psf.upfronthosting.co.za>
2011-09-20 01:44:50malcolmplinkissue13011 messages
2011-09-20 01:44:50malcolmpcreate