termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

Package request: Rakudo (a.k.a. Perl 6)

Open ddeimeke opened this issue 7 years ago • 34 comments

Perl 6 is called "Rakudo" in Debian, Fedora and Ubuntu.

ddeimeke avatar Aug 28 '17 09:08 ddeimeke

+1

ohmycloud avatar Dec 29 '17 04:12 ohmycloud

also interested in this, I realize it's not wide appeal or high urgency but it'd be a nice feature for the people learning p6 now that books are coming out for it ^_^

sydneyfalk avatar Jan 09 '18 23:01 sydneyfalk

On the contrary, now there are 4 backers for this request, and I guess it would give termux a lot of additional interest if it provides a rakudo star package. Rakudo star on ARM is available for all debian versions, sources are here: https://rakudo.perl6.org/downloads/star/ After I got my new device first thing was to install termux and try to compile rakudo, but at least a few libraries are missing. So far I found no easy example for crosscompiling a package for termux, if there should be some basic guide please point me to it.

Mu-00 avatar Jan 21 '18 13:01 Mu-00

Sorry if it seemed like I was belittling it in any way -- I really wasn't.

I just meant compared to something with a long, known set of niche applications (like, say, Prolog or Forth) or something popular and everywhere (like Ruby and Python) a Perl 6 package isn't going to have as wide an appeal. (But this isn't to say lacking 'wide appeal' is a signal of poor quality or anything. It's not like the best restaurant on earth is McDonald's, after all.)

As for the urgency, I only meant that I could imagine there are a lot of things that are higher priority overall.

Hopefully that clears things up! ^_^

sydneyfalk avatar Jan 22 '18 02:01 sydneyfalk

its currently building in my android 6 x86_64 vm. See if i can get something

its-pointless avatar Jan 22 '18 07:01 its-pointless

its-pointless, that would be really gorgeous. I'm just realizing that my new Onyx Boox Max2 with 13,3" e-ink Display and termux for some things is better suited than my Laptop. Reading a book and switching to console practicing is a breeze.

Mu-00 avatar Jan 22 '18 14:01 Mu-00

okay i got it to install on device. Moarvm and libtommath cross compiled from pc. Caveats MVM_SPESH_DISABLE=1 was used....

its-pointless avatar Jan 22 '18 22:01 its-pointless

if you want to have a try at this iv put moarvm and libtommath packages on my repo github.com/its-pointless/gcc_termux readme for instructions...

its-pointless avatar Jan 22 '18 23:01 its-pointless

Great. I installed moarvm following your instructions and it's up and running, so far no problems.

Mu-00 avatar Jan 23 '18 10:01 Mu-00

I symlinked the moar executable into install/bin of rakudo-star tree and tried to compile rakudo star on device, but it fails at some point with nqp. Perhaps it needs more than just the executable.

Mu-00 avatar Jan 23 '18 11:01 Mu-00

If you install moarvm from its-pointless and unpack rakudo-star sources into your $HOME and run perl Configure.pl --backend=moar --gen-nqp it will fail because it expects moar and share/nqp/lib in source tree/install. I don't know if it would help to add --prefix=../usr, I don't want it to install stuff somewhere. So solution is to do
ln -s ../usr/bin/moar in install/bin and ln -s ../usr/share/nqp/lib in install/share/nqp On my regular machine I was able to compile nqp and afterwards make rakudo. On device it's currently compiling ... :)

Mu-00 avatar Jan 24 '18 17:01 Mu-00

nqp compiled. The final make failed. Unfortunately I can't transfer the log now, abbreviated something like: src/vm/moar/ops/perl6_ops.c:2: ...com.termux/files/usr/include/moar/moar.h:24:10: uv.h file not found #include uv.h

Mu-00 avatar Jan 24 '18 17:01 Mu-00

FWIW, libuv 1.19.1 is installed

Mu-00 avatar Jan 24 '18 17:01 Mu-00

I didn't need to link moarvm All I did was export MVM_SPESH_DISABLE=1 perl Configure.pl --backends=moar --gen-moar --prefix=$PREFIX --sysroot=$PREFIX make install

its-pointless avatar Jan 24 '18 22:01 its-pointless

Also make sure libuv-dev is installed

its-pointless avatar Jan 24 '18 22:01 its-pointless

the final make that builds perl6 doesn't find stuff in source_tree/MoarVM/3rdparty/* instead it's looking in /usr/include no quick and dirty hack for this one, tomorrow I try --prefix/ --sysroot, though I don't understand it

Mu-00 avatar Jan 24 '18 23:01 Mu-00

