Skip to content

Instantly share code, notes, and snippets.

@coke

coke/Prereqs.md Secret

Last active June 21, 2023 15:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coke/f6488d106d4a580216809f3e69b553f5 to your computer and use it in GitHub Desktop.
Save coke/f6488d106d4a580216809f3e69b553f5 to your computer and use it in GitHub Desktop.
Installing latest release on windows

There are multiple ways to install rakudo from source on windows. Please choose the method that works best for you.

Prerequisities

Please see Prereqs.md

rakubrew

Use this if you wish to be able to build various versions of raku, switch between them, and don't care about editing the source.

Follow the directions at https://rakubrew.org/?platform=win

Git/gcc

Use this to automatically check out appropriate versions of the repository for the version you wish to use, and build all three repositories using only one configuration and one build step.

This uses git bash to do the build of rakudo, and assumes you're building in a directory called sandbox\rakudo in your home directory - you can use any build directory.

cd $HOME
mkdir sandbox
cd sandbox
git clone https://github.com/rakudo/rakudo.git
cd rakudo

You only need this step once; future builds can start in the rakudo directory and run

git fetch
git fetch tags

Now you'll need to switch to the latest released version, e.g. Note: while you can use the latest commit on master, individual commits receive much less stringent testing than the releases: use at your own risk

git checkout 2022.07 # e.g.

You can get the list of available tags from https://github.com/rakudo/rakudo

Now to configure the rakudo build and related repositories. You can use any path here, /c/raku is only an example. (This is git bash's style of writing directories; from a CMD prompt, this is C:\raku). We explicitly use strawberry's path (update this if you installed it elsewhere) because git bash provides its own perl which isn't sufficient for our needs.

/c/Strawberry/perl/bin/perl Configure.pl --backends=moar --gen-moar --gen-nqp --prefix=/c/raku

This step determines the correct version required for nqp, clones the git repo and checks out the correct tag, then runs nqp's configure, which does the same for MoarVM. Each of those is also built as part of Rakudo's Configure step.

Note that there may be several compiler warnings.

Now to build rakudo itself:

gmake         # build
gmake test    # optional but recommended; please report any test failures
gmake install # install to whatever --prefix you specified in Configure

Tarballs

Use this method to download tarballs from various locations and avoid using git during the configuration or build process. Because you're getting your own source, you are responsible for making sure you get a version of MoarVM and nqp that are specified to work with the version of rakudo you're building. This step is automated for you if you use one of the other methods.



Cleanup step

After installing raku to C:/raku, you're going to need to add the following directories to your PATH:

  • C:\raku\bin\raku
  • C:\raku\share\perl6\site\bin

Now you should be able to run raku from any prompt on your windows box: git bash, command prompt, powershell, etc.

perl and/or gcc/make

Strawberry perl satisfies both the perl requirement and the gcc/make requirement. Select the recommended version on the front page with the appropriate 32/64 bit selection for your machine.

Even if you don't need gcc, it's fine to use this version of perl.

git

Git for windows includes both the git binary and a bash shell. When installing, please choose "git from the command line and also from 3rd-party software".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment