termux-packages
termux-packages copied to clipboard
Package request: Crystal
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
I second the request
I'm trying to build Crystal myself on termux, but I can't get all the required dependencies.
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
- document the steps
- what's currently missing
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
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
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
@xtkoba
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