Install Ajla from released source code

1. Determine operating system

  1. echo $HOME , if it prints /data/data/com.termux/files/home, then it's Termux in Android.
  2. lsb_release -a
  3. cat /etc/issue
  4. uname -a

2. Prevent failure on lengthy activities

If on a phone, remember to keep the compilation running in the foreground and prevent the display from turning off:

3. Install required and recommended software

3.1 Packages which have to be installed before the others

If you are on Termux on Android, install the tur-repo package (pkg in tur-repo).

3.2 Install main prerequisities

Consequences of missing packages

Operating System Package names required Package names recommended
Alma, CentOS, Oracle Linux, Red Hat Enterprise Linux (RHEL), Rocky gcc make gmp-devel libffi-devel numactl-devel screen (if available)
Alpine gcc make gmp-dev libffi-dev numactl-dev z3-dev screen (if available)
Android with Termux gcc-15 ldd make libffi libgmp screen z3
Arch, Manjaro gcc make gmp numactl screen z3
Debian, Edubuntu, Kali, Kubuntu, Lite, MX, Lubuntu, Mint, Trisquel, Ubuntu, Xubuntu, Zorin gcc make libffi-dev libgmp-dev libnuma-dev libz3-dev screen
Fedora gcc make gmp-devel libffi-devel numactl-devel screen z3-devel
FreeBSD gcc8 libffi gmp linux-c7-numactl-libs screen z3
GeckoLinux, OpenSUSE gcc make gmp-devel libffi-devel libnuma-devel screen z3-devel
Gentoo libffi gmp numactl screen z3
iOS with iSH ed gcc make sed libffi-dev gmp-dev numactl-dev screen z3-dev
Linux From Scratch, Linux without a distribution GMP Libffi Screen
NetBSD gcc libffi gmp screen z3
OpenBSD egcc gmake libffi libgmp screen z3
Other GCC GNU Make GMP Libffi numactl GNU Screen Z3
Slackware, Zenwalk gcc make libffi gmp screen
Windows with Cygwin gcc-core make libffi-devel libgmp-devel screen

4. Download Ajla

  1. If your system allows it, make sure you are logged in as ordinary user and not root/administrator.
  2. Download and unpack the latest released ajla-0.2.2.tar.gz source code or an older .tar.gz version.

