Installing stdlib packages

Installing stdlib packages

This guide covers the installation of the Fortran Standard Library (stdlib) on various platforms from a package manager.

Note

If you are looking for using stdlib with the Fortran Package Manager (fpm) checkout the guide on Using stdlib with fpm.

Note

If none of the package managers is suitable for your platform or you plan to contribute to stdlib checkout the guide on Building stdlib from source.

Conda package manager

Stdlib is available on conda-forge, to add conda-forge to your channels use:

conda config --add channels conda-forge

Stdlib can be installed with:

conda create -n stdlib fortran_stdlib
conda activate stdli

Alternatively, if you want stdlib to be always available directly install into your current environment with

conda install fortran_stdlib

Now you a stdlib installation available which is compatible with GCC 9 and upwards.

Note

The conda package manager can be installed from miniforge or from miniconda.

Arch Linux user repository

The Arch Linux user repository (AUR) contains a package for fortran_stdlib to install the stdlib from source. You will have to provide an installation of fypp, which is also available via the AUR.

Select one of the PKGBUILDs and retrieve it with

git clone https://aur.archlinux.org/fypp.git
cd fypp

As usual, first inspect the PKGBUILD before building it. After verifying the PKGBUILD is fine, build the package with

makepkg -si

Now with fypp available you can repeat the above steps for stdlib

git clone https://aur.archlinux.org/fortran_stdlib.git
cd fortran_stdlib

Again, inspect the PKGBUILD before building it and than run the package script with

makepkg -si

Now you have an installation of stdlib available for use with your systems GCC compiler.