Delivered-To: arisawa@ken.aichi-u.ac.jp
Delivered-To: arisawa@aichi-u.ac.jp
X-Authentication-Warning: neon.myriadgate.net: aam396 owned process doing -bs
From: andrey mirtchovski <aam396@mail.usask.ca>
X-Sender: aam396@neon.myriadgate.net
To: 9fans@cse.psu.edu
Subject: [9fans] re: kenji arisawa's perl question
Sender: 9fans-admin@cse.psu.edu
X-BeenThere: 9fans@cse.psu.edu
X-Mailman-Version: 2.0rc1
Reply-To: 9fans@cse.psu.edu
List-Id: Fans of the O/S Plan 9 from Bell Labs <9fans.cse.psu.edu>
List-Archive: <http://lists.cse.psu.edu/archives/9fans/>
Date: Sun, 5 Nov 2000 01:34:40 -0600 (CST)

I have been meaning to give perl a go on p9 for quite sometime, but never
got around to it.. instead uf studying tonight I went to ww.perl.com and got
the latest perl source code.

amazingly it had a README.plan9 and a plan9 directory in it.. it looks like
someone did a p9 port of perl back in 1996 (5.003_01 i think was the
latest). I downloaded it and gave it a try, but due to many errors gave up
and tried an older port -- 5.004_05, which is available from:

http://www.perl.com/CPAN/src/perl5.004_05.tar.gz

I had to wrestle with this one too unfortunately -- many files
complained about redefinitions of 'FLT_MAX' apparently from float.h... i
solved this problem by just not caring (restarting mk after it exited with
error seemed to go pass it OK, or simply commenting out the include line
worked fine).. Then upon the creation of the miniroot environment tha perl
installation uses, it complained about redefinitions of getsockopt and
setsockopt, which happened to be dummy functions from plan9/plan9.c...

apart from that, the compilation went ok:

cpu% perl -v

This is perl, version 5.004_05 built for plan9_386

Copyright 1987-1998, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
cpu% perl -e '{print "Hello World\n";}'
Hello World
cpu%


so, in brief to compile perl one must perform (at least?) the following:

untar perl somewhere, read README.plan9; run plan9/setup.rc;
cd /sys/src/cmd/perl/5.004_05/;
edit plan9/plan9.c -- comment out the dummy getsockopt and setsockopt in the
beggining of the file;

mk install (repeat after it exits with FLT_MAX complaints)...

hope this helped :)

andrey