
Before you can build GNU APL, make sure that the following
libraries/packages have been installed:

gcc/g++    	from a GNU mirror (directory: gcc, file: gcc-?.?.?.tar.gz)
make    	from a GNU mirror (directory: gcc, file: make-?.?.tar.gz)

If you are using Ubuntu, then the following commands may do the trick:

    apt-get install g++
    apt-get install subversion

Subversion is not strictly required, but helps a lot to remain up-to-date
with the correction of errors in GNU APL.

For Fedora:

    dnf -y group install  "C Development Tools and Libraries"

For Centos: replace dnf by yum

On Linux Mint 14.1, GNU APL compiled out-of--the-box.
On Fedora 25, GNU APL compiled out-of-the-box.

On macOS, there is a detailed description, kindly provided by Peter Teeson,
in file APL-on-Macintosh.pdf. Also consider Peter's latest remark:

   if you are an Apple developer using macOS version >= Catalina 10.15
   you need to install either svn or git yourself! I think this also applies
   to sqlite3.

GNU APL has implemented a number of optional system functions, notably ⎕FFT,
⎕PLOT, ⎕RE, and ⎕SQL, that require additional libraries to be installed when
GNU APL is compiled. These libraries and, more importantly their dependencies,
are optional, and GNU APL will compile even if they are missing. GNU APL will
parse APL code that uses optional system functions, but calling these
functions will raise a SYNTAX ERROR.

The list of libraries needed for GNU APL itself, i.e. with all possible
features disabled, contains the following 8 libraries (which are all already
installed):

    /lib64/ld-linux-x86-64.so.2
    libc.so.6       →  /lib/x86_64-linux-gnu/libc.so.6
    libdl.so.2      →  /lib/x86_64-linux-gnu/libdl.so.2
    libgcc_s.so.1   →  /lib/x86_64-linux-gnu/libgcc_s.so.1
    libm.so.6       →  /lib/x86_64-linux-gnu/libm.so.6
    libpthread.so.0 →  /lib/x86_64-linux-gnu/libpthread.so.0
    libstdc++.so.6  →  /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    linux-vdso.so.1

