The following instructions are for Debian/Ubuntu systems. Other modern Linux/BSD/UNIX systems should work with minor adjustments to the instructions. These instructions need the following packages:
- gcc and other compiler tools:
apt install build-essential
- Python 3:
apt install python3
Download, unpack, compile, test, install
In a root terminal, create a
adduser --disabled-password --gecos djbsort djbsort
Run a shell as that user:
su - djbsort
As that user, download and unpack the latest version of djbsort:
wget -m https://sorting.cr.yp.to/djbsort-latest-version.txt version=$(cat sorting.cr.yp.to/djbsort-latest-version.txt) wget -m https://sorting.cr.yp.to/djbsort-$version.tar.gz tar -xzf sorting.cr.yp.to/djbsort-$version.tar.gz cd djbsort-$version ln -s $HOME link-build ln -s $HOME link-install
Compile, test, and install:
The last line of a successful compile-test-install run is
benchmark finishing successfully".
Exit the user shell:
./do tries a list of compilers in
keeping the fastest working implementation of each primitive.
you can edit
compilers/c to adjust compiler options
or to try additional compilers.
If you put both 32-bit and 64-bit compilers into
./do will produce both 32-bit and 64-bit libraries,
lib-amd64 (on Intel/AMD CPUs)
lib-aarch64 (on ARM CPUs).
You should put the 64-bit compilers first
so that they are used (if possible) for the command-line tools.
Version: This is version 2018.07.16 of the "Installation" web page.