2020-10-13 17:43:11 +02:00
|
|
|
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
|
2010-07-23 00:58:15 +02:00
|
|
|
xml:id="manual.intro.setup.prereq" xreflabel="Prerequisites">
|
2008-08-28 02:44:45 +02:00
|
|
|
<?dbhtml filename="prerequisites.html"?>
|
2010-02-25 02:22:57 +01:00
|
|
|
|
2010-07-23 00:58:15 +02:00
|
|
|
<info><title>Prerequisites</title>
|
2008-02-11 01:01:33 +01:00
|
|
|
<keywordset>
|
2012-11-11 22:17:43 +01:00
|
|
|
<keyword>ISO C++</keyword>
|
|
|
|
<keyword>Prerequisites</keyword>
|
2008-02-11 01:01:33 +01:00
|
|
|
</keywordset>
|
2010-07-23 00:58:15 +02:00
|
|
|
</info>
|
|
|
|
|
2008-02-11 01:01:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Because libstdc++ is part of GCC, the primary source for
|
|
|
|
installation instructions is
|
2010-07-23 00:58:15 +02:00
|
|
|
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/install/">the GCC install page</link>.
|
2010-02-25 02:22:57 +01:00
|
|
|
In particular, list of prerequisite software needed to build the library
|
2010-07-23 00:58:15 +02:00
|
|
|
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/install/prerequisites.html">
|
|
|
|
starts with those requirements.</link> The same pages also list
|
2008-08-28 02:44:45 +02:00
|
|
|
the tools you will need if you wish to modify the source.
|
2008-02-11 01:01:33 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2008-08-28 02:44:45 +02:00
|
|
|
Additional data is given here only where it applies to libstdc++.
|
2008-02-11 01:01:33 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>As of GCC 4.0.1 the minimum version of binutils required to build
|
2012-11-02 22:59:43 +01:00
|
|
|
libstdc++ is <code>2.15.90.0.1.1</code>.
|
2008-02-11 01:01:33 +01:00
|
|
|
Older releases of libstdc++ do not require such a recent version,
|
|
|
|
but to take full advantage of useful space-saving features and
|
2008-08-28 02:44:45 +02:00
|
|
|
bug-fixes you should use a recent binutils whenever possible.
|
2008-02-11 01:01:33 +01:00
|
|
|
The configure process will automatically detect and use these
|
|
|
|
features if the underlying support is present.
|
|
|
|
</para>
|
|
|
|
|
2010-04-22 01:33:44 +02:00
|
|
|
<para>
|
|
|
|
To generate the API documentation from the sources you will need
|
2011-02-08 19:33:31 +01:00
|
|
|
Doxygen, see <link linkend="appendix.porting.doc">Documentation
|
|
|
|
Hacking</link> in the appendix for full details.
|
2010-04-22 01:33:44 +02:00
|
|
|
</para>
|
|
|
|
|
2008-02-11 01:01:33 +01:00
|
|
|
<para>
|
2010-02-25 02:22:57 +01:00
|
|
|
Finally, a few system-specific requirements:
|
2008-02-11 01:01:33 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term>linux</term>
|
2010-02-25 02:22:57 +01:00
|
|
|
|
2022-04-13 15:09:33 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The 'gnu' locale model makes use of <function>iconv</function>
|
|
|
|
for character set conversions. The relevant functions are provided
|
|
|
|
by Glibc and so are always available, however they can also be
|
|
|
|
provided by the separate GNU libiconv library. If GNU libiconv is
|
|
|
|
found when GCC is built (e.g., because its headers are installed
|
|
|
|
in <filename class="directory">/usr/local/include</filename>)
|
|
|
|
then the <filename>libstdc++.so.6</filename> library will have a
|
|
|
|
run-time dependency on <filename>libiconv.so.2</filename>.
|
|
|
|
If you do not want that run-time dependency then you should do
|
|
|
|
one of the following:
|
|
|
|
</para>
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Uninstall the libiconv headers before building GCC.
|
|
|
|
Glibc already provides <function>iconv</function> so you should
|
|
|
|
not need libiconv anyway.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<link linkend="https://www.gnu.org/software/libiconv/#downloading">
|
|
|
|
Download</link> the libiconv sources and extract them into the
|
|
|
|
top level of the GCC source tree, e.g.,
|
|
|
|
</para>
|
|
|
|
<programlisting>
|
|
|
|
wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
|
|
|
|
tar xf libiconv-1.16.tar.gz
|
|
|
|
ln -s libiconv-1.16 libiconv
|
|
|
|
</programlisting>
|
|
|
|
<para>
|
|
|
|
This will build libiconv as part of building GCC and link to
|
|
|
|
it statically, so there is no <filename>libiconv.so.2</filename>
|
|
|
|
dependency.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Configure GCC with <option>--with-libiconv-type=static</option>.
|
|
|
|
This requires the static <filename>libiconv.a</filename> library,
|
|
|
|
which is not installed by default. You might need to reinstall
|
|
|
|
libiconv using the <option>--enable-static</option> configure
|
|
|
|
option to get the static library.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</listitem>
|
|
|
|
|
2008-02-11 01:01:33 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2011-10-30 16:33:11 +01:00
|
|
|
If GCC 3.1.0 or later on is being used on GNU/Linux, an attempt
|
2008-02-11 01:01:33 +01:00
|
|
|
will be made to use "C" library functionality necessary for
|
2011-10-30 16:33:11 +01:00
|
|
|
C++ named locale support. For GCC 4.6.0 and later, this
|
2010-05-21 16:07:00 +02:00
|
|
|
means that glibc 2.3 or later is required.
|
2008-02-11 01:01:33 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If the 'gnu' locale model is being used, the following
|
|
|
|
locales are used and tested in the libstdc++ testsuites.
|
|
|
|
The first column is the name of the locale, the second is
|
|
|
|
the character set it is expected to use.
|
|
|
|
</para>
|
|
|
|
<programlisting>
|
|
|
|
de_DE ISO-8859-1
|
|
|
|
de_DE@euro ISO-8859-15
|
2010-01-07 01:22:51 +01:00
|
|
|
en_GB ISO-8859-1
|
2008-02-11 01:01:33 +01:00
|
|
|
en_HK ISO-8859-1
|
|
|
|
en_PH ISO-8859-1
|
|
|
|
en_US ISO-8859-1
|
|
|
|
en_US.ISO-8859-1 ISO-8859-1
|
|
|
|
en_US.ISO-8859-15 ISO-8859-15
|
|
|
|
en_US.UTF-8 UTF-8
|
|
|
|
es_ES ISO-8859-1
|
|
|
|
es_MX ISO-8859-1
|
|
|
|
fr_FR ISO-8859-1
|
|
|
|
fr_FR@euro ISO-8859-15
|
|
|
|
is_IS UTF-8
|
|
|
|
it_IT ISO-8859-1
|
|
|
|
ja_JP.eucjp EUC-JP
|
2010-01-05 21:05:20 +01:00
|
|
|
ru_RU.ISO-8859-5 ISO-8859-5
|
|
|
|
ru_RU.UTF-8 UTF-8
|
2008-02-11 01:01:33 +01:00
|
|
|
se_NO.UTF-8 UTF-8
|
|
|
|
ta_IN UTF-8
|
|
|
|
zh_TW BIG5
|
|
|
|
</programlisting>
|
2008-08-28 02:44:45 +02:00
|
|
|
|
[multiple changes]
2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
* doc/xml/manual/prerequisites.xml: Update "C" library locale
information prerequisites.
2010-09-15 François Dumont <francois.cppdevs@free.fr>
* testsuite/lib/libstdc++.exp, dg-options.exp
([check_v3_target_namedlocale]): Take the name of the required locale.
* testsuite/27_io/objects/wchar_t/9520.cc, 11.cc, 13.cc, 10.cc, 12.cc:
Specify locale name to check.
* testsuite/27_io/basic_streambuf/imbue/wchar_t/9322.cc, 13007-1.cc,
13007-2.cc: Likewise.
* testsuite/27_io/basic_streambuf/imbue/char/9322.cc, 13007-1.cc,
13007-2.cc: Likewise.
* testsuite/27_io/basic_ios/copyfmt/char/2.cc: Likewise.
* testsuite/27_io/basic_stringbuf/imbue/wchar_t/9322.cc: Likewise.
* testsuite/27_io/basic_stringbuf/imbue/char/9322.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/2.cc:
Likewise.
* testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
Likewise.
* testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc, 2.cc:
Likewise.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc, 9322.cc,
13582-2.cc, 2.cc, 13582-3.cc, 12868.cc, 14975-2.cc, 13007.cc: Likewise.
* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc, 13171-4.cc,
9322.cc, 13582-2.cc, 2.cc, 14975-1.cc, 13007.cc, 13171-1.cc: Likewise.
* testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc,
11305-2.cc, 11305-3.cc, 11305-4.cc: Likewise.
* testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc, 1.cc, 2.cc,
3.cc, 11389-1.cc, 4.cc, 11389-2.cc, 5.cc, 11389-3.cc, 11389-4.cc:
Likewise.
* testsuite/27_io/basic_filebuf/seekpos/wchar_t/9874.cc: Likewise.
* testsuite/27_io/manipulators/extended/put_money/wchar_t/1.cc:
Likewise.
* testsuite/27_io/manipulators/extended/put_money/char/1.cc: Likewise.
* testsuite/27_io/manipulators/extended/get_money/wchar_t/1.cc:
Likewise.
* testsuite/27_io/manipulators/extended/get_money/char/1.cc: Likewise.
* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Likewise.
* testsuite/22_locale/money_put/put/wchar_t/1.cc, 2.cc, 3.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/money_put/put/char/1.cc, 2.cc, 3.cc, 9780-3.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/facet/2.cc: Likewise.
* testsuite/22_locale/collate/hash/wchar_t/2.cc, wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/collate/hash/char/2.cc, wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/collate/compare/wchar_t/1.cc, 2.cc, 3.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/collate/compare/char/1.cc, 2.cc, 3.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/collate/transform/wchar_t/2.cc, 3.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/collate/transform/char/2.cc, 3.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/ctype/cons/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/ctype/to/wchar_t/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/ctype/to/char/wrapped_locale.cc, wrapped_env.cc:
Likewise.
* testsuite/22_locale/ctype/scan/wchar_t/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/ctype/scan/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/ctype/widen/wchar_t/2.cc, 3.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/ctype/widen/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/ctype/narrow/wchar_t/3.cc, wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/ctype/narrow/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/ctype/is/wchar_t/2.cc,wrapped_locale.cc,
wrapped_env.cc: Likewise
* testsuite/22_locale/ctype/is/char/2.cc, wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/time_put/put/wchar_t/2.cc, 3.cc, 4.cc, 6.cc,
7.cc, 8.cc, wrapped_env.cc, wrapped_locale.cc, 17038.cc: Likewise.
* testsuite/22_locale/time_put/put/char/2.cc, 3.cc, 4.cc, 6.cc,
9780-1.cc, 7.cc, 8.cc, wrapped_env.cc, wrapped_locale.cc, 17038.cc:
Likewise.
* testsuite/22_locale/money_get/get/wchar_t/1.cc, 2.cc, 3.cc, 4.cc,
wrapped_env.cc, 10.cc, 11528.cc, wrapped_locale.cc, 11.cc, 12.cc,
13.cc, 15.cc, 16.cc, 17.cc, 18.cc: Likewise.
* testsuite/22_locale/money_get/get/char/1.cc, 2.cc, 3.cc, 4.cc,
wrapped_env.cc, 10.cc, 11528.cc, wrapped_locale.cc, 11.cc, 12.cc,
13.cc, 15.cc, 16.cc, 17.cc, 18.cc: Likewise
* testsuite/22_locale/num_put/put/wchar_t/1.cc, 3.cc, 5.cc,
wrapped_env.cc, 20914.cc, wrapped_locale.cc, 20909.cc: Likewise.
* testsuite/22_locale/num_put/put/char/1.cc, 3.cc, 5.cc, 9780-2.cc,
wrapped_env.cc, 20914.cc, wrapped_locale.cc, 20909.cc: Likewise.
* testsuite/22_locale/codecvt/unshift/wchar_t/2.cc, wrapped_locale.cc,
3.cc, 4.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/unshift/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
testsuite/22_locale/codecvt/length/wchar_t/2.cc, wrapped_locale.cc,
3.cc, 4.cc, 7.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/length/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc,
wrapped_locale.cc, 3.cc, 4.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/always_noconv/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/encoding/wchar_t/2.cc, wrapped_locale.cc,
3.cc, 4.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/encoding/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/in/wchar_t/2.cc, wrapped_locale.cc, 3.cc,
4.cc, 7.cc, 8.cc, 9.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/in/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/max_length/wchar_t/2.cc,
wrapped_locale.cc, 3.cc, 4.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/max_length/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/out/wchar_t/2.cc, wrapped_locale.cc,
3.cc, 4.cc, 7.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/codecvt/out/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/moneypunct_byname/named_equivalence.cc: Likewise.
* testsuite/22_locale/time_get/get_year/wchar_t/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/get_year/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/get_monthname/char/2.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/date_order/wchar_t/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/date_order/char/wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/get_weekday/char/2.cc, 38081-1.cc,
wrapped_locale.cc, 38081-2.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/get_date/wchar_t/12750.cc, 26701.cc,
2.cc, wrapped_locale.cc, 4.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/get_date/char/12750.cc, 26701.cc,
2.cc, wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/get_time/wchar_t/1.cc, 2.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/time_get/get_time/char/1.cc, 2.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/num_get/get/wchar_t/1.cc, 3.cc, 5.cc, 6.cc, 9.cc,
wrapped_env.cc, wrapped_locale.cc: Likewise.
* testsuite/22_locale/num_get/get/char/1.cc, 3.cc, 5.cc, 6.cc, 9.cc,
wrapped_env.cc, wrapped_locale.cc: Likewise.
* testsuite/22_locale/locale/cons/38368.cc, 2.cc, 4.cc, 5.cc, 7.cc,
12658_thread-1.cc, 12658_thread-2.cc, 40184.cc, 29217.cc, 38365.cc:
Likewise.
* testsuite/22_locale/locale/global_locale_objects/14071.cc, 2.cc:
Likewise.
* testsuite/22_locale/moneypunct/40712.cc: Likewise.
* testsuite/22_locale/moneypunct/members/wchar_t/2.cc,
wrapped_locale.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/moneypunct/members/char/2.cc, wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/messages_byname/named_equivalence.cc: Likewise.
* testsuite/22_locale/numpunct_byname/named_equivalence.cc: Likewise.
* testsuite/22_locale/messages/members/char/1.cc, 2.cc,
wrapped_locale.cc, 3.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/numpunct/members/wchar_t/2.cc, wrapped_locale.cc,
wrapped_env.cc: Likewise.
* testsuite/22_locale/numpunct/members/char/2.cc, wrapped_locale.cc,
3.cc, wrapped_env.cc: Likewise.
* testsuite/22_locale/collate_byname/named_equivalence.cc: Likewise.
From-SVN: r164300
2010-09-15 12:46:39 +02:00
|
|
|
<para>Failure to have installed the underlying "C" library
|
|
|
|
locale information for any of the above regions means that
|
|
|
|
the corresponding C++ named locale will not work: because of
|
|
|
|
this, the libstdc++ testsuite will skip named locale tests
|
|
|
|
which need missing information. If this isn't an issue, don't
|
|
|
|
worry about it. If a named locale is needed, the underlying
|
|
|
|
locale information must be installed. Note that rebuilding
|
|
|
|
libstdc++ after "C" locales are installed is not necessary.
|
2008-02-11 01:01:33 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
To install support for locales, do only one of the following:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<itemizedlist>
|
2010-02-25 02:22:57 +01:00
|
|
|
<listitem>
|
2008-02-11 01:01:33 +01:00
|
|
|
<para>install all locales</para>
|
2010-02-25 02:22:57 +01:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2008-02-11 01:01:33 +01:00
|
|
|
<para>install just the necessary locales</para>
|
2010-02-25 02:22:57 +01:00
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
2011-10-30 16:33:11 +01:00
|
|
|
<para>with Debian GNU/Linux:</para>
|
2008-02-11 01:01:33 +01:00
|
|
|
<para> Add the above list, as shown, to the file
|
|
|
|
<code>/etc/locale.gen</code> </para>
|
|
|
|
<para> run <code>/usr/sbin/locale-gen</code> </para>
|
|
|
|
</listitem>
|
2010-02-25 02:22:57 +01:00
|
|
|
<listitem>
|
2008-02-11 01:01:33 +01:00
|
|
|
<para>on most Unix-like operating systems:</para>
|
|
|
|
<para><code> localedef -i de_DE -f ISO-8859-1 de_DE </code></para>
|
|
|
|
<para>(repeat for each entry in the above list) </para>
|
2010-02-25 02:22:57 +01:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2008-02-11 01:01:33 +01:00
|
|
|
<para>
|
|
|
|
Instructions for other operating systems solicited.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2010-02-25 02:22:57 +01:00
|
|
|
</itemizedlist>
|
|
|
|
</listitem>
|
2008-02-11 01:01:33 +01:00
|
|
|
</itemizedlist>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
2010-07-23 00:58:15 +02:00
|
|
|
</section>
|