[3bbd5fe9] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[3bbd5fe9] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[63e2629] | 7 | <!ENTITY gc-download-http "http://www.hboehm.info/gc/gc_source/gc-&gc-version;.tar.gz">
|
---|
[8057fc4] | 8 | <!ENTITY gc-download-ftp " ">
|
---|
[0840866] | 9 | <!ENTITY gc-md5sum "12c05fd2811d989341d8c6d81f66af87">
|
---|
[663957f] | 10 | <!ENTITY gc-size "1.1 MB">
|
---|
[0840866] | 11 | <!ENTITY gc-buildsize "9.7 MB (additional 2.3 MB for the tests)">
|
---|
| 12 | <!ENTITY gc-time "0.2 SBU (additional 0.2 SBU for the tests)">
|
---|
[3bbd5fe9] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="gc" xreflabel="GC-&gc-version;">
|
---|
| 16 | <?dbhtml filename="gc.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>GC-&gc-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="gc">
|
---|
| 26 | <primary sortas="a-GC">GC</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to GC</title>
|
---|
| 31 |
|
---|
[b3bb56b] | 32 | <para>
|
---|
| 33 | The <application>GC</application> package contains the Boehm-Demers-Weiser
|
---|
| 34 | conservative garbage collector, which can be used as a garbage collecting
|
---|
| 35 | replacement for the C malloc function or C++ new operator. It allows you
|
---|
| 36 | to allocate memory basically as you normally would, without explicitly
|
---|
| 37 | deallocating memory that is no longer useful. The collector automatically
|
---|
| 38 | recycles memory when it determines that it can no longer be otherwise
|
---|
| 39 | accessed. The collector is also used by a number of programming language
|
---|
| 40 | implementations that either use C as intermediate code, want to facilitate
|
---|
| 41 | easier interoperation with C libraries, or just prefer the simple
|
---|
| 42 | collector interface. Alternatively, the garbage collector may be used as a
|
---|
| 43 | leak detector for C or C++ programs, though that is not its primary goal.
|
---|
| 44 | </para>
|
---|
| 45 |
|
---|
[19c62f9] | 46 | &lfs77_checked; &gcc5_checked;
|
---|
[d4796f8b] | 47 |
|
---|
[3bbd5fe9] | 48 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 49 | <itemizedlist spacing="compact">
|
---|
| 50 | <listitem>
|
---|
[4355dbcf] | 51 | <para>
|
---|
| 52 | Download (HTTP): <ulink url="&gc-download-http;"/>
|
---|
| 53 | </para>
|
---|
[3bbd5fe9] | 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
[4355dbcf] | 56 | <para>
|
---|
| 57 | Download (FTP): <ulink url="&gc-download-ftp;"/>
|
---|
| 58 | </para>
|
---|
[3bbd5fe9] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[4355dbcf] | 61 | <para>
|
---|
| 62 | Download MD5 sum: &gc-md5sum;
|
---|
| 63 | </para>
|
---|
[3bbd5fe9] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[4355dbcf] | 66 | <para>
|
---|
| 67 | Download size: &gc-size;
|
---|
| 68 | </para>
|
---|
[3bbd5fe9] | 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
[4355dbcf] | 71 | <para>
|
---|
| 72 | Estimated disk space required: &gc-buildsize;
|
---|
| 73 | </para>
|
---|
[3bbd5fe9] | 74 | </listitem>
|
---|
| 75 | <listitem>
|
---|
[4355dbcf] | 76 | <para>
|
---|
| 77 | Estimated build time: &gc-time;
|
---|
| 78 | </para>
|
---|
[3bbd5fe9] | 79 | </listitem>
|
---|
| 80 | </itemizedlist>
|
---|
| 81 |
|
---|
[663957f] | 82 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 83 | <para role="required">
|
---|
| 84 | <xref linkend="libatomic_ops"/>
|
---|
| 85 | </para>
|
---|
| 86 | <!-- (Gc contains a copy of
|
---|
[b3bb56b] | 87 | Libatomic_ops-&gc-version; which it will compile and statically link if
|
---|
[4355dbcf] | 88 | configure doesn't find Libatomic_ops installed on your system)
|
---|
[b3bb56b] | 89 | </para>
|
---|
[663957f] | 90 | -->
|
---|
[1039de3] | 91 |
|
---|
[b3bb56b] | 92 | <para condition="html" role="usernotes">
|
---|
| 93 | User Notes: <ulink url="&blfs-wiki;/gc"/>
|
---|
| 94 | </para>
|
---|
[3bbd5fe9] | 95 | </sect2>
|
---|
| 96 |
|
---|
| 97 | <sect2 role="installation">
|
---|
| 98 | <title>Installation of GC</title>
|
---|
| 99 |
|
---|
[b3bb56b] | 100 | <para>
|
---|
| 101 | Install <application>GC</application> by running the following commands:
|
---|
| 102 | </para>
|
---|
[3bbd5fe9] | 103 |
|
---|
[663957f] | 104 | <!--
|
---|
[4355dbcf] | 105 | <screen><userinput>sed -i 's#AM_CONFIG_HEADER#AC_CONFIG_HEADERS#' configure.ac &&
|
---|
| 106 | sed -i 's#AM_CONFIG_HEADER#AC_CONFIG_HEADERS#' libatomic_ops/configure.ac &&
|
---|
[663957f] | 107 | -->
|
---|
| 108 | <screen><userinput>sed -i 's#pkgdata#doc#' doc/doc.am &&
|
---|
[4355dbcf] | 109 | autoreconf -fi &&
|
---|
[1eb827c6] | 110 | ./configure --prefix=/usr \
|
---|
| 111 | --enable-cplusplus \
|
---|
| 112 | --disable-static \
|
---|
| 113 | --docdir=/usr/share/doc/gc-&gc-version; &&
|
---|
[3bbd5fe9] | 114 | make</userinput></screen>
|
---|
| 115 |
|
---|
[4355dbcf] | 116 | <para>
|
---|
| 117 | To test the results, issue: <command>make check</command>.
|
---|
| 118 | </para>
|
---|
[3bbd5fe9] | 119 |
|
---|
[b3bb56b] | 120 | <para>
|
---|
| 121 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 122 | </para>
|
---|
[3bbd5fe9] | 123 |
|
---|
| 124 | <screen role="root"><userinput>make install &&
|
---|
| 125 | install -v -m644 doc/gc.man /usr/share/man/man3/gc_malloc.3 &&
|
---|
[b3bb56b] | 126 | ln -sfv gc_malloc.3 /usr/share/man/man3/gc.3 </userinput></screen>
|
---|
[3bbd5fe9] | 127 | </sect2>
|
---|
| 128 |
|
---|
| 129 | <sect2 role="commands">
|
---|
| 130 | <title>Command Explanations</title>
|
---|
| 131 |
|
---|
[663957f] | 132 | <!-- <para>
|
---|
[4355dbcf] | 133 | <command>sed -i 's#AM_CONFIG_HEADER ...</command>: This
|
---|
| 134 | <command>sed</command> fixes building with
|
---|
| 135 | <application>Automake</application> 1.13.
|
---|
| 136 | </para>
|
---|
[663957f] | 137 | -->
|
---|
[4355dbcf] | 138 |
|
---|
| 139 | <para>
|
---|
| 140 | <command>sed -i 's#pkgdata#doc#' doc/doc.am</command> and
|
---|
| 141 | <option>--docdir=/usr/share/doc/gc-&gc-version;</option>:
|
---|
| 142 | These commands are used so the package will install the
|
---|
| 143 | documentation in a versioned directory.
|
---|
| 144 | </para>
|
---|
| 145 |
|
---|
| 146 | <para>
|
---|
| 147 | <command>autoreconf -fi</command>: This regenerates the
|
---|
| 148 | <command>configure</command> script and the
|
---|
| 149 | <filename>Makefile.in</filename> files.
|
---|
[b3bb56b] | 150 | </para>
|
---|
[3bbd5fe9] | 151 |
|
---|
[b3bb56b] | 152 | <para>
|
---|
| 153 | <parameter>--enable-cplusplus</parameter>: This parameter enables the
|
---|
| 154 | building and installing the C++ library along with the standard C library.
|
---|
| 155 | </para>
|
---|
[4e143323] | 156 |
|
---|
| 157 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 158 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 159 |
|
---|
[3bbd5fe9] | 160 | </sect2>
|
---|
| 161 |
|
---|
| 162 | <sect2 role="content">
|
---|
| 163 | <title>Contents</title>
|
---|
| 164 |
|
---|
| 165 | <segmentedlist>
|
---|
[c3c56b2] | 166 | <segtitle>Installed Programs</segtitle>
|
---|
[3bbd5fe9] | 167 | <segtitle>Installed Libraries</segtitle>
|
---|
| 168 | <segtitle>Installed Directories</segtitle>
|
---|
| 169 |
|
---|
| 170 | <seglistitem>
|
---|
[c3c56b2] | 171 | <seg>
|
---|
| 172 | None
|
---|
| 173 | </seg>
|
---|
[b3bb56b] | 174 | <seg>
|
---|
[4e143323] | 175 | libcord.so, libgc.so and
|
---|
[b3bb56b] | 176 | libgccpp.so
|
---|
| 177 | </seg>
|
---|
| 178 | <seg>
|
---|
| 179 | /usr/include/gc and
|
---|
[bfefc696] | 180 | /usr/share/doc/gc-&gc-version;
|
---|
[b3bb56b] | 181 | </seg>
|
---|
[3bbd5fe9] | 182 | </seglistitem>
|
---|
| 183 | </segmentedlist>
|
---|
| 184 |
|
---|
| 185 | <variablelist>
|
---|
| 186 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 187 | <?dbfo list-presentation="list"?>
|
---|
| 188 | <?dbhtml list-presentation="table"?>
|
---|
| 189 |
|
---|
| 190 | <varlistentry id="libgc">
|
---|
[4355dbcf] | 191 | <term><filename class="libraryfile">libgc.so</filename></term>
|
---|
[3bbd5fe9] | 192 | <listitem>
|
---|
[b3bb56b] | 193 | <para>
|
---|
| 194 | contains a C interface to the conservative garbage collector,
|
---|
| 195 | primarily designed to replace the C malloc function.
|
---|
| 196 | </para>
|
---|
[3bbd5fe9] | 197 | <indexterm zone="gc libgc">
|
---|
[b3bb56b] | 198 | <primary sortas="c-libgc">libgc.so</primary>
|
---|
[3bbd5fe9] | 199 | </indexterm>
|
---|
| 200 | </listitem>
|
---|
| 201 | </varlistentry>
|
---|
| 202 |
|
---|
| 203 | <varlistentry id="libgccpp">
|
---|
[4355dbcf] | 204 | <term><filename class="libraryfile">libgccpp.so</filename></term>
|
---|
[3bbd5fe9] | 205 | <listitem>
|
---|
[b3bb56b] | 206 | <para>
|
---|
| 207 | contains a C++ interface to the conservative garbage collector.
|
---|
| 208 | </para>
|
---|
[3bbd5fe9] | 209 | <indexterm zone="gc libgccpp">
|
---|
[b3bb56b] | 210 | <primary sortas="c-libgccpp">libgccpp.so</primary>
|
---|
[3bbd5fe9] | 211 | </indexterm>
|
---|
| 212 | </listitem>
|
---|
| 213 | </varlistentry>
|
---|
[4e143323] | 214 |
|
---|
[3bbd5fe9] | 215 | </variablelist>
|
---|
[4e143323] | 216 |
|
---|
[3bbd5fe9] | 217 | </sect2>
|
---|
[4e143323] | 218 |
|
---|
[3bbd5fe9] | 219 | </sect1>
|
---|