1 <sect1 id="manual.intro.setup.build" xreflabel="Building">
2 <?dbhtml filename="build.html"?>
18 Because libstdc++ is part of GCC, the primary source for
19 installation instructions is
20 <ulink url="http://gcc.gnu.org/install/">the GCC install page</ulink>.
21 Additional data is given here only where it applies to libstdc++.
24 <sect2 id="build.prereq" xreflabel="build.prereq">
25 <title>Prerequisites</title>
27 The list of software needed to build the library is kept with the
28 rest of the compiler, at
29 <ulink url="http://gcc.gnu.org/install/prerequisites.html">
30 http://gcc.gnu.org/install/prerequisites.html</ulink>. The same page
31 also lists the tools you will need if you wish to modify the source.
34 <para>As of GCC 4.0.1 the minimum version of binutils required to build
35 libstdc++ is <code>2.15.90.0.1.1</code>. You can get snapshots
36 (as well as releases) of binutils from
37 <ulink url="ftp://sources.redhat.com/pub/binutils">
38 ftp://sources.redhat.com/pub/binutils</ulink>.
39 Older releases of libstdc++ do not require such a recent version,
40 but to take full advantage of useful space-saving features and
41 bug-fixes you should use a recent binutils if possible.
42 The configure process will automatically detect and use these
43 features if the underlying support is present.
47 Finally, a few system-specific requirements:
56 If gcc 3.1.0 or later on is being used on linux, an attempt
57 will be made to use "C" library functionality necessary for
58 C++ named locale support. For gcc 3.2.1 and later, this
59 means that glibc 2.2.5 or later is required and the "C"
60 library de_DE locale information must be installed.
64 Note however that the sanity checks involving the de_DE
65 locale are skipped when an explicit --enable-clocale=gnu
66 configure option is used: only the basic checks are carried
67 out, defending against misconfigurations.
71 If the 'gnu' locale model is being used, the following
72 locales are used and tested in the libstdc++ testsuites.
73 The first column is the name of the locale, the second is
74 the character set it is expected to use.
78 de_DE@euro ISO-8859-15
82 en_US.ISO-8859-1 ISO-8859-1
83 en_US.ISO-8859-15 ISO-8859-15
88 fr_FR@euro ISO-8859-15
96 <para>Failure to have the underlying "C" library locale
97 information installed will mean that C++ named locales for the
98 above regions will not work: because of this, the libstdc++
99 testsuite will skip the named locale tests. If this isn't an
100 issue, don't worry about it. If named locales are needed, the
101 underlying locale information must be installed. Note that
102 rebuilding libstdc++ after the "C" locales are installed is not
107 To install support for locales, do only one of the following:
112 <para>install all locales</para>
115 <para>with RedHat Linux:
117 <para> <code> export LC_ALL=C </code>
119 <para> <code> rpm -e glibc-common --nodeps </code>
122 <code> rpm -i --define "_install_langs all"
123 glibc-common-2.2.5-34.i386.rpm
129 Instructions for other operating systems solicited.
135 <para>install just the necessary locales</para>
138 <para>with Debian Linux:</para>
139 <para> Add the above list, as shown, to the file
140 <code>/etc/locale.gen</code> </para>
141 <para> run <code>/usr/sbin/locale-gen</code> </para>
144 <para>on most Unix-like operating systems:</para>
145 <para><code> localedef -i de_DE -f ISO-8859-1 de_DE </code></para>
146 <para>(repeat for each entry in the above list) </para>
150 Instructions for other operating systems solicited.
162 <sect2 id="build.configure" xreflabel="build.make">
164 <para>If you have never done this before, you should read the basic
165 <ulink url="http://gcc.gnu.org/install/">GCC Installation
166 Instructions</ulink> first. Read <emphasis>all of them</emphasis>.
167 <emphasis>Twice.</emphasis>
169 <para>When building libstdc++ you'll have to configure
170 the entire <emphasis>gccsrcdir</emphasis> directory. The full list of libstdc++
171 specific configuration options, not dependent on the specific compiler
172 release being used, can be found <ulink url="configopts.html">here</ulink>.
174 <para>Consider possibly using --enable-languages=c++ to save time by only
175 building the C++ language parts.
179 cd <emphasis>gccbuilddir</emphasis>
180 <emphasis>gccsrcdir</emphasis>/configure --prefix=<emphasis>destdir</emphasis> --other-opts...</programlisting>