echo $HOME , if it prints /data/data/com.termux/files/home, then it's Termux in Android.
lsb_release -a
cat /etc/issue
uname -a
If you are on Termux on Android, install the tur-repo package (pkg in tur-repo).
| Operating System | Package names required | Package names recommended |
|---|---|---|
| Alma, CentOS, Oracle Linux, Red Hat Enterprise Linux (RHEL), Rocky | gcc make | tcc clang gmp-devel libffi-devel numactl-devel screen (if available) |
| Alpine | gcc make | tcc clang gmp-dev libffi-dev numactl-dev z3-dev screen (if available) |
| Android with Termux | gcc-15 ldd make | tcc clang libffi libgmp screen z3 |
| Arch, Manjaro | gcc make | tcc clang gmp numactl screen z3 |
| Debian, Edubuntu, Kali, Kubuntu, Lite, MX, Lubuntu, Mint, Trisquel, Ubuntu, Xubuntu, Zorin | gcc make | tcc clang libffi-dev libgmp-dev libnuma-dev libz3-dev screen |
| Fedora | gcc make | tcc clang gmp-devel libffi-devel numactl-devel screen z3-devel |
| FreeBSD | tcc clang libffi gmp linux-c7-numactl-libs screen z3 | |
| GeckoLinux, OpenSUSE | gcc make | clang gmp-devel libffi-devel libnuma-devel screen z3-devel |
| Gentoo | tcc clang libffi gmp numactl screen z3 | |
| iOS with iSH | ed gcc make sed | clang libffi-dev gmp-dev numactl-dev screen z3-dev |
| Linux From Scratch, Linux without a distribution | TCC Clang (LLVM) GMP Libffi Screen | |
| NetBSD | gcc | clang libffi gmp screen z3 |
| OpenBSD | gmake | tcc clang libffi libgmp screen z3 |
| Other | GCC GNU Make | TCC Clang GMP Libffi numactl GNU Screen Z3 |
| Slackware, Zenwalk | gcc make | tcc clang libffi gmp screen |
| Windows with Cygwin | gcc-core make | clang libffi-devel libgmp-devel screen |
| Windows with WSL (Windows Subsystem for Linux) | Refer to the Linux distribution installed in the WSL | |
TAB means pressing the tab key to auto-complete the command name. Try these commands. If they are available, they will identify themselves whether they are GCC, Clang or TCC and which version:
Determine RAM size by MemTotal from /proc/meminfo or from the top command and if that
doesn't exist, web search technical spec of your
device. If you can't figure it out, assume 1 GB.
Look up your system RAM size in the table below and take the first compiler from the list which is available on your system. It will produce the fastest running Ajla. You may end up having to install Clang or TCC.
| System RAM | List of compilers, the most recommended first |
|---|---|
| < 72 MB | TCC. Ajla cannot be compiled without computer swapping. Risk the computer becomes unusable. Risk it will take unacceptably long time. |
| >= 72 MB < 265 MB | TCC |
| >= 265 MB < 1.2 GB | Clang, TCC |
| >= 1.2 GB | GCC, Clang, TCC |
Remember to replace the CC=gcc later with CC=filename_of_your_compiler , for example with
CC=clang-19 .
screen
(if available). If network disconnects, reattach with screen -dr. It also helps with lack of terminals.
ajla-* that was created by unpacking the archive
./configure with. Take one row of the table after another until it tells you what:
| Step | Test | Replace ./configure with
|
|---|---|---|
| 1 | Are you on Termux in Android? | ./configure --prefix=/data/data/com.termux/files/usr
|
| 2 | Do you know the root or administrator password? | ./configure
|
| 3 | Are you entitled to run sudo? | ./configure
|
| 4 | Are you already running as root or administrator? | ./configure
|
| 5 | Otherwise | ./configure --prefix="$HOME"/.local
|
CC=gcc according to 4.4,
replace ./configure according to 6.3. and run it. If your computer becomes unresponsive, try to break the compilation with
CTRL-C, if it doesn't break try reboot with Ctrl-Alt-Del, with Alt-Sysrq-U, Alt-Sysrq-S, Alt-Sysrq-B, with turning the power off.
After breaking the compilation rerurn ./clean && ./autogen.sh and select the command again for the next
smaller RAM category and run it. Do not select empty cells with dashes!
| RAM size for TCC | RAM size for Clang <= 16 | RAM size for Clang 17-20 | RAM size for Clang >= 21 | RAM size for GCC <=13 | RAM size for GCC 14,15 | RAM size for GCC >= 16 | Command to run |
|---|---|---|---|---|---|---|---|
| < 73 MB. Under 72 MB may fail, PC may become unusable, may take unacceptably long. | - | - | - | >= 324 MB < 497 MB | >= 409 MB < 705 MB | >= 404 MB < 707 MB |
CC=gcc CFLAGS="-O1 --param ggc-min-expand=1 --param ggc-min-heapsize=1000" ./configure --enable-reduce-nodes=2 --disable-computed-goto && make -j1 ipret.o ipretc.o && make -j2 |
| >= 73 MB < 87 MB | >= 252 MB < 685 MB | - | >= 213 MB < 300 MB | >= 497 MB < 651 MB | >= 705 MB < 801 MB | >= 707 MB < 1.2 GB |
CC=gcc CFLAGS="-O2 --param ggc-min-expand=5 --param ggc-min-heapsize=5000" ./configure --enable-reduce-nodes=2 --disable-computed-goto && make -j1 ipret.o ipretc.o && make -j2 |
| >= 87 MB < 193 MB | - | >= 265 MB < 497 MB | - | >= 651 MB < 1.97 GB | >= 801 MB < 2.58 GB | >= 1.2 GB < 6.12 GB |
CC=gcc CFLAGS="-O2 --param ggc-min-expand=10 --param ggc-min-heapsize=8000" ./configure --enable-reduce-nodes=2 && make -j1 ipret.o ipretc.o && make -j2 |
| >= 193 MB < 276 MB | - | - | - | >= 1.97 GB < 4.11 GB | >= 2.58 GB < 5.05 GB | >= 6.12 GB < 7.72 GB |
CC=gcc CFLAGS="-O2 --param ggc-min-expand=15 --param ggc-min-heapsize=12000" ./configure --enable-reduce-nodes=1 && make -j1 ipret.o ipretc.o && make -j4 |
| >= 276 MB < 552 MB | >= 685 MB < 1.37 GB | >= 497 MB < 995 MB | >= 300 MB < 600 MB | >= 4.11 GB < 8.21 GB | >= 5.05 GB < 10.1 GB | >= 7.72 GB < 15.5 GB |
CC=gcc CFLAGS="-O2 --param ggc-min-expand=20 --param ggc-min-heapsize=16000" ./configure && make -j1 ipret.o ipretc.o && make -j8 |
| >= 552 MB < 646 MB | >= 1.37 GB < 1.6 GB | >= 995 MB < 1.16 GB | >= 600 MB < 703 MB | >= 8.21 GB < 9.61 GB | >= 10.1 GB < 11.8 GB | >= 15.5 GB < 18.1 GB |
CC=gcc CFLAGS="-O2 --param ggc-min-expand=20 --param ggc-min-heapsize=16000" ./configure && make -j2 ipret.o ipretc.o && make -j8 |
| >= 646 MB | >= 1.6 GB | >= 1.16 GB | >= 703 MB | >= 9.61 GB | >= 11.8 GB | >= 18.1 GB |
CC=gcc CFLAGS="-O2 --param ggc-min-expand=20 --param ggc-min-heapsize=16000" ./configure && make -j8 |
What did you replace ./configure with? | Action to do |
|---|---|
./configure | Run sudo make install . If it says “sudo: (command) not found”, run
su root -c "make install"
|
./configure --prefix="$HOME"/.local | Run make install
|
./configure --prefix=/data/data/com.termux/files/usr | Run make install
|
What did you replace ./configure with? | Search path |
|---|---|
./configure | Skip to 8. Test Ajla |
./configure --prefix="$HOME"/.local | /home/user/.local/bin, where “user“ is
your username
|
./configure --prefix=/data/data/com.termux/files/usr | /data/data/com.termux/files/usr/bin
|
echo $PATH and check whether it already contains the search path. If not, do this procedure:
Apped this line to ~/.profile:
PATH=~/.local/bin:"$PATH"and try these actions one by one until what
echo $PATH prints contains the search path: