Port Python on plan9

I stop proting Python. Because of Dr. Ross Cox done it.

Install Python

Ftp file from here.

cp /n/ftp/plan9/python/python.iso.bz2 .
9660srv
bunzip2 python.iso.bz2
mount /srv/9660 /n/dist python.iso
bind / /n/kfs
/n/dist/python.setup
replica/pull /n/dist/python

Extract

Get Python-2.2b1.tgz, uncompress it. Extract tar file.

tar xf Python-2.2b1.tar

tar produces a file named "longnamelist".

APE

For easy to install, I select APE.

Just type.

ape/psh

First, type configure.

.....
checking whether the C compiler (cc ) works... no
configure: error: instllation or configuration problem: C compiler cannot create executables.

Check config.log. OK, ape require "#include <stdlib.h>". Add line on where confdef creating position(496).

echo "#include <stdlib.h>" > confdefs.h

Try again.

....
checking for executable suffix... configure: error: instllation or configuration problem: C compiler cannot create executables.

Check config.log again. It says:

configure:1297: cc -o conftest -g conftest.c 1>&5
main: entry not text: _main
main: _main: not defined

cc: 8l: 8l 298: error

The fail reason is same as above. just add and change for include stdlib.h(1294).

echo '#include <stdlib.h>' > conftest.$ac_ext
echo 'int main() { return 0; }' >> conftest.$ac_ext

configure pass. But check configure log again. Many unexpected value detected.

Near by minix defines,
#define _POSIX_SOURCE 1
boges.

rename sys/select.h to select.h in pyport.h add #include <sys/types.h> in pyport.h

Delete -OPT:Olimit=0 from Makefile CFLAGS Add DEFS -D_BSD_EXTENSION

comment out including <wchar.h> in unicodeobject.h

longobject.c report error.
697[stdin:8153] unknown vlong LIST.
(long long) caused error.
Plan 9 C compiler does not use '?' operator. Rewrite them.


jun@moroo.com