6

I installed Rakudo, the Perl 6 interpreter, by:

sudo apt-get install rakudo

I am following a tutorial about installation of Perl 6 modules:

http://perl6maven.com/how-to-install-perl6-modules

And in the last step I get this error:

perl6 bootstrap.pl===SORRY!=== Error while compiling /home/daniel/test/panda/bootstrap.pl
No compiler available for Perl v6.c
at /home/daniel/test/panda/bootstrap.pl:3
------> use v6.c⏏;

Information about versions:

Ubuntu 16.04.2 LTS
This is perl6 version 2015.11 built on MoarVM version 2015.11

How do I install the lacking compiler?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Daniel
  • 7,684
  • 7
  • 52
  • 76
  • The first release of Perl 6 as a standard was in December of 2015, you have a Rakudo that is from the previous month. – Brad Gilbert Aug 07 '17 at 16:08

2 Answers2

6

Warning: This solution can be used for development, but for production it is recommended to manually compile the interpreter until the Ubuntu repository will not be updated.

Panda described in the linked tutorial is depreciated. I should use zef to install Perl modules.

My build of Perl was too old. I realized this after reading issue 380 about not working version 6.c.

The correct tutorial about installation of the newest Perl, 6.c, on Ubuntu is here:

http://linuxtot.com/installing-perl-6-on-debian-or-ubuntu/

Now my rakudo -v prints:

This is Rakudo version 2017.07-132-gabf1cfe built on MoarVM version 2017.07-318-g604da4d
implementing Perl 6.c.

And everything works great.


The below commands are extracted from a tutorial linked below:

apt-get install build-essential git libssl-dev
git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew
echo 'export PATH=~/.rakudobrew/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
rakudobrew build moar
rakudobrew build zef

Now to install the perl6 module:

zef install Module::Name
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Daniel
  • 7,684
  • 7
  • 52
  • 76
  • 4
    **Caution** For those reading this... I've upvoted both @Daniel's question and answer but their answer as it stands is problematic. Their answer obviously correctly identifies the problems they encountered (old installer and old P6 version). The tutorial they linked also got them to a solution. But the tutorial involves use of rakudobrew. rakudobrew is a fragile "quick and dirty" tool meant for core devs, not ordinary users. I explain a bit more about this in [a recent reddit comment of mine](https://www.reddit.com/r/perl6/comments/6htztl/no_candidate_found_for_zef/dj1bc4p/). – raiph Aug 06 '17 at 17:23
  • If you don't care about production deployment and instead wish to get started with Perl 6 in your home, tracking latest releases then rakudobrew is totally fine. Describing it as "quick and dirty" is disingenuous. It's no more fragile than something like perlbrew which plenty of people use to great success. For production deployment there is always more to it. The bigger issue worth highlighting here is Ubuntu LTS having an *ancient* version of Rakudo that doesn't conform to the released spec. – Matt Oates Aug 08 '17 at 10:20
3

If you are comfortable installing your own software from source, then try the following (update the URL for the latest Rakudo Star from https://rakudo.perl6.org/downloads/star/):

wget -O rakudo-star-2017.07.tar.gz https://rakudo.perl6.org/downloads/star/rakudo-star-2017.07.tar.gz
tar -xvf rakudo-star-2017.07.tar.gz
cd rakudo-star-2017.07
perl Configure.pl --backend=moar --gen-moar
make
make rakudo-test
make install

Then add the following paths to your $PATH (replacing /path/to with the actual path, of course):

/path/to/rakudo-star-2017.07/install/bin
/path/to/rakudo-star-2017.07/install/share/perl6/site/bin

I use a module file for this:

#%Module1.0
## Metadata ###########################################
set this_module   rakudo-star
set this_version  2017.07
set this_root     /path/to/$this_module/$this_module-$this_version/install
set this_docs     http://rakudo.org/documentation/

#######################################################
## Module #############################################
proc ModulesHelp { } {
        global this_module this_version this_root this_docs
        puts stderr "$this_module $this_version"
        puts stderr "****************************************************"
        puts stderr " $this_docs"
        puts stderr "****************************************************\n"
}

module-whatis   "Set up environment for $this_module $this_version"

prepend-path  PATH  $this_root/bin
prepend-path  PATH  $this_root/share/perl6/site/bin
Christopher Bottoms
  • 11,218
  • 8
  • 50
  • 99