Prerequisites
Most of the dependencies can be easily installed via a package management system. Example commands are given to show how this can be done on Fedora, Ubuntu and macOS (using MacPorts and Brew). Further information about packages available via these package management systems can be found as follows:
- Fedora
- Ubuntu
- macOS using MacPorts
- macOS using Brew
Package management systems typically offer limited control over which version of a package is used. To install a specific version, it may be necessary to build from source.
SML compilers
Giraffe Library supports both MLton and Poly/ML compilers. It is not necessary to install both compilers to use Giraffe Library. At least one of the following versions is required:
MLton |
≥ |
20130715 |
Poly/ML |
≥ |
5.6 |
The package management commands to install the supported SML compilers on Fedora, Ubuntu and macOS (using MacPorts and Brew) are shown below. The commands can be adjusted as required.
- Fedora
sudo dnf install mlton # Fedora 20 or later for required version sudo dnf install polyml # Fedora 24 or later for required version
- Ubuntu
sudo apt-get install mlton # Ubuntu 18.04 (Bionic) or later for required version sudo apt-get install polyml # Ubuntu 16.04 (Xenial) or later for required version
- macOS using MacPorts
sudo port install polyml
Note that MLton is not available from MacPorts.
- macOS using Brew
brew install mlton brew install polyml
If the required versions cannot be provided via the package management system, the SML compilers can be build from source. For instructions on installing MLton from source, see
For instructions on installing Poly/ML from source, see
Standard tools
Standard tools commonly found on Unix-like systems are required:
An ANSI C compiler, such as GCC, and a linker are required to build minimal C libraries that support the SML interface to GObect-based libraries.
Common GNU utilities are required, including Bash, Make, Grep and Sed
The pkg-config utility is required for the purpose of finding library dependencies for compiling and linking.
The package management commands to install the standard tools on Fedora, Ubuntu and macOS (using MacPorts and Brew) are shown below. The commands can be adjusted as required.
- Fedora
sudo dnf install gcc binutils bash make coreutils grep sed pkgconfig
- Ubuntu
sudo apt-get install gcc binutils bash make coreutils grep sed pkg-config
- macOS using MacPorts
sudo port install binutils bash gmake coreutils grep gsed pkgconfig
Note that a compiler and linker provided by Xcode can be used.
- macOS using Brew
brew install binutils bash make coreutils grep gnu-sed pkg-config
Note that a compiler and linker provided by Xcode can be used.
Libraries
Giraffe Library provides SML bindings to libraries where the interface is based on the version indicated in the list of available libraries. Later versions of these libraries are expected to work but newer features are not available. Earlier versions of these libraries may still work, depending on the actual dependencies of an application using Giraffe Library. It is not necessary for all available libraries to be present: Giraffe Library will not install bindings to libraries that it cannot find using pkg-config.
In order to use a library, its C header files are required. Therefore, when using a package management system, the 'devel' or 'dev' package is typically also required. (This does not apply to MacPorts and Brew.)
The package management commands to install all available libraries with their source header files on Fedora, Ubuntu and macOS (using MacPorts and Brew) are shown below. The commands can be adjusted as required.
- Fedora
sudo dnf install gtk3-devel gtksourceview3-devel sudo dnf install vte3-devel # Fedora 29 or earlier sudo dnf install vte291-devel # Fedora 21 or later
- Ubuntu
sudo apt-get install libgtk-3-dev \ libgtksourceview-3.0-dev sudo apt-get install libvte-2.90-dev # Ubuntu 14.04 (Trusty) only sudo apt-get install libvte-2.91-dev # Ubuntu 15.04 (Vivid) or later
- macOS using MacPorts
sudo port install gtk3 gtksourceview3 vte
Note that some of these ports have x11 and quartz variants available.
- macOS using Brew
brew install gtk+3 gtksourceview3 vte3
If the required versions cannot be provided via the package management system, the libraries can be build from source. To do this, a build environment such as JHBuild or BuildStream is recommended.