summaryrefslogtreecommitdiff
path: root/libstdc++-v3/doc/xml/manual/prerequisites.xml
blob: 8799487c821945b1ee7766b4b7a8af3c6345ef3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
	 xml:id="manual.intro.setup.prereq" xreflabel="Prerequisites">
<?dbhtml filename="prerequisites.html"?>

<info><title>Prerequisites</title>
  <keywordset>
    <keyword>ISO C++</keyword>
    <keyword>Prerequisites</keyword>
  </keywordset>
</info>



<para>
  Because libstdc++ is part of GCC, the primary source for
   installation instructions is
   <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/install/">the GCC install page</link>.
   In particular, list of prerequisite software needed to build the library
   <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
   the tools you will need if you wish to modify the source.
</para>

  <para>
   Additional data is given here only where it applies to libstdc++.
  </para>

   <para>As of GCC 4.0.1 the minimum version of binutils required to build
      libstdc++ is <code>2.15.90.0.1.1</code>.
      Older releases of libstdc++ do not require such a recent version,
      but to take full advantage of useful space-saving features and
      bug-fixes you should use a recent binutils whenever possible.
      The configure process will automatically detect and use these
      features if the underlying support is present.
   </para>

   <para>
     To generate the API documentation from the sources you will need
     Doxygen, see <link linkend="appendix.porting.doc">Documentation
     Hacking</link> in the appendix for full details.
   </para>

   <para>
   Finally, a few system-specific requirements:
   </para>

   <variablelist>
      <varlistentry>
	<term>linux</term>

	<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>

	<listitem>
	<para>
	  If GCC 3.1.0 or later on is being used on GNU/Linux, an attempt
	  will be made to use "C" library functionality necessary for
	  C++ named locale support.  For GCC 4.6.0 and later, this
	  means that glibc 2.3 or later is required.
	</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
en_GB               ISO-8859-1
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
ru_RU.ISO-8859-5    ISO-8859-5
ru_RU.UTF-8         UTF-8
se_NO.UTF-8         UTF-8
ta_IN               UTF-8
zh_TW               BIG5
</programlisting>

      <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.
      </para>

      <para>
	To install support for locales, do only one of the following:
      </para>

      <itemizedlist>
	<listitem>
	  <para>install all locales</para>
	</listitem>
	<listitem>
	  <para>install just the necessary locales</para>
	  <itemizedlist>
	    <listitem>
	      <para>with Debian GNU/Linux:</para>
	      <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>
	    <listitem>
	      <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>
	    </listitem>
	    <listitem>
	    <para>
	       Instructions for other operating systems solicited.
	    </para>
	    </listitem>
	  </itemizedlist>
	</listitem>
      </itemizedlist>
      </listitem>
      </varlistentry>
   </variablelist>

</section>