source: general/prog/swig.xml@ 9d725222

elogind
Last change on this file since 9d725222 was 9d725222, checked in by DJ Lucas <dj@…>, 5 years ago

Merge to HEAD 21181.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/BOOK-elogind@21182 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 7.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY swig-download-http "&sourceforge-dl;/swig/swig-&swig-version;.tar.gz">
8 <!ENTITY swig-download-ftp " ">
9 <!ENTITY swig-md5sum "82133dfa7bba75ff9ad98a7046be687c">
10 <!ENTITY swig-size "7.8 MB">
11 <!ENTITY swig-buildsize "91 MB (1.7 GB with tests)">
12 <!ENTITY swig-time "0.3 SBU (26 SBU for tests)">
13]>
14
15<sect1 id="swig" xreflabel="SWIG-&swig-version;">
16 <?dbhtml filename="swig.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>SWIG-&swig-version;</title>
24
25 <indexterm zone="swig">
26 <primary sortas="a-swig">SWIG</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to SWIG</title>
31
32 <para>
33 <application>SWIG</application> (Simplified Wrapper and Interface
34 Generator) is a compiler that integrates <application>C</application>
35 and <application>C++</application> with languages including
36 <application>Perl</application>, <application>Python</application>,
37 <application>Tcl</application>, <application>Ruby</application>,
38 <application>PHP</application>, <application>Java</application>,
39 <application>C#</application>, <application>D</application>,
40 <application>Go</application>, <application>Lua</application>,
41 <application>Octave</application>, <application>R</application>,
42 <application>Scheme</application>, <application>Ocaml</application>,
43 <application>Modula-3</application>,
44 <application>Common Lisp</application>, and
45 <application>Pike</application>. <application>SWIG</application> can
46 also export its parse tree into <application>Lisp</application>
47 s-expressions and <application>XML</application>.
48 </para>
49 <para>
50 <application>SWIG</application> reads annotated
51 <application>C/C++</application> header files and creates wrapper
52 code (glue code) in order to make the corresponding
53 <application>C/C++</application> libraries available to the listed
54 languages, or to extend <application>C/C++</application> programs
55 with a scripting language.
56 </para>
57
58 &lfs84_checked;
59
60 <bridgehead renderas="sect3">Package Information</bridgehead>
61 <itemizedlist spacing="compact">
62 <listitem>
63 <para>
64 Download (HTTP): <ulink url="&swig-download-http;"/>
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Download (FTP): <ulink url="&swig-download-ftp;"/>
70 </para>
71 </listitem>
72 <listitem>
73 <para>
74 Download MD5 sum: &swig-md5sum;
75 </para>
76 </listitem>
77 <listitem>
78 <para>
79 Download size: &swig-size;
80 </para>
81 </listitem>
82 <listitem>
83 <para>
84 Estimated disk space required: &swig-buildsize;
85 </para>
86 </listitem>
87 <listitem>
88 <para>
89 Estimated build time: &swig-time;
90 </para>
91 </listitem>
92 </itemizedlist>
93
94 <bridgehead renderas="sect3">SWIG Dependencies</bridgehead>
95
96 <bridgehead renderas="sect4">Required</bridgehead>
97 <para role="required">
98 <xref linkend="pcre"/>
99 </para>
100
101 <bridgehead renderas="sect4">Optional</bridgehead>
102 <para role="optional">
103 <xref linkend="boost"/> for tests, and any of the languages mentioned
104 in the introduction, as run-time dependencies
105 </para>
106
107 <para condition="html" role="usernotes">
108 User Notes: <ulink url="&blfs-wiki;/swig"/>
109 </para>
110 </sect2>
111
112 <sect2 role="installation">
113 <title>Installation of SWIG</title>
114
115 <para>
116 If you plan to run the tests, some fixes are needed for using Perl-5.26:
117 </para>
118
119<screen><userinput>sed -i 's/\$(PERL5_SCRIPT/-I. &amp;/' Examples/Makefile.in &amp;&amp;
120sed -i 's/\$command 2/-I. &amp;/' Examples/test-suite/perl5/run-perl-test.pl</userinput></screen>
121
122 <para>
123 Install <application>SWIG</application> by running the following
124 commands:
125 </para>
126
127<screen><userinput>./configure --prefix=/usr \
128 --without-clisp \
129 --without-maximum-compile-warnings &amp;&amp;
130make</userinput></screen>
131
132 <para>
133 To test the results, issue:
134 <command>make -k check TCL_INCLUDE= GOGCC=true</command>. The (un)setting
135 of the two variables <envar>GOGCC</envar> and <envar>TCL_INCLUDE</envar>
136 is necessary, since they are not correctly set by
137 <emphasis>configure</emphasis>. The tests are only executed for the
138 languages installed on your machine, so the disk space and SBU values
139 given for the tests may vary, and should be considered as mere orders of
140 magnitude. If you have <xref linkend="python2"/>
141 installed, the Python-3 tests are not run.
142 You can run tests for Python-3 by issuing
143 <command>PY3=1 make check-python-examples</command> followed by
144 <command>PY3=1 make check-python-test-suite</command>. According to
145 <application>SWIG</application>'s documentation, the failure of some
146 tests should not be considered harmful.
147 </para>
148
149 <para>
150 Now, as the <systemitem class="username">root</systemitem> user:
151 </para>
152
153<screen role="root"><userinput>make install &amp;&amp;
154install -v -m755 -d /usr/share/doc/swig-&swig-version; &amp;&amp;
155cp -v -R Doc/* /usr/share/doc/swig-&swig-version;</userinput></screen>
156 </sect2>
157
158 <sect2 role="commands">
159 <title>Command Explanations</title>
160
161 <para>
162 <parameter>--without-maximum-compile-warnings</parameter>: disables
163 compiler ansi conformance enforcement, which triggers errors in
164 the <application>Lua</application> headers (starting with Lua 5.3).
165 </para>
166
167 <para>
168 <option>--without-&lt;language&gt;</option>: allows disabling the
169 building of tests and examples for &lt;language&gt;, but all the
170 languages capabilities of <application>SWIG</application> are always
171 built. We use it for <application>Clisp</application>, because the
172 SWIG implementation is very incomplete and a lot of tests fail.
173 </para>
174
175 </sect2>
176
177 <sect2 role="content">
178 <title>Contents</title>
179
180 <segmentedlist>
181 <segtitle>Installed Programs</segtitle>
182 <segtitle>Installed Library</segtitle>
183 <segtitle>Installed Directories</segtitle>
184
185 <seglistitem>
186 <seg>
187 swig and ccache-swig
188 </seg>
189 <seg>
190 None
191 </seg>
192 <seg>
193 /usr/share/doc/swig-&swig-version; and
194 /usr/share/swig
195 </seg>
196 </seglistitem>
197 </segmentedlist>
198
199 <variablelist>
200 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
201 <?dbfo list-presentation="list"?>
202 <?dbhtml list-presentation="table"?>
203
204 <varlistentry id="swig-prog">
205 <term><command>swig</command></term>
206 <listitem>
207 <para>
208 takes an interface file containing C/C++ declarations and
209 SWIG special instructions, and generates the corresponding
210 wrapper code needed to build extension modules.
211 </para>
212 <indexterm zone="swig swig-prog">
213 <primary sortas="b-swig">swig</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="ccache-swig">
219 <term><command>ccache-swig</command></term>
220 <listitem>
221 <para>
222 is a compiler cache, which speeds up re-compilation of
223 C/C++/SWIG code.
224 </para>
225 <indexterm zone="swig ccache-swig">
226 <primary sortas="b-ccache-swig">ccache-swig</primary>
227 </indexterm>
228 </listitem>
229 </varlistentry>
230
231 </variablelist>
232 </sect2>
233</sect1>
Note: See TracBrowser for help on using the repository browser.