5. Compile Ajla

  1. If on SSH, iOS iSH or Android Termux, start the command screen (if available). If network disconnects, reattach with screen -dr. It also helps with lack of terminals.
  2. Enter the directory ajla-* that was created by unpacking the archive
  3. Determine the major version of GCC by running this command
    Operating SystemCommand to print GCC major version
    Android with Termuxgcc-15 -v
    FreeBSDgcc8 -v
    OpenBSDegcc -v
    Othergcc -v
    and take the first number after “gcc version”. If it fails, assume major version 12.
  4. Determine RAM size of your computer/phone 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.
  5. Remember to replace CC=gcc depending on your operating system:
    Operating SystemReplace CC=gcc with
    Android with TermuxCC=gcc-15
    FreeBSDCC=gcc8
    OpenBSDCC=egcc
    OtherCC=gcc
  6. Determine what to replace ./configure with. Take one row of the table after another until it tells you what:
    StepTestReplace ./configure with
    1Are you on Termux in Android?./configure --prefix=/data/data/com.termux/files/usr
    2Do you know the root or administrator password?./configure
    3Are you entitled to run sudo?./configure
    4Are you already running as root or administrator?./configure
    5Otherwise./configure --prefix="$HOME"/.local
  7. According to your GCC version, select column 1-4 in the table below. Then, according to your RAM size, select the appropriate row. If you take a lower row, your computer may become unresponsive for long time, or the installation even fails with an error. If you take a higher row, Ajla will run or install unnnecessarily slower.
  8. Optionally determine max. CPU GHz from /proc/cpuinfo, lscpu, cpufreq-info or technical specs and estimate compilation time: minutes=GHz_minutes / CPU_GHz. If on iOS iSH, additionally multiply by 6.8.
  9. If on battery powered device, plan enough runtime for that time.
  10. Make sure you will have 100 MB disk space available
  11. Close unneeded memory-hungry Firefox or Chromium tabs and similar stuff.
  12. Copy-paste the corresponding command, replace CC=gcc according to point 5., replace ./configure according to point 6. and run it. If your computer becomes unresponsive, close more memory hungry Firefox or Chromium tabs or other programs.
    RAM size for GCC <=11 RAM size for GCC 12-14 or a compiler different from GCC RAM size for GCC >= 15 on systems different from Debian, Edubuntu, Kali, Kubuntu, Lite, MX, Lubuntu, Mint, Trisquel, Ubuntu, Xubuntu, Zorin RAM size for GCC >= 15 on Debian, Edubuntu, Kali, Kubuntu, Lite, MX, Lubuntu, Mint, Trisquel, Ubuntu, Xubuntu, Zorin Command to run
    >=640 MB < 680 MB
    19.6 GHz_minutes
    >=670 MB < 710 MB
    16.4 GHz_minutes
    >=875 MB < 1 GB
    10.5 GHz_minutes
    >=1 GB < 1.3 GB
    17 GHz_minutes
    CC=gcc CFLAGS="-O1 --param ggc-min-expand=1 --param ggc-min-heapsize=1024" ./configure --disable-computed-goto && make -j1 ipret.o ipretc.o && make -j2
    
    >=680 MB < 3 GB
    14.5 GHz_minutes
    >=710 MB < 2.5 GB
    12.7 GHz_minutes
    >=1 GB < 3 GB
    7.5 GHz_minutes
    >=1.3 GB < 4 GB
    12.1 GHz_minutes
    CC=gcc CFLAGS="-O1 --param ggc-min-expand=20 --param ggc-min-heapsize=16384" ./configure --disable-computed-goto && make -j1 ipret.o ipretc.o && make -j2
    
    >=3 GB < 4 GB
    33.8 GHz_minutes
    >=2.5 GB < 4 GB
    32.2 GHz_minutes
    >=3 GB < 5 GB
    10.7 GHz_minutes
    >=4 GB < 7 GB
    17.3 GHz_minutes
    CC=gcc CFLAGS=-O2 ./configure --disable-computed-goto && make -j1 ipret.o ipretc.o && make -j2
    
    >=4 GB < 8 GB
    38.4 GHz_minutes
    >=4 GB < 8 GB
    36.7 GHz_minutes
    >=5 GB < 9 GB
    24.4 GHz_minutes
    >=7 GB < 12 GB
    39.5 GHz_minutes
    CC=gcc CFLAGS=-O2 ./configure && make -j1 ipret.o ipretc.o && make -j8
    
    >=8 GB < 12 GB
    25.9 GHz_minutes
    >=8 GB < 12 GB
    24.2 GHz_minutes
    >=9 GB < 13 GB
    16.1 GHz_minutes
    >=12 GB < 16 GB
    26 GHz_minutes
    CC=gcc CFLAGS=-O2 ./configure && make -j2 ipret.o ipretc.o && make -j8
    
    >=12 GB
    24.3 GHz_minutes
    >=12 GB
    24.1 GHz_minutes
    >=13 GB
    14.9 GHz_minutes
    >=16 GB
    24.1 GHz_minutes
    CC=gcc CFLAGS=-O2 ./configure && make -j8
    

6. Copy Ajla to permanent location

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"/.localRun make install
./configure --prefix=/data/data/com.termux/files/usrRun make install

7. Set search path for the ajla command

7.1 Determine the search path

What did you replace ./configure with?Search path
./configureSkip 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

7.2 Set the search path

Run 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:
  1. Log out from all consoles, terminal emulators (xterm,...), and SSH's and log in again
  2. Reboot the system

8. Test Ajla

Test Ajla. If it fails, check that you didn't make a mistake during the installation and if not, then the installation procedure is defective and contact support at [email protected] You can also optionally mention the problem at the mailing list https://www.freelists.org/list/ajla.

9. Clean up

You can optionally delete the ajla-*.tar.gz file ane ajla-* directory that was created by unpacking it, which you just used to compile Ajla, and you are currently in. It saves about 25 MB.