Instructions to build rakudo from source
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md

README.md

Table of Contents

How to build latest release of Rakudo from source code

These instructions explain how to build latest release of the Rakudo compiler from source. You can also get latest Alpine, CentOS, Debian, Fedora, and Ubuntu rakudo packages here: https://github.com/nxadm/rakudo-pkg/releases. For latest release of Rakudo Star distribution, see https://rakudo.perl6.org/downloads/star/. If you don't know what you want, you want Rakudo Star.

Development Version

These instructions build latest released version of the compiler. To build latest development commit, remove the entire line with git describe command in it from instructions (the command checks out latest tag, while by default latest dev commit from master branch will be used)

Linux

These instructions assume you're using some sort of Linux, like Debian, and bash for shell.

You'll need git and a C compiler, which on Debian you can get by running:

sudo apt-get update
sudo apt-get -y install build-essential git

Next, we'll clone the source code repository to ~/rakudo, then add a couple of paths to PATH as well as create a bash alias to update to latest stable release.

git clone https://github.com/rakudo/rakudo/ ~/rakudo
echo 'export PATH="$HOME/rakudo/install/bin:$HOME/rakudo/install/share/perl6/site/bin:$PATH"' >> ~/.bashrc
echo 'alias update-perl6='\''
    cd ~/rakudo && git checkout master && git pull &&
    git checkout $(git describe --abbrev=0 --tags) &&
    perl Configure.pl --gen-moar --gen-nqp --backends=moar &&
    make && make install'\''' >> ~/.bashrc
source ~/.bashrc

# Now just run the following to install rakudo or to upgrade it to latest dev commit in the future
update-perl6

You're now all set! To upgrade to latest stable release of Rakudo, simply run update-perl6 in your shell and wait for the build process to complete. It takes a dozen minutes and needs about of 1.4GB of RAM (swap will work too). You may want to install module manager next.

If you ever want to do a "from scratch" update by deleting ~/rakudo checkout, be sure to also delete some of the directories used by the module manager:

rm -fr ~/.zef ~/.perl6

Windows

Download and install Git as well as Strawberry Perl, which includes Perl, a C compiler, and other relevant utilities.

Press Win+R and run cmd command. Then navigate where you want to clone rakudo. The following clones to C:\rakudo\ directory:

C:
mkdir \rakudo
cd \rakudo
git clone https://github.com/rakudo/rakudo/ .
for /f usebackq %F in (`git describe "--abbrev=0" --tags`) do git checkout %F

Then build rakudo (gmake might be called something else, like nmake if you installed a different C compiler):

perl Configure.pl --gen-moar --gen-nqp --backends=moar & gmake & gmake install

Add paths to the executables by editing PATH environmental variable. To its current value, add the following (alter the paths if you installed to somewhere other than C:\rakudo\):

;C:\rakudo\install\bin;C:\rakudo\install\share\perl6\site\bin

To update to latest release, simply navigate to the repository check out, pull latest changes, and run the build command again:

C:
cd \rakudo
git checkout master
git pull
for /f usebackq %F in (`git describe "--abbrev=0" --tags`) do git checkout %F
perl Configure.pl --gen-moar --gen-nqp --backends=moar & gmake & gmake test & gmake install

Module Manager

After installing rakudo, install the module manager. Simply run the following in any temporary directory (after installation, directory can be deleted):

git clone https://github.com/ugexe/zef
cd zef
perl6 -I. bin/zef install .

You do not need to re-install zef after upgrading to newer versions of rakudo. To upgrade zef, simply run zef upgrade zef

Inline::Perl5 with Latest Perl

To install Inline::Perl5 with latest Perl, you can use the following (instructions for Linux):

\curl -L https://install.perlbrew.pl | bash
echo 'source ~/perl5/perlbrew/etc/bashrc' >> ~/.bashrc
source ~/.bashrc
perlbrew install perl-5.28.0 --notest -Duseshrplib -Dusemultiplicity
perlbrew switch perl-5.28.0
perlbrew install-cpanm

zef install Inline::Perl5





























These lines exist merely to pad content, so in-page URLs end up pointing to the more obvious places