Firebird News

Tuesday, May 23, 2006

perl6 howto in ubuntu dapper

I will present an small howto compile and install perl6 and parrotvm on an ubuntu dapper

machine. I followed this howto with small corrections when the build/install went astray
Check out the current parrot source tree

svn co parrot

cd parrot

Try to run configure script to see what is missing

perl --prefix=/opt/parrot

In my case it died at some step

step auto::gcc died during execution: Linker failed (see test.ldo) at lib/Parrot/Configure/ line 365
Parrot::Configure::Step::cc_build() called at config/auto/ line 36

'Parrot::Configure=HASH(0x826970c)') called at lib/Parrot/
line 239
eval {...} called at lib/Parrot/ line 235
Parrot::Configure::runsteps('Parrot::Configure=HASH(0x826970c)') called at line 443

It was an fuzzy error so i read that i need the Haskel compiler ,Let's try it

sudo apt-get install ghc6

Then I looked in the test.ldo content

view test.ldo

There is light now in my head aha no c++ file so i created the symlink

sudo ln -s /usr/bin/g++ /usr/bin/c++

I rerun the configure script

perl --prefix=/opt/parrot

All was ok so i installed the parrotVM

sudo make install

It's time now for perl6 compiler (aka pugs)

svn co pugs

cd pugs

You need some devel libraries and some environment variables

sudo apt-get install zlib1g-dev libperl-dev

export PUGS_EMBED="perl5 parrot"

export PARROT_PATH=${HOME}/path/to/src/parrot/

perl Makefile.PL

time make

this can be used as cpu burn benchmark
real 64m59.178s
user 31m25.294s
sys 0m54.823s

sudo make install

pugs -e '"What say you?".say;'

ps: there is now an list for perl6.users
I tried to write the goodbye world example this way but didn't worked yet

pugs -e ' "What".say."You";'
unexpected "\""
expecting ".", subroutine name, array subscript, hash subscript or code subscript
at -e line 1, column 13

No comments: