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

Package request: Crystal

Open ravener opened this issue 5 years ago • 8 comments

It would be nice to have the crystal programming language compiler on Termux, it uses LLVM and is also self-hosted/bootstrapped but since Rust is on Termux while its also self-hosted it should also be possible, via cross-compilation and stuff.

Some hardcoded prefix paths would also need to be patched. See also This PR for ideas of more patches that might be needed.

Website: https://crystal-lang.org Source: https://github.com/crystal-lang/crystal See also for building: Building, Required Libraries, Cross-Compilation

ravener avatar Feb 27 '19 17:02 ravener

I second the request

PibePlayer avatar Jan 22 '20 14:01 PibePlayer

I'm trying to build Crystal myself on termux, but I can't get all the required dependencies.

Mhowser avatar Sep 11 '20 22:09 Mhowser

I'm trying to build Crystal myself on termux, but I can't get all the required dependencies.

Okay, but maybe someone would have an idea if you would

  1. document the steps
  2. what's currently missing

alexanderadam avatar Sep 12 '20 05:09 alexanderadam

I followed the instructions here https://github.com/crystal-lang/crystal/wiki/All-required-libraries#general

When I got to sudo make install, I had to do ./configure --prefix=/data/data/com.termux/files/usr/bin and then do make install which worked.

I failed at getting the dependencies here https://github.com/crystal-lang/crystal/wiki/All-required-libraries#ubuntu

Mhowser avatar Sep 12 '20 08:09 Mhowser

if you want to get the thing done, using alpinelinux from proot-distro run

apk add crystal shards musl-dev

musl-dev is the culprit that solves all the missing .so file errors

antonl05 avatar Aug 01 '21 14:08 antonl05

A while ago I managed to get it working (Crystal could even build itself on Termux), but I forgot the exact list of dependencies: https://forum.crystal-lang.org/t/running-crystal-on-termux/3880

HertzDevil avatar Nov 09 '21 00:11 HertzDevil

@xtkoba

leap0x7b avatar Mar 03 '22 07:03 leap0x7b

Heads up: Crystal's master branch now has support for AArch64 Android (via --target=aarch64-linux-android), but not LLVM 15+ nor API levels 24 - 27 yet

HertzDevil avatar Mar 09 '23 10:03 HertzDevil