Is it possible to compile/install Perl6 on a Raspberry Pi 3?
Asked Answered
G

3

17

I am trying to install Rakudo Star 2018.04 on a Raspberry Pi 3.

I do:

sudo perl Configure.pl --gen-moar --gen-nqp --prefix ~/rakudo

and it completes successfully.

And then I try:

sudo make-install

but it fails with:

The following step can take a long time, please be patient.
/home/pi/rakudo/bin/moar --libpath="blib" --libpath="/home/pi/rakudo/share/nqp/lib" --libpath="/home/pi/rakudo/share/nqp/lib" perl6.moarvm --nqp-lib=blib --setting=NULL --ll-exception --optimize=3 --target=mbc --stagestats --output=CORE.setting.moarvm gen/moar/CORE.setting
Stage start      :   0.000
Stage parse      : 459.019
Stage syntaxcheck:   0.000
Stage ast        :   0.000
Stage optimize   : Killed
Makefile:504: recipe for target 'CORE.setting.moarvm' failed
make[1]: *** [CORE.setting.moarvm] Error 137
make[1]: Leaving directory '/home/pi/rakudo-star-2018.04/rakudo'
Makefile:43: recipe for target 'rakudo/perl6-m' failed
make: *** [rakudo/perl6-m] Error 2

System info:

OS: Raspbian GNU/Linux 9.4 (stretch) armv7l
Model: Raspberry Pi 3 Model B Rev 1.2
Kernel: 4.14.34-v7+ 
Uptime: 62 days, 31 minutes 
Packages: 552 
Shell: bash 4.4.12 
CPU: ARMv7 rev 4 (v7l) (4) @ 1.2GHz 
Memory: 137MB / 927MB

Any ideas?

Griggs answered 31/7, 2018 at 3:1 Comment(0)
S
15

You might try and increase the swap space, as indicated in this answer in the RasPi SO. It's going to be slow, however, but once it's built, it's built for good, I guess.

Station answered 31/7, 2018 at 8:14 Comment(1)
Added a swap file and it worked! I should have thought to watch htop while building. I ended up using "swapspace" since Raspbian is Debian based and it was a really easy way to create a dynamic swap file. Just sudo apt-get install swapspace.Griggs
P
7

That's too little RAM. When I compile for x86_64, I need about 1400 MiB.

Try a beefier machine for arm, you can get one on OBS for free.

Pish answered 31/7, 2018 at 5:43 Comment(1)
You were right. No need for a beefier machine though, just a swap file.Griggs
B
2

UPDATE

Yes.

I built "Raku" Perl (2018.10) on my Raspberry Pi 3B+ this weekend. I first installed swapspace as before. The build took more than one hour -- I'm not sure how long it took, I ran it nohup -- but it finished and I've got Raku there now.

wget https://rakudo.perl6.org/downloads/star/rakudo-star-2018.10.tar.gz
tar xfz rakudo-star-2018.10.tar.gz 
cd rakudo-star-2018.10/
sudo perl Configure.pl --gen-moar --make-install --prefix ~/rakudo
sudo make
sudo nohup make install

OLD RESPONSE

I built "Raku" Perl (2018.06) on the Pi Zero W back in August. I had to run swapspace, and the build took hours, but now I have Perl6 on three Rpi Zero W's.

Highlights of the build, as I remember them:

405  wget https://rakudo.perl6.org/downloads/star/rakudo-star-2018.06.tar.gz
407  tar xfz rakudo-star-2018.06.tar.gz 
411  cd rakudo-star-2018.06/
413  sudo perl Configure.pl --gen-moar --make-install --prefix ~/rakudo
433  sudo make
450  sudo nohup make install
Brough answered 18/12, 2018 at 4:31 Comment(1)
pi@knowthingspizero:~ $ perl6 -version This is Rakudo version 2018.11 built on MoarVM version 2018.11 implementing Perl 6.d.Brough

© 2022 - 2024 — McMap. All rights reserved.