In contrast, the list of libraries needed for GNU APL with full support for
all system functions needs about 100 libraries (the actual number may differ
between different Gnu/Linux variants):

    /lib64/ld-linux-x86-64.so.2
    libasn1.so.8           →  /usr/lib/x86_64-linux-gnu/libasn1.so.8
    libatk-1.0.so.0        →  /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0
    libatk-bridge-2.0.so.0 →  /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0
    libatspi.so.0          →  /usr/lib/x86_64-linux-gnu/libatspi.so.0
    libblkid.so.1          →  /lib/x86_64-linux-gnu/libblkid.so.1
    libbsd.so.0            →  /lib/x86_64-linux-gnu/libbsd.so.0
    libcairo-gobject.so.2  →  /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2
    libcairo.so.2          →  /usr/lib/x86_64-linux-gnu/libcairo.so.2
    libcom_err.so.2        →  /lib/x86_64-linux-gnu/libcom_err.so.2
    libcrypto.so.1.1       →  /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
    libcrypt.so.1          →  /lib/x86_64-linux-gnu/libcrypt.so.1
    libc.so.6              →  /lib/x86_64-linux-gnu/libc.so.6
    libdatrie.so.1         →  /usr/lib/x86_64-linux-gnu/libdatrie.so.1
    libdbus-1.so.3         →  /lib/x86_64-linux-gnu/libdbus-1.so.3
    libdl.so.2             →  /lib/x86_64-linux-gnu/libdl.so.2
    libepoxy.so.0          →  /usr/lib/x86_64-linux-gnu/libepoxy.so.0
    libexpat.so.1          →  /lib/x86_64-linux-gnu/libexpat.so.1
    libffi.so.6            →  /usr/lib/x86_64-linux-gnu/libffi.so.6
    libfftw3.so.3          →  /usr/lib/x86_64-linux-gnu/libfftw3.so.3
    libfontconfig.so.1     →  /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
    libfreetype.so.6       →  /usr/lib/x86_64-linux-gnu/libfreetype.so.6
    libgcc_s.so.1          →  /usr/local/lib64/libgcc_s.so.1
    libgcrypt.so.20        →  /lib/x86_64-linux-gnu/libgcrypt.so.20
    libgdk-3.so.0          →  /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
    libgdk_pixbuf-2.0.so.0 →  /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
    libgio-2.0.so.0        →  /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
    libglib-2.0.so.0       →  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
    libgmodule-2.0.so.0    →  /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0
    libgmp.so.10           →  /usr/lib/x86_64-linux-gnu/libgmp.so.10
    libgnutls.so.30        →  /usr/lib/x86_64-linux-gnu/libgnutls.so.30
    libgobject-2.0.so.0    →  /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    libgpg-error.so.0      →  /lib/x86_64-linux-gnu/libgpg-error.so.0
    libgraphite2.so.3      →  /usr/lib/x86_64-linux-gnu/libgraphite2.so.3
    libgssapi_krb5.so.2    →  /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
    libgssapi.so.3         →  /usr/lib/x86_64-linux-gnu/libgssapi.so.3
    libgtk-3.so.0          →  /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
    libharfbuzz.so.0       →  /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0
    libhcrypto.so.4        →  /usr/lib/x86_64-linux-gnu/libhcrypto.so.4
    libheimbase.so.1       →  /usr/lib/x86_64-linux-gnu/libheimbase.so.1
    libheimntlm.so.0       →  /usr/lib/x86_64-linux-gnu/libheimntlm.so.0
    libhogweed.so.4        →  /usr/lib/x86_64-linux-gnu/libhogweed.so.4
    libhx509.so.5          →  /usr/lib/x86_64-linux-gnu/libhx509.so.5
    libidn2.so.0           →  /usr/lib/x86_64-linux-gnu/libidn2.so.0
    libk5crypto.so.3       →  /usr/lib/x86_64-linux-gnu/libk5crypto.so.3
    libkeyutils.so.1       →  /lib/x86_64-linux-gnu/libkeyutils.so.1
    libkrb5.so.26          →  /usr/lib/x86_64-linux-gnu/libkrb5.so.26
    libkrb5.so.3           →  /usr/lib/x86_64-linux-gnu/libkrb5.so.3
    libkrb5support.so.0    →  /usr/lib/x86_64-linux-gnu/libkrb5support.so.0
    liblber-2.4.so.2       →  /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2
    libldap_r-2.4.so.2     →  /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2
    liblz4.so.1            →  /usr/lib/x86_64-linux-gnu/liblz4.so.1
    liblzma.so.5           →  /lib/x86_64-linux-gnu/liblzma.so.5
    libmount.so.1          →  /lib/x86_64-linux-gnu/libmount.so.1
    libm.so.6              →  /lib/x86_64-linux-gnu/libm.so.6
    libnettle.so.6         →  /usr/lib/x86_64-linux-gnu/libnettle.so.6
    libp11-kit.so.0        →  /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
    libpango-1.0.so.0      →  /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0
    libpangocairo-1.0.so.0 →  /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0
    libpangoft2-1.0.so.0   →  /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0
    libpcre2-32.so.0       →  /usr/lib/x86_64-linux-gnu/libpcre2-32.so.0
    libpcre.so.3           →  /lib/x86_64-linux-gnu/libpcre.so.3
    libpixman-1.so.0       →  /usr/lib/x86_64-linux-gnu/libpixman-1.so.0
    libpng16.so.16         →  /usr/lib/x86_64-linux-gnu/libpng16.so.16
    libpq.so.5             →  /usr/lib/x86_64-linux-gnu/libpq.so.5
    libpthread.so.0        →  /lib/x86_64-linux-gnu/libpthread.so.0
    libresolv.so.2         →  /lib/x86_64-linux-gnu/libresolv.so.2
    libroken.so.18         →  /usr/lib/x86_64-linux-gnu/libroken.so.18
    librt.so.1             →  /lib/x86_64-linux-gnu/librt.so.1
    libsasl2.so.2          →  /usr/lib/x86_64-linux-gnu/libsasl2.so.2
    libselinux.so.1        →  /lib/x86_64-linux-gnu/libselinux.so.1
    libsqlite3.so.0        →  /usr/lib/x86_64-linux-gnu/libsqlite3.so.0
    libssl.so.1.1          →  /usr/lib/x86_64-linux-gnu/libssl.so.1.1
    libstdc++.so.6         →  /usr/local/lib64/libstdc++.so.6
    libsystemd.so.0        →  /lib/x86_64-linux-gnu/libsystemd.so.0
    libtasn1.so.6          →  /usr/lib/x86_64-linux-gnu/libtasn1.so.6
    libthai.so.0           →  /usr/lib/x86_64-linux-gnu/libthai.so.0
    libunistring.so.2      →  /usr/lib/x86_64-linux-gnu/libunistring.so.2
    libuuid.so.1           →  /lib/x86_64-linux-gnu/libuuid.so.1
    libwayland-client.so.0 →  /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
    libwayland-cursor.so.0 →  /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0
    libwayland-egl.so.1    →  /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1
    libwind.so.0           →  /usr/lib/x86_64-linux-gnu/libwind.so.0
    libX11.so.6            →  /usr/lib/x86_64-linux-gnu/libX11.so.6
    libXau.so.6            →  /usr/lib/x86_64-linux-gnu/libXau.so.6
    libxcb-render.so.0     →  /usr/lib/x86_64-linux-gnu/libxcb-render.so.0
    libxcb-shm.so.0        →  /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0
    libxcb.so.1            →  /usr/lib/x86_64-linux-gnu/libxcb.so.1
    libXcomposite.so.1     →  /usr/lib/x86_64-linux-gnu/libXcomposite.so.1
    libXcursor.so.1        →  /usr/lib/x86_64-linux-gnu/libXcursor.so.1
    libXdamage.so.1        →  /usr/lib/x86_64-linux-gnu/libXdamage.so.1
    libXdmcp.so.6          →  /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
    libXext.so.6           →  /usr/lib/x86_64-linux-gnu/libXext.so.6
    libXfixes.so.3         →  /usr/lib/x86_64-linux-gnu/libXfixes.so.3
    libXinerama.so.1       →  /usr/lib/x86_64-linux-gnu/libXinerama.so.1
    libXi.so.6             →  /usr/lib/x86_64-linux-gnu/libXi.so.6
    libxkbcommon.so.0      →  /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0
    libXrandr.so.2         →  /usr/lib/x86_64-linux-gnu/libXrandr.so.2
    libXrender.so.1        →  /usr/lib/x86_64-linux-gnu/libXrender.so.1
    libz.so.1              →  /lib/x86_64-linux-gnu/libz.so.1
    linux-vdso.so.1

