Using Tools/freeze.py on AIX -- having problems

nnorwitz at gmail.com nnorwitz at gmail.com
Fri Dec 22 23:51:26 EST 2006


jmalone at optio.com wrote:
>
> Python seems to install correctly for the most part ("make test" gives
> a few messages about things that are not quite right (3 failed tests
> (test_mmap, test_pty, & test_resource) and 2 unexpectedly skipped

Don't worry about these.

>   Name                      File
>   ----                      ----
> m _locale
> /usr/local/lib/python2.4/lib-dynload/_locale.so
> m _random
> /usr/local/lib/python2.4/lib-dynload/_random.so
> m _socket
> /usr/local/lib/python2.4/lib-dynload/_socket.so
> m array
> /usr/local/lib/python2.4/lib-dynload/array.so
> m binascii
> /usr/local/lib/python2.4/lib-dynload/binascii.so

[...]

> generating table of frozen modules
> Warning: unknown modules remain: _locale _random _socket array binascii
> cStringIO collections fcntl itertools math select strop struct termios
> time
> Now run "make" in xfer to build the target: xfer
>
> After running make, here is the result of trying to execute the frozen
> script:
>
>
>
> # ./xfer
> Traceback (most recent call last):
>   File "xfer.py", line 2, in ?
>   File "/usr/local/lib/python2.4/socket.py", line 45, in ?
>     import _socket
> ImportError: No module named _socket
> #

There's this note in freeze.py:

"""
The script should not use modules provided only as shared libraries;
if it does, the resulting binary is not self-contained.
"""

I don't really remember much about freeze.  IIRC, you will also need to
copy the extension modules (I left them in above) in addition to
'xfer'.  Try copying them into the same directory.  You might need to
set LIBPATH=. (or whatever the env't var is).  On most Unixes, the
env't var is LD_LIBRARY_PATH, but I recall AIX being different.

If you want, you can just copy all the files from lib-dynload along
with 'xfer'.

HTH,
n




More information about the Python-list mailing list