Yes. Forget everybody everything I said and follow instruction from it-pointless.

Mu-00 avatar Jan 24 '18 23:01 Mu-00

I made clean and issued your commands. The following happens:

  1. It states moar is new enough and uses that one you provided
  2. It successfully compiles nqp
  3. It fails after make because it does not find stuff in source_tree/MoarVM/3rdparty/, instead it looks in /usr/include. If libuv-dev is installed, it finds that header, but fails with the next atomic_ops.h. It's about source_tree/MoarVM/3rdparty/

Mu-00 avatar Jan 24 '18 23:01 Mu-00

It doesn't help to pkg uninstall moarvm (keeping libffi libtommath), that leads to configuration fail, also because of 3rdparty

Mu-00 avatar Jan 25 '18 00:01 Mu-00

oh you need atomic-ops-dev package

forgot to upload that.... apt install libatomic-ops-dev sorry about that been doing about 5 different things at once

its-pointless avatar Jan 25 '18 05:01 its-pointless

You're work is much appreciated! Also needed is apt install libffi-dev libtommath-dev

Mu-00 avatar Jan 25 '18 14:01 Mu-00

After that make succeeds, with warning linker: ...rakudo/dynext/libperl6.ops.moar.so: unused DT entry: type 0xf arg 0x52a but make install hangs in order to get rid of warnings I did termux-elf-cleaner rakudo/dynext/libperl6_ops_moar.so make install hangs shortly after copying libperl6_ops_moar.so while doing this: perl6-m tools/build/install-core-dist.pl $PREFIX/usr/share/perl6

Mu-00 avatar Jan 25 '18 15:01 Mu-00

Hi, i am also interested in trying to install rakudo on my android tablet. i followed the steps mentioned above, sadly not able to get past the instructions given by its-pointless. export MVM_SPESH_DISABLE=1 perl Configure.pl --backends=moar --gen-moar --prefix=$PREFIX --sysroot=$PREFIX make install

Sadly probing pthread_yield support ...................... NO probing support of rdtscp intrinsic ................ NO

Doesnt work and libuv isn't found although i have the 1.9.1 version installed. Am I missing something or is that the current status.

Kind regards, squifi

Squifi avatar Feb 05 '18 19:02 Squifi

You need apt install libatomic-ops-dev libffi-dev libtommath-dev libuv-dev

What worked for me was making nqp and rakudo IF the crosscompiled moarvm from its-pointless is installed. It will skip moarvm if moarvm is up to date, so you need either rakudo 2017-12 or rakudo-star 2017-10 BUT make install will fail. So perl6-m will be in the build tree. As-is it's not really helpful, I'm not using it.

Mu-00 avatar Feb 06 '18 05:02 Mu-00

I got it to install just when it hangs stop and try make install again.

its-pointless avatar Feb 06 '18 06:02 its-pointless

I tried that before and again, it's not working for me. perl6-m tools/build/install-core-dist.pl $PREFIX/usr/share/perl6 is the latest I see. I have no idea how the installation process works, there are these precomp binaries in $PREFIX/usr/share/perl6

Mu-00 avatar Feb 06 '18 11:02 Mu-00

Thx for your replies, i'll continue to try. Got the dependencies, but sadly still no luck atm

Squifi avatar Feb 07 '18 19:02 Squifi

Awesome to see I'm not the only person interested!

I've been juggling RL too much lately but I have been reading the thread off and on and will be trying to do it too in a week or so, with the assistance of my far more well-versed-in-these-things spousal unit. ^_^

sydneyfalk avatar Feb 23 '18 08:02 sydneyfalk

I want to mention that I tried to install debian on termux using sp4rkie's script https://github.com/sp4rkie/debian-on-termux but failed initially a few weeks ago. Now it is working with stable and testing and the slight modification suggested here https://github.com/sp4rkie/debian-on-termux/issues/12#issuecomment-367323561. I installed testing, which required 412M. I added unstable to /etc/apt/sources.list and installed rakudo-2018.1 with apt-get -t unstable install rakudo testing version would be rakudo-2017.6 (of course apt preferences need to be set appropriately to keep unstable rakudo on testing)

Mu-00 avatar Feb 23 '18 17:02 Mu-00

I have found a .. bad way of getting this built in termux but still.. for some reason its not killing threads that need to be killed so i did it manually during the install process....

Rakudo Star has been built and installed successfully. Please make sure that the following directories are in PATH: /data/data/com.termux/files/usr/bin /data/data/com.termux/files/usr/share/perl6/site/bin

its-pointless avatar Apr 05 '18 04:04 its-pointless