| Table of contents: | |
| 1) Dependencies for using gnulib-tool (maintainer environment) | |
| 2) Dependencies for building the imported code (target environment) | |
| 1) Dependencies for using gnulib-tool (maintainer environment) | |
| ************************************************************** | |
| The following packages are needed by maintainers for using 'gnulib-tool'. | |
| We call this the "maintainer environment", although it is not necessarily | |
| a maintainer's or developer's machine; it can also be some containerized | |
| environment. | |
| In general, Gnulib prefers the latest stable version of each package, | |
| but in some cases it also supports older versions; this caters to | |
| commonly-used software distributions that may lag behind the latest | |
| stable package. Support for older versions is not guaranteed, though, | |
| and the version numbers in the following list may be incremented | |
| at any time. | |
| * A C runtime, compiler, linker, etc. | |
| + Mandatory. Using the platform's native 'cc' gives good portability | |
| exposure, but you can also use GCC 3.1 or newer. | |
| + GCC Homepage: | |
| https://gcc.gnu.org/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/gcc/ | |
| * A 'make' utility. | |
| + Mandatory. Using the platform's native 'make' gives good portability | |
| exposure for in-tree builds, but VPATH builds on OpenBSD or Solaris | |
| require GNU Make 3.79.1 or newer. | |
| + GNU Make Homepage: | |
| https://www.gnu.org/software/make/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/make/ | |
| * GNU M4 1.4.5 or newer. | |
| + Mandatory. | |
| 1.4.5 or newer is mandatory, but 1.4.9 or newer is recommended. | |
| If you want to build it from source, use the tarball from | |
| https://gitlab.com/gnu-m4/ci-distcheck/-/jobs/artifacts/master/raw/m4-snapshot.tar?job=check-optimized | |
| + Homepage: | |
| https://www.gnu.org/software/m4/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/m4/ | |
| * Autoconf 2.64 or newer. | |
| + Mandatory. | |
| + Homepage: | |
| https://www.gnu.org/software/autoconf/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/autoconf/ | |
| * Automake 1.14 or newer. | |
| + Mandatory. | |
| + Homepage: | |
| https://www.gnu.org/software/automake/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/automake/ | |
| * A shell | |
| + Mandatory. Using the platform's native 'sh' gives good portability | |
| exposure, but you can also use Bash. | |
| + Homepage: | |
| https://www.gnu.org/software/bash/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/bash/ | |
| * Core POSIX utilities, including: | |
| [ basename cat chgrp chmod chown cp dd echo expand expr | |
| false hostname install join kill ln ls md5sum mkdir mkfifo | |
| mknod mv printenv pwd rm rmdir sleep sort tee test touch | |
| true uname | |
| + Mandatory. Using the platform's native utilities gives good portability | |
| exposure, but you can also use GNU coreutils. | |
| + Homepage: | |
| https://www.gnu.org/software/coreutils/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/coreutils/ | |
| * The comparison utilities 'cmp' and 'diff'. | |
| + Mandatory. Using the platform's native utilities gives good portability | |
| exposure, but you can also use GNU diffutils. | |
| + Homepage: | |
| https://www.gnu.org/software/diffutils/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/diffutils/ | |
| * The patch utility 'patch'. | |
| + Mandatory if you use gnulib-local diffs. Using the platform's native | |
| utilities gives good portability exposure, but you can also use GNU | |
| patch. | |
| + Homepage: | |
| https://www.gnu.org/software/patch/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/patch/ | |
| * Grep. | |
| + Mandatory. Using the platform's native grep gives good portability | |
| exposure, but you can also use GNU grep. | |
| + Homepage: | |
| https://www.gnu.org/software/grep/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/grep/ | |
| * Awk. | |
| + Mandatory. | |
| Using the platform's native awk, mawk, or nawk gives good portability | |
| exposure, but you can also use GNU awk. | |
| + Homepage: | |
| https://www.gnu.org/software/gawk/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/gawk/ | |
| * Python 3.7 or newer. | |
| * Recommended. | |
| Without it, gnulib-tool is between 8 times and 100 times slower and may lack | |
| functionality added after April 2024. | |
| + Homepage: | |
| https://www.python.org/ | |
| + Download: | |
| https://www.python.org/downloads/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: python3, | |
| - On Red Hat distributions: python3. | |
| - Other: https://repology.org/project/python/versions | |
| * GNU gettext. | |
| + If your project wants to follow GNU Coding Standards: | |
| + Always use the newest available gettext release, see | |
| <https://www.gnu.org/software/gnulib/manual/html_node/gettextize-and-autopoint.html>. | |
| + Use the 'gettext' module. | |
| + If your project cares more about ease of development on older platforms: | |
| + gettext 0.17 or newer. | |
| + Use the 'gettext-h' module. | |
| + Recommended. | |
| Needed if you use modules that use internationalization (many do). | |
| + Homepage: | |
| https://www.gnu.org/software/gettext/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/gettext/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: gettext, | |
| - On Red Hat distributions: gettext. | |
| - Other: https://repology.org/project/gettext/versions | |
| * Bison 2.0 or newer. | |
| + Recommended. | |
| Needed if you use the 'parse-datetime' module. | |
| + Homepage: | |
| https://www.gnu.org/software/bison/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/bison/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: bison, | |
| - On Red Hat distributions: bison. | |
| - Other: https://repology.org/project/bison/versions | |
| * GNU gperf 3.0.1 or newer. | |
| + 3.0.1 or newer is mandatory, but 3.1 or newer is recommended. | |
| Needed if you use the 'iconv_open' module or some of the | |
| unictype/*, unicase/*, uninorm/* modules. | |
| + Homepage: | |
| https://www.gnu.org/software/gperf/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/gperf/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: gperf, | |
| - On Red Hat distributions: gperf. | |
| - Other: https://repology.org/project/gperf/versions | |
| * Texinfo 4.6 or newer. | |
| + Recommended. | |
| Needed if you use modules that include documentation. | |
| + Homepage: | |
| https://www.gnu.org/software/texinfo/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/texinfo/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: texinfo, | |
| - On Red Hat distributions: texinfo. | |
| - Other: https://repology.org/project/texinfo/versions | |
| * GNU sed. | |
| + Recommended. | |
| Needed on platforms where the vendor's 'sed' program is too buggy. | |
| + Homepage: | |
| https://www.gnu.org/software/sed/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/sed/ | |
| * GNU libtool 1.5.22 or newer. | |
| + Optional. | |
| Needed if you want to invoke gnulib-tool with option --libtool. | |
| libtool 2.2.x or newer is needed if you want to invoke gnulib-tool | |
| with options --create-testdir/--test and --libtool. | |
| + Homepage: | |
| https://www.gnu.org/software/libtool/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/libtool/ | |
| * GNU tar 1.28 or newer. | |
| + Optional. | |
| Needed if you use the 'gnumakefile' module, which sets TAR_OPTIONS | |
| to --sort=names (added in version 1.28) in GNUmakefile for 'make dist'. | |
| + Homepage: | |
| https://www.gnu.org/software/tar/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/tar/ | |
| Note: Solaris 10 is no longer supported as maintainer environment. | |
| <https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00076.html> | |
| 2) Dependencies for building the imported code (target environment) | |
| ******************************************************************* | |
| The following packages are needed for building the package that imports | |
| code from Gnulib. | |
| * A C runtime, compiler, linker, etc. | |
| + Mandatory. Using the platform's native 'cc' gives good portability | |
| exposure, but you can also use GCC 3.1 or newer. | |
| + GCC Homepage: | |
| https://gcc.gnu.org/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/gcc/ | |
| * A 'make' utility. | |
| + Mandatory. Using the platform's native 'make' gives good portability | |
| exposure for in-tree builds, but VPATH builds on OpenBSD or Solaris | |
| require GNU Make 3.79.1 or newer. | |
| + GNU Make Homepage: | |
| https://www.gnu.org/software/make/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/make/ | |
| * A shell | |
| + Mandatory. Using the platform's native 'sh' gives good portability | |
| exposure, but you can also use Bash. | |
| + Homepage: | |
| https://www.gnu.org/software/bash/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/bash/ | |
| * Core POSIX utilities, including: | |
| [ basename cat chgrp chmod chown cp dd echo expand expr | |
| false hostname install kill ln ls md5sum mkdir mkfifo | |
| mknod mv printenv pwd rm rmdir sleep sort tee test touch | |
| true uname | |
| + Mandatory. Using the platform's native utilities gives good portability | |
| exposure, but you can also use GNU coreutils. | |
| + Homepage: | |
| https://www.gnu.org/software/coreutils/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/coreutils/ | |
| * The comparison utilities 'cmp' and 'diff'. | |
| + Mandatory. Using the platform's native utilities gives good portability | |
| exposure, but you can also use GNU diffutils. | |
| + Homepage: | |
| https://www.gnu.org/software/diffutils/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/diffutils/ | |
| * Grep. | |
| + Mandatory. Using the platform's native grep gives good portability | |
| exposure, but you can also use GNU grep. | |
| + Homepage: | |
| https://www.gnu.org/software/grep/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/grep/ | |
| * Awk. | |
| + Mandatory. | |
| Using the platform's native awk, mawk, or nawk gives good portability | |
| exposure, but you can also use GNU awk. | |
| + Homepage: | |
| https://www.gnu.org/software/gawk/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/gawk/ | |
| Prerequisites on Windows | |
| ------------------------ | |
| * Cygwin | |
| + Required. | |
| Provides a POSIX-like environment and binary packages necessary to | |
| build and run software. Native Windows binaries can be built with | |
| a packaged mingw tool chain. This method is preferred over MSYS2. | |
| + Homepage: | |
| https://cygwin.com/ | |
| + Download: | |
| https://cygwin.com/install.html | |
| Libraries | |
| --------- | |
| Various modules work best with certain libraries installed. These are runtime | |
| dependencies that are also build dependencies. | |
| For modules 'abort-debug' and 'stack-trace': | |
| * libbacktrace | |
| + Recommended. | |
| Needed for producing C stack traces with source file names and | |
| line numbers. | |
| + Homepage: | |
| https://github.com/ianlancetaylor/libbacktrace | |
| + Download: | |
| https://github.com/ianlancetaylor/libbacktrace | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: libgcc-N-dev, | |
| - On Red Hat distributions: --. | |
| - Other: https://repology.org/project/libbacktrace/versions | |
| For module 'acl': | |
| * libacl | |
| + Recommended on Linux systems. | |
| Needed so that the creation of backup files respects the access control | |
| lists (ACLs) set on the original files. | |
| + Homepage: | |
| https://savannah.nongnu.org/projects/acl/ | |
| + Download: | |
| https://download.savannah.nongnu.org/releases/acl/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: libacl1-dev, | |
| - On Red Hat distributions: libacl-devel. | |
| - Other: https://repology.org/project/acl/versions | |
| * libattr | |
| + Recommended on Linux systems. | |
| Needed so that the creation of backup files respects the access control | |
| lists (ACLs) set on the original files, with fewer system calls. | |
| + Homepage: | |
| https://savannah.nongnu.org/projects/attr/ | |
| + Download: | |
| https://download.savannah.nongnu.org/releases/attr/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: libattr1-dev, | |
| - On Red Hat distributions: libattr-devel. | |
| - Other: https://repology.org/project/attr/versions | |
| For module 'gettext-h': | |
| * libintl, part of GNU gettext | |
| + Not needed on systems with glibc. | |
| But highly recommended on all other systems. | |
| Needed for localization (translation) of messages to the user's | |
| native language. | |
| + Homepage: | |
| https://www.gnu.org/software/gettext/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/gettext/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: --, | |
| - On Red Hat distributions: --. | |
| - Other: https://repology.org/project/gettext/versions | |
| + If it is installed in a nonstandard directory, pass the option | |
| --with-libintl-prefix=DIR to 'configure'. | |
| For module 'iconv': | |
| * GNU libiconv | |
| + Not needed on systems with glibc and on NetBSD. | |
| But highly recommended on all other systems. | |
| Needed for character set conversion of strings from/to Unicode. | |
| + Homepage: | |
| https://www.gnu.org/software/libiconv/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/libiconv/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: --, | |
| - On Red Hat distributions: --. | |
| - Other: https://repology.org/project/libiconv/versions | |
| + If it is installed in a nonstandard directory, pass the option | |
| --with-libiconv-prefix=DIR to 'configure'. | |
| + On mingw, a slim alternative is the 'win-iconv' package version 0.0.8 | |
| from https://github.com/win-iconv/win-iconv . | |
| For module 'libgmp': | |
| * GNU gmp. | |
| + Recommended. | |
| Needed for fast multiprecision computations. | |
| + Homepage: | |
| https://www.gnu.org/software/gmp/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/gmp/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: libgmp-dev, | |
| - On Red Hat distributions: gmp-devel. | |
| - Other: https://repology.org/project/gmp/versions | |
| + If it is installed in a nonstandard directory, pass the option | |
| --with-libgmp-prefix to 'configure'. | |
| For module 'readline': | |
| * GNU readline | |
| + Recommended. | |
| Needed for interactive editing of textual input. | |
| + Homepage: | |
| https://www.gnu.org/software/readline/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/readline/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: libreadline-dev, | |
| - On Red Hat distributions: readline-devel. | |
| - Other: https://repology.org/project/readline/versions | |
| + If it is installed in a nonstandard directory, pass the option | |
| --with-libreadline-prefix=DIR to 'configure'. | |
| For modules 'readutmp' and 'boot-time': | |
| * systemd libraries | |
| + Recommended if systemd >= 254 is present on the system. | |
| Needed for fetching current status from systemd-logind instead of | |
| from the file /var/run/utmp. | |
| + Homepage: | |
| https://systemd.io/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: libsystemd-dev, | |
| - On Red Hat distributions: systemd-devel. | |
| - Other: https://repology.org/project/systemd/versions | |
| For modules 'terminfo' and 'termcap': | |
| * GNU ncurses (preferred) | |
| or libtermcap (discouraged) or a curses library (legacy). | |
| + Recommended. | |
| Needed for fancy input/output in terminal emulators. | |
| + Homepage: | |
| https://www.gnu.org/software/ncurses/ | |
| + Download: | |
| https://ftp.gnu.org/gnu/ncurses/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: libncurses-dev, | |
| - On Red Hat distributions: ncurses-devel. | |
| - Other: https://repology.org/project/ncurses/versions | |
| + If it is installed in a nonstandard directory, pass the option | |
| --with-libncurses-prefix=DIR or --with-libtermcap-prefix to 'configure'. | |
| For modules 'crypto/md5-buffer', 'crypto/sha*-buffer': | |
| * OpenSSL. | |
| + Optional. | |
| Needed for optimized crypto hash sums. | |
| + Homepage: | |
| https://www.openssl.org/ | |
| + Download: | |
| https://www.openssl.org/source/ | |
| + Pre-built package name: | |
| - On Debian and Debian-based systems: libssl-dev, | |
| - On Red Hat distributions: openssl-devel. | |
| - Other: https://repology.org/project/openssl/versions | |
| Locales | |
| ------- | |
| If your package includes the tests for the Gnulib modules that you imported, | |
| you will want to maximize the test coverage of these tests, that is, to | |
| minimize the number of tests that are skipped. To this effect, you need to | |
| install a couple of locales, used by the tests. | |
| You can get a listing of the locales installed by default through | |
| $ locale -a | |
| (Note: On glibc systems, this command displays the encoding names in a | |
| mutilated form, e.g. it transforms "en_US.UTF-8" to "en_US.utf8".) | |
| To install the needed locales on glibc systems: | |
| $ sudo localedef -i en_US -f UTF-8 en_US.UTF-8 | |
| $ sudo localedef -i ar_SA -f ISO-8859-6 ar_SA.ISO-8859-6 | |
| $ sudo localedef -i de_DE -f UTF-8 de_DE.UTF-8 | |
| $ sudo localedef -i es_ES -f UTF-8 es_ES.UTF-8 | |
| $ sudo localedef -i fa_IR -f UTF-8 fa_IR | |
| $ sudo localedef -i fr_FR -f ISO-8859-1 fr_FR.ISO-8859-1 | |
| $ sudo localedef -i fr_FR -f UTF-8 fr_FR.UTF-8 | |
| $ sudo localedef -i ja_JP -f EUC-JP ja_JP.EUC-JP | |
| $ sudo localedef -i tr_TR -f UTF-8 tr_TR.UTF-8 | |
| $ sudo localedef -i zh_CN -f GB18030 zh_CN.GB18030 | |
| $ sudo localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS | |
| On Debian and Debian-based systems, if you want these locales to be | |
| persistent across automatic system updates, the approach is different: | |
| There, you need to enable the locales in the file /etc/locale.gen and | |
| then run | |
| $ sudo locale-gen | |