As the entire Perl community is encouraged to
get involved with Perl6 development, I thought
I'd do my bit and install Parrot.
The fact that I don't know C doesn't particularly
phase me (I've been meaning to learn for a long
time, and what better way than by reading the
polished code of the greatest minds of the Perl
community!), but the fact that I don't have the
vaguest idea on how to use basic C development
tools is a little worrying.
- Install a C compiler.
This was quite easy. I use Win32, so I downloaded
the latest tar.gz of mingw32 from mingw.org.
Installation is
straight-forward: just extract the files, and
then change your
%PATH%
variable to
include the bin directory.
- Download Parrot.
Somehow I seem to have version 0.0.6, which is
interesting as parrotcode.org points
to version 0.0.4 as the latest version... so I
downloaded that too just in case
- Read README
Apparently a simple
matter of
perl Configure.pl
,
make
, and make install
.
- Install Parrot: Configure.pl
However Configure.pl couldn't find gcc. A quick
scan of the code tells me that there is an
--ask
option, which I use to set gcc and ld
as compiler and linker respectively. I leave
all other defaults the same, and get an error.
- Help?
Hmmm, check the obvious README's and docs in (both) the Parrot distributions. Look on Parrotcode and the Perl6 lists to see if there is
a cookbook for newbies setting up Parrot.
Can't find anything, but of course I don't really
understand what it is I'm looking for (which
doesn't help).
- Poke around in Configure.pl
(First of all the one with version 0.0.4).
I discover that
$c{o}=".o"
and $c{ld_out}="-o "
(except that when Configure passes the commands to the compiler and linker,
these have magically been changed to ".obj" and "-out:"... very strange.
By dint of hardcoding the original values back into the script, I manage to
get the first test installed.)
- More configuring
Now the linker can't find the libraries that it was looking for. I decide
to change the default to nothing (I type in a SPACE character to cancel the
default). I don't
know what effect this will have of course, but let's just see ;->
(I think my method could be called 'Shotgun configuring', and it's working
out to be almost as successful as Shotgun debugging...)
This now sort of works, except that Configure can't work out what the Intval
type should be. As per the README file's instructions, I do
perl -V
and confirm that Integers should indeed be long...
What I think I need is a nice cookbook with the right values to pass in
for gcc on Win32. Of course, maybe, given my complete ignorance of what
I'm doing, I should go away and learn how to use the GNU toolset first of
all...