errno-h: document Haiku errors can’t be -1
[gnulib.git] / DEPENDENCIES
blobfa3bbeb62667fe28c08d988778065d96947be0bf
1 Table of contents:
2 1) Dependencies for using gnulib-tool (maintainer environment)
3 2) Dependencies for building the imported code (target environment)
6 1) Dependencies for using gnulib-tool (maintainer environment)
7 **************************************************************
9 The following packages are needed by maintainers for using 'gnulib-tool'.
10 We call this the "maintainer environment", although it is not necessarily
11 a maintainer's or developer's machine; it can also be some containerized
12 environment.
14 In general, Gnulib prefers the latest stable version of each package,
15 but in some cases it also supports older versions; this caters to
16 commonly-used software distributions that may lag behind the latest
17 stable package. Support for older versions is not guaranteed, though,
18 and the version numbers in the following list may be incremented
19 at any time.
21 * A C runtime, compiler, linker, etc.
22   + Mandatory. Using the platform's native 'cc' gives good portability
23     exposure, but you can also use GCC 3.1 or newer.
24   + GCC Homepage:
25     https://gcc.gnu.org/
26   + Download:
27     https://ftp.gnu.org/gnu/gcc/
29 * A 'make' utility.
30   + Mandatory. Using the platform's native 'make' gives good portability
31     exposure for in-tree builds, but VPATH builds on OpenBSD or Solaris
32     require GNU Make 3.79.1 or newer.
33   + GNU Make Homepage:
34     https://www.gnu.org/software/make/
35   + Download:
36     https://ftp.gnu.org/gnu/make/
38 * GNU M4 1.4.5 or newer.
39   + Mandatory.
40     1.4.5 or newer is mandatory, but 1.4.9 or newer is recommended.
41     If you want to build it from source, use the tarball from
42     https://gitlab.com/gnu-m4/ci-distcheck/-/jobs/artifacts/master/raw/m4-snapshot.tar?job=check-optimized
43   + Homepage:
44     https://www.gnu.org/software/m4/
45   + Download:
46     https://ftp.gnu.org/gnu/m4/
48 * Autoconf 2.64 or newer.
49   + Mandatory.
50   + Homepage:
51     https://www.gnu.org/software/autoconf/
52   + Download:
53     https://ftp.gnu.org/gnu/autoconf/
55 * Automake 1.14 or newer.
56   + Mandatory.
57   + Homepage:
58     https://www.gnu.org/software/automake/
59   + Download:
60     https://ftp.gnu.org/gnu/automake/
62 * A shell
63   + Mandatory. Using the platform's native 'sh' gives good portability
64     exposure, but you can also use Bash.
65   + Homepage:
66     https://www.gnu.org/software/bash/
67   + Download:
68     https://ftp.gnu.org/gnu/bash/
70 * Core POSIX utilities, including:
71     [ basename cat chgrp chmod chown cp dd echo expand expr
72     false hostname install join kill ln ls md5sum mkdir mkfifo
73     mknod mv printenv pwd rm rmdir sleep sort tee test touch
74     true uname
75   + Mandatory. Using the platform's native utilities gives good portability
76     exposure, but you can also use GNU coreutils.
77   + Homepage:
78     https://www.gnu.org/software/coreutils/
79   + Download:
80     https://ftp.gnu.org/gnu/coreutils/
82 * The comparison utilities 'cmp' and 'diff'.
83   + Mandatory. Using the platform's native utilities gives good portability
84     exposure, but you can also use GNU diffutils.
85   + Homepage:
86     https://www.gnu.org/software/diffutils/
87   + Download:
88     https://ftp.gnu.org/gnu/diffutils/
90 * The patch utility 'patch'.
91   + Mandatory if you use gnulib-local diffs. Using the platform's native
92     utilities gives good portability exposure, but you can also use GNU
93     patch.
94   + Homepage:
95     https://www.gnu.org/software/patch/
96   + Download:
97     https://ftp.gnu.org/gnu/patch/
99 * Grep.
100   + Mandatory. Using the platform's native grep gives good portability
101     exposure, but you can also use GNU grep.
102   + Homepage:
103     https://www.gnu.org/software/grep/
104   + Download:
105     https://ftp.gnu.org/gnu/grep/
107 * Awk.
108   + Mandatory.
109     Using the platform's native awk, mawk, or nawk gives good portability
110     exposure, but you can also use GNU awk.
111   + Homepage:
112     https://www.gnu.org/software/gawk/
113   + Download:
114     https://ftp.gnu.org/gnu/gawk/
116 * Python 3.7 or newer.
117   * Recommended.
118     Without it, gnulib-tool is between 8 times and 100 times slower and may lack
119     functionality added after April 2024.
120   + Homepage:
121     https://www.python.org/
122   + Download:
123     https://www.python.org/downloads/
124   + Pre-built package name:
125     - On Debian and Debian-based systems: python3,
126     - On Red Hat distributions: python3.
127     - Other: https://repology.org/project/python/versions
129 * GNU gettext.
130   + If your project wants to follow GNU Coding Standards:
131     + Always use the newest available gettext release, see
132       <https://www.gnu.org/software/gnulib/manual/html_node/gettextize-and-autopoint.html>.
133     + Use the 'gettext' module.
134   + If your project cares more about ease of development on older platforms:
135     + gettext 0.17 or newer.
136     + Use the 'gettext-h' module.
137   + Recommended.
138     Needed if you use modules that use internationalization (many do).
139   + Homepage:
140     https://www.gnu.org/software/gettext/
141   + Download:
142     https://ftp.gnu.org/gnu/gettext/
143   + Pre-built package name:
144     - On Debian and Debian-based systems: gettext,
145     - On Red Hat distributions: gettext.
146     - Other: https://repology.org/project/gettext/versions
148 * Bison 2.0 or newer.
149   + Recommended.
150     Needed if you use the 'parse-datetime' module.
151   + Homepage:
152     https://www.gnu.org/software/bison/
153   + Download:
154     https://ftp.gnu.org/gnu/bison/
155   + Pre-built package name:
156     - On Debian and Debian-based systems: bison,
157     - On Red Hat distributions: bison.
158     - Other: https://repology.org/project/bison/versions
160 * GNU gperf 3.0.1 or newer.
161   + 3.0.1 or newer is mandatory, but 3.1 or newer is recommended.
162     Needed if you use the 'iconv_open' module or some of the
163     unictype/*, unicase/*, uninorm/* modules.
164   + Homepage:
165     https://www.gnu.org/software/gperf/
166   + Download:
167     https://ftp.gnu.org/gnu/gperf/
168   + Pre-built package name:
169     - On Debian and Debian-based systems: gperf,
170     - On Red Hat distributions: gperf.
171     - Other: https://repology.org/project/gperf/versions
173 * Texinfo 4.6 or newer.
174   + Recommended.
175     Needed if you use modules that include documentation.
176   + Homepage:
177     https://www.gnu.org/software/texinfo/
178   + Download:
179     https://ftp.gnu.org/gnu/texinfo/
180   + Pre-built package name:
181     - On Debian and Debian-based systems: texinfo,
182     - On Red Hat distributions: texinfo.
183     - Other: https://repology.org/project/texinfo/versions
185 * GNU sed.
186   + Recommended.
187     Needed on platforms where the vendor's 'sed' program is too buggy.
188   + Homepage:
189     https://www.gnu.org/software/sed/
190   + Download:
191     https://ftp.gnu.org/gnu/sed/
193 * GNU libtool 1.5.22 or newer.
194   + Optional.
195     Needed if you want to invoke gnulib-tool with option --libtool.
196     libtool 2.2.x or newer is needed if you want to invoke gnulib-tool
197     with options --create-testdir/--test  and --libtool.
198   + Homepage:
199     https://www.gnu.org/software/libtool/
200   + Download:
201     https://ftp.gnu.org/gnu/libtool/
203 * GNU tar 1.28 or newer.
204   + Optional.
205     Needed if you use the 'gnumakefile' module, which sets TAR_OPTIONS
206     to --sort=names (added in version 1.28) in GNUmakefile for 'make dist'.
207   + Homepage:
208     https://www.gnu.org/software/tar/
209   + Download:
210     https://ftp.gnu.org/gnu/tar/
212 Note: Solaris 10 is no longer supported as maintainer environment.
213 <https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00076.html>
216 2) Dependencies for building the imported code (target environment)
217 *******************************************************************
219 The following packages are needed for building the package that imports
220 code from Gnulib.
222 * A C runtime, compiler, linker, etc.
223   + Mandatory. Using the platform's native 'cc' gives good portability
224     exposure, but you can also use GCC 3.1 or newer.
225   + GCC Homepage:
226     https://gcc.gnu.org/
227   + Download:
228     https://ftp.gnu.org/gnu/gcc/
230 * A 'make' utility.
231   + Mandatory. Using the platform's native 'make' gives good portability
232     exposure for in-tree builds, but VPATH builds on OpenBSD or Solaris
233     require GNU Make 3.79.1 or newer.
234   + GNU Make Homepage:
235     https://www.gnu.org/software/make/
236   + Download:
237     https://ftp.gnu.org/gnu/make/
239 * A shell
240   + Mandatory. Using the platform's native 'sh' gives good portability
241     exposure, but you can also use Bash.
242   + Homepage:
243     https://www.gnu.org/software/bash/
244   + Download:
245     https://ftp.gnu.org/gnu/bash/
247 * Core POSIX utilities, including:
248     [ basename cat chgrp chmod chown cp dd echo expand expr
249     false hostname install kill ln ls md5sum mkdir mkfifo
250     mknod mv printenv pwd rm rmdir sleep sort tee test touch
251     true uname
252   + Mandatory. Using the platform's native utilities gives good portability
253     exposure, but you can also use GNU coreutils.
254   + Homepage:
255     https://www.gnu.org/software/coreutils/
256   + Download:
257     https://ftp.gnu.org/gnu/coreutils/
259 * The comparison utilities 'cmp' and 'diff'.
260   + Mandatory. Using the platform's native utilities gives good portability
261     exposure, but you can also use GNU diffutils.
262   + Homepage:
263     https://www.gnu.org/software/diffutils/
264   + Download:
265     https://ftp.gnu.org/gnu/diffutils/
267 * Grep.
268   + Mandatory. Using the platform's native grep gives good portability
269     exposure, but you can also use GNU grep.
270   + Homepage:
271     https://www.gnu.org/software/grep/
272   + Download:
273     https://ftp.gnu.org/gnu/grep/
275 * Awk.
276   + Mandatory.
277     Using the platform's native awk, mawk, or nawk gives good portability
278     exposure, but you can also use GNU awk.
279   + Homepage:
280     https://www.gnu.org/software/gawk/
281   + Download:
282     https://ftp.gnu.org/gnu/gawk/
284 Prerequisites on Windows
285 ------------------------
287 * Cygwin
288   + Required.
289     Provides a POSIX-like environment and binary packages necessary to
290     build and run software. Native Windows binaries can be built with
291     a packaged mingw tool chain. This method is preferred over MSYS2.
292   + Homepage:
293     https://cygwin.com/
294   + Download:
295     https://cygwin.com/install.html
297 Libraries
298 ---------
300 Various modules work best with certain libraries installed. These are runtime
301 dependencies that are also build dependencies.
303 For modules 'abort-debug' and 'stack-trace':
304   * libbacktrace
305     + Recommended.
306       Needed for producing C stack traces with source file names and
307       line numbers.
308     + Homepage:
309       https://github.com/ianlancetaylor/libbacktrace
310     + Download:
311       https://github.com/ianlancetaylor/libbacktrace
312     + Pre-built package name:
313       - On Debian and Debian-based systems: libgcc-N-dev,
314       - On Red Hat distributions: --.
315       - Other: https://repology.org/project/libbacktrace/versions
317 For module 'acl':
318   * libacl
319     + Recommended on Linux systems.
320       Needed so that the creation of backup files respects the access control
321       lists (ACLs) set on the original files.
322     + Homepage:
323       https://savannah.nongnu.org/projects/acl/
324     + Download:
325       https://download.savannah.nongnu.org/releases/acl/
326     + Pre-built package name:
327       - On Debian and Debian-based systems: libacl1-dev,
328       - On Red Hat distributions: libacl-devel.
329       - Other: https://repology.org/project/acl/versions
330   * libattr
331     + Recommended on Linux systems.
332       Needed so that the creation of backup files respects the access control
333       lists (ACLs) set on the original files, with fewer system calls.
334     + Homepage:
335       https://savannah.nongnu.org/projects/attr/
336     + Download:
337       https://download.savannah.nongnu.org/releases/attr/
338     + Pre-built package name:
339       - On Debian and Debian-based systems: libattr1-dev,
340       - On Red Hat distributions: libattr-devel.
341       - Other: https://repology.org/project/attr/versions
343 For module 'gettext-h':
344   * libintl, part of GNU gettext
345     + Not needed on systems with glibc.
346       But highly recommended on all other systems.
347       Needed for localization (translation) of messages to the user's
348       native language.
349     + Homepage:
350       https://www.gnu.org/software/gettext/
351     + Download:
352       https://ftp.gnu.org/gnu/gettext/
353     + Pre-built package name:
354       - On Debian and Debian-based systems: --,
355       - On Red Hat distributions: --.
356       - Other: https://repology.org/project/gettext/versions
357     + If it is installed in a nonstandard directory, pass the option
358       --with-libintl-prefix=DIR to 'configure'.
360 For module 'iconv':
361   * GNU libiconv
362     + Not needed on systems with glibc and on NetBSD.
363       But highly recommended on all other systems.
364       Needed for character set conversion of strings from/to Unicode.
365     + Homepage:
366       https://www.gnu.org/software/libiconv/
367     + Download:
368       https://ftp.gnu.org/gnu/libiconv/
369     + Pre-built package name:
370       - On Debian and Debian-based systems: --,
371       - On Red Hat distributions: --.
372       - Other: https://repology.org/project/libiconv/versions
373     + If it is installed in a nonstandard directory, pass the option
374       --with-libiconv-prefix=DIR to 'configure'.
375     + On mingw, a slim alternative is the 'win-iconv' package version 0.0.8
376       from https://github.com/win-iconv/win-iconv .
378 For module 'libgmp':
379   * GNU gmp.
380     + Recommended.
381       Needed for fast multiprecision computations.
382     + Homepage:
383       https://www.gnu.org/software/gmp/
384     + Download:
385       https://ftp.gnu.org/gnu/gmp/
386     + Pre-built package name:
387       - On Debian and Debian-based systems: libgmp-dev,
388       - On Red Hat distributions: gmp-devel.
389       - Other: https://repology.org/project/gmp/versions
390     + If it is installed in a nonstandard directory, pass the option
391       --with-libgmp-prefix to 'configure'.
393 For module 'readline':
394   * GNU readline
395     + Recommended.
396       Needed for interactive editing of textual input.
397     + Homepage:
398       https://www.gnu.org/software/readline/
399     + Download:
400       https://ftp.gnu.org/gnu/readline/
401     + Pre-built package name:
402       - On Debian and Debian-based systems: libreadline-dev,
403       - On Red Hat distributions: readline-devel.
404       - Other: https://repology.org/project/readline/versions
405     + If it is installed in a nonstandard directory, pass the option
406       --with-libreadline-prefix=DIR to 'configure'.
408 For modules 'terminfo' and 'termcap':
409   * GNU ncurses (preferred)
410     or libtermcap (discouraged) or a curses library (legacy).
411     + Recommended.
412       Needed for fancy input/output in terminal emulators.
413     + Homepage:
414       https://www.gnu.org/software/ncurses/
415     + Download:
416       https://ftp.gnu.org/gnu/ncurses/
417     + Pre-built package name:
418       - On Debian and Debian-based systems: libncurses-dev,
419       - On Red Hat distributions: ncurses-devel.
420       - Other: https://repology.org/project/ncurses/versions
421     + If it is installed in a nonstandard directory, pass the option
422       --with-libncurses-prefix=DIR or --with-libtermcap-prefix to 'configure'.
424 For modules 'crypto/md5-buffer', 'crypto/sha*-buffer':
425   * OpenSSL.
426     + Optional.
427       Needed for optimized crypto hash sums.
428     + Homepage:
429       https://www.openssl.org/
430     + Download:
431       https://www.openssl.org/source/
432     + Pre-built package name:
433       - On Debian and Debian-based systems: libssl-dev,
434       - On Red Hat distributions: openssl-devel.
435       - Other: https://repology.org/project/openssl/versions
437 Locales
438 -------
440 If your package includes the tests for the Gnulib modules that you imported,
441 you will want to maximize the test coverage of these tests, that is, to
442 minimize the number of tests that are skipped. To this effect, you need to
443 install a couple of locales, used by the tests.
445 You can get a listing of the locales installed by default through
446   $ locale -a
447 (Note: On glibc systems, this command displays the encoding names in a
448 mutilated form, e.g. it transforms "en_US.UTF-8" to "en_US.utf8".)
450 To install the needed locales on glibc systems:
452 $ sudo localedef -i en_US -f UTF-8 en_US.UTF-8
453 $ sudo localedef -i ar_SA -f ISO-8859-6 ar_SA.ISO-8859-6
454 $ sudo localedef -i de_DE -f UTF-8 de_DE.UTF-8
455 $ sudo localedef -i es_ES -f UTF-8 es_ES.UTF-8
456 $ sudo localedef -i fa_IR -f UTF-8 fa_IR
457 $ sudo localedef -i fr_FR -f ISO-8859-1 fr_FR.ISO-8859-1
458 $ sudo localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
459 $ sudo localedef -i ja_JP -f EUC-JP ja_JP.EUC-JP
460 $ sudo localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
461 $ sudo localedef -i zh_CN -f GB18030 zh_CN.GB18030
462 $ sudo localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS
464 On Debian and Debian-based systems, if you want these locales to be
465 persistent across automatic system updates, the approach is different:
466 There, you need to enable the locales in the file /etc/locale.gen and
467 then run
468 $ sudo locale-gen