Fortunately most of these 100 libraries are dependencies of only a handful of
primary GNU APL dependencies (read: packages). Almost every GNU/Linux
distribution comes with a package manager, e.g:

 * apt in Ubuntu, Mint, and most other Debian based GNU/Linux distributions,
 * apk in Alpine Linux
 * dnf or yum in Fedora,
 * pacman in ArchLinux,
 * and so on.

Unfortunately the names of the packages that contain the above libraries
differs between Linux distributions and package managers and therefore we
cannot give a complete and correct list of packages here. For most package
managers, though, there exist package search sites on the internet where
you can find the package(s) that include a particular library.

If a system function raises a SYNTAX ERROR even though the syntax was correct,
then you may:

 * issue the )MORE command (directly after the syntax error) as to obtain
   likely names for the missing libraries and packages that may contain them,
 * search for the packages on the internet,
 * install the packages from the internet, and
 * run ./configure, make, and make install again for GNU APL.

For example (in GNU APL with libfftw3-dev NOT installed):

      ⎕FFT 1 2 3 4   ⍝ depends on libfftw3-dev, raises SYNTAX ERROR if missing
SYNTAX ERROR+
      ⎕FFT 1 2 3 4
      ^

      ⍝ issue the )MORE command to get some more information
      )MORE
...
The possibly missing (or disabled) library needed by ⎕FFT was: libfftw3.so
...
If the problem was caused by a missing library or header file, then (on a
standard GNU/Linux/Debian system) it can usually be installed with the
following command (as root and in a shell):

      apt install libfftw3-dev
...

After:
  apt install libfftw3-dev
  ./configure
  make
  sudo make install

in APL:

     ⎕FFT 1 2 3 4   ⍝ now succeeds
5 ¯1J1 ¯1 ¯1J¯1

Additionally, neither ./configure nor make will complain if the 'graphviz'
package providing the 'dot' utility used by the ]DOXY APL debug command is
missing during the build of GNU APL. This will therefore remain unnoticed
until ]DOXY is used. The user may easily determine if it is missing with
the invocation:

  apt list graphviz

on debian based systems and likewise it can be easily installed by invoking:

  sudo apt-get install graphviz

or by using the preferred system package manager.
