py152-src.txt -- Python 1.5.2 (interpreted language) for Minix 2.0.X (32 bit) Source code distribution, Minix port by Michael Kennett (revised 2005-07-25) Originally posted 26/Jan/2005. This document has been revised: 14 June 2005 - py152-src.taz package now includes this file 25 July 2005 - change version of zlib from 1.2.1 to 1.2.3 Complete package is py152-src.taz. The default configuration requires the zlib123bin.taz package, but it is possible to build Python without this package -- instructions on how to do this are below. A precompiled package (py152-bin.taz with zlib support) is also available - read py152-bin.txt for more details. Python (http://www.python.org) is an interpreted object oriented language. This source code distribution is based on the Python-1.5.2 release (April '99) - it is an old version of the language, with less features, but requiring less resources (memory/hard disk), than more modern versions. The file Python-1.5.2/README.minix contains a list of changes from the standard sources. Python documentation is available online at the Python website: http://www.python.org/doc/1.5.2p2/ To install the source package from a set of floppies (e.g. created by fdvol) enter the command: $ setup where is the directory in which the sources will be unpacked (e.g. your home directory, or /usr/local/src). Building Python-1.5.2 from sources requires a machine with several MB's of memory. Before starting, it is necessary to change the amount of memory available to several commands: $ chmem =65536 /bin/sh # enlarge to 64K (from 48K) $ chmem =1048576 /usr/lib/em_cemcom.ansi # enlarge to 1MB (from 448K) $ chmem =262144 /usr/lib/i386/as # enlarge to 256K (from 128K) Unpack the sources into (see above), and change into it. If you have not downloaded the zlib123bin.taz package it is necessary to edit the Python configuration. Change into the Modules subdirectory, and edit Setup.in as follows: Find the following line (in Modules/Setup.in): zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz and comment it out: #zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz To build Python, it is necessary to configure it for your Minix system. This process is automated, and consists of running a 'configure' script to generate a make file, which is then processed. Enter the following commands: $ cd Python-1.5.2 $ CC="cc -wo" ./configure # default configuration installs into /usr/local $ make install The default installation of the python binary allocates 8MB of memory to the process. Change this using chmem if desired - more is better than less! Python can be very memory hungry... Finally, update the whatis(1) database with the command: $ makewhatis /usr/local/man * Possible errors (when building Python-1.5.2) o Running ./configure gives an error: configure: error: can not find sources in . or .. - The permissions are incorrect. Change ownership of the files: $ cd Python-1.5.2 $ chown -R bin:operator * $ find . -type f | xargs chmod 644 $ find . -type d | xargs chmod 755 $ chmod 755 configure install-sh Lib/plat-generic/regen o Running ./configure gives an error: Checking for --with-thread... ./configureconfigure.... Out of space - The program /bin/sh has run out of memory. Enlarge the memory available to the shell as follows: $ chmem =65536 /bin/sh o The following error occurs during compilation: cc -wo -c -O -I./..Include -I.. -DHAVE_CONFIG_H ceval.c cc: /usr/lib/em_cemcom.ansi: Signal 11 - core dumped - The compiler has run out of memory. Enlarge the memory available to the compiler as follows: $ chmem =1048576 /usr/lib/em_cemcom.ansi This allocates 1MB. If the error occurs again, increase the value. o The following error occurs during compilation: cc -wo -c -O -I./../Include -I.. -DHAVE_CONFIG_H cPickle.c "c.ack.s", line 9917: out of memory (fatal) - The assembler has run out of memory. Enlarge the memory available to the assembler as follows: $ chmem =262144 /usr/lib/i386/as This allocates 256K. If the error occurs again, increase the value. o Running make install gives the error: mv python ../python ./install-sh -c -m 755 python /usr/local/bin/python1.5 ./install-sh: Permission denied or ./regen: Permission denied - Check that ./install-sh, Lib/plat-generic/regen, and Lib/plat-minix2/regen are executable. $ chmod 755 install-sh Lib/plat-generic/regen o Compilation fails: cc -wo -I/usr/local/include -O -I./../include -I.. -DHAVE_CONFIG_H -c ./zlibmodule.c "./zlibmodule.c", line 10: cannot open include file "zlib.h" "./zlibmodule.c", line 32: z_stream is not a type identifier "./zlibmodule.c", line 73: Byte undefined "./zlibmodule.c", line 73: input undefined "./zlibmodule.c", line 73: output undefined "./zlibmodule.c", line 74: int not expected make in /usr/src/Python-1.5.2/Modules: Exit code 1 make in /usr/src/Python-1.5.2: Exit code 1 make: made 'Modules' look old. - The zlib123bin.taz package has not been installed. Either: 1/ Install the zlib123bin.taz package or 2/ Edit Modules/Setup.in, and comment out the zlib module (see the instructions above), and then do the following: $ make distclean # Clean the configuration $ CC="cc -wo" ./configure # default configuration installs into /usr/local $ make install Note that it is *ESSENTIAL* to do the 'make distclean', and to rerun the configuration script. o (written from memory) An error occurs during linking. - The zlib module is enabled by default in Modules/Setup.in, and an error will occur during linking if the zlib library has not been installed. This library is available, precompiled for Minix, as the zlib123bin.taz package (see zlib123bin.txt for a description). Alternatively, edit Modules/Setup.in to remove the zlib module. * There are several modules that could be ported to Minix with a bit of work: curses - need SCREEN support readline - Minix has editline library timing