source: general/prog/swig.xml@ 4ebade44

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 4ebade44 was 4ebade44, checked in by Douglas R. Reno <renodr@…>, 7 years ago

Tags for various networking stuffs, gnome-related lib stuffs, etc

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

  • Property mode set to 100644
File size: 7.5 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-repo;/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 &lfs80_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 Install <application>SWIG</application> by running the following
117 commands:
118 </para>
119
120<screen><userinput>./configure --prefix=/usr \
121 --without-clisp \
122 --without-maximum-compile-warnings &amp;&amp;
123make</userinput></screen>
124
125 <para>
126 To test the results, issue:
127 <command>make -k check TCL_INCLUDE= GOGCC=true</command>. The (un)setting
128 of the two variables <envar>GOGCC</envar> and <envar>TCL_INCLUDE</envar>
129 is necessary, since they are not correctly set by
130 <emphasis>configure</emphasis>. The tests are only executed for the
131 languages installed on your machine, so the disk space and SBU values
132 given for the tests may vary, and should be considered as mere orders of
133 magnitude. If you have both <xref linkend="python2"/> and
134 <xref linkend="python3"/> installed, the Python-3 tests are not run.
135 You can run tests for Python-3 by issuing
136 <command>PY3=1 make check-python-examples</command> followed by
137 <command>PY3=1 make check-python-test-suite</command>. According to
138 <application>SWIG</application>'s documentation, the failure of some
139 tests should not be considered harmful.
140 </para>
141
142 <para>
143 Now, as the <systemitem class="username">root</systemitem> user:
144 </para>
145
146<screen role="root"><userinput>make install &amp;&amp;
147install -v -m755 -d /usr/share/doc/swig-&swig-version; &amp;&amp;
148cp -v -R Doc/* /usr/share/doc/swig-&swig-version;</userinput></screen>
149 </sect2>
150
151 <sect2 role="commands">
152 <title>Command Explanations</title>
153
154 <para>
155 <parameter>--without-maximum-compile-warnings</parameter>: disables
156 compiler ansi conformance enforcement, which triggers errors in
157 the <application>Lua</application> headers (starting with Lua 5.3).
158 </para>
159
160 <para>
161 <option>--without-&lt;language&gt;</option>: allows disabling the
162 building of tests and examples for &lt;language&gt;, but all the
163 languages capabilities of <application>SWIG</application> are always
164 built. We use it for <application>Clisp</application>, because the
165 SWIG implementation is very incomplete and a lot of tests fail.
166 </para>
167
168 </sect2>
169
170 <sect2 role="content">
171 <title>Contents</title>
172
173 <segmentedlist>
174 <segtitle>Installed Programs</segtitle>
175 <segtitle>Installed Library</segtitle>
176 <segtitle>Installed Directories</segtitle>
177
178 <seglistitem>
179 <seg>
180 swig and ccache-swig
181 </seg>
182 <seg>
183 None
184 </seg>
185 <seg>
186 /usr/share/doc/swig-&swig-version; and
187 /usr/share/swig
188 </seg>
189 </seglistitem>
190 </segmentedlist>
191
192 <variablelist>
193 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
194 <?dbfo list-presentation="list"?>
195 <?dbhtml list-presentation="table"?>
196
197 <varlistentry id="swig-prog">
198 <term><command>swig</command></term>
199 <listitem>
200 <para>
201 takes an interface file containing C/C++ declarations and
202 SWIG special instructions, and generates the corresponding
203 wrapper code needed to build extension modules.
204 </para>
205 <indexterm zone="swig swig-prog">
206 <primary sortas="b-swig">swig</primary>
207 </indexterm>
208 </listitem>
209 </varlistentry>
210
211 <varlistentry id="ccache-swig">
212 <term><command>ccache-swig</command></term>
213 <listitem>
214 <para>
215 is a compiler cache, which speeds up re-compilation of
216 C/C++/SWIG code.
217 </para>
218 <indexterm zone="swig ccache-swig">
219 <primary sortas="b-ccache-swig">ccache-swig</primary>
220 </indexterm>
221 </listitem>
222 </varlistentry>
223
224 </variablelist>
225 </sect2>
226</sect1>
Note: See TracBrowser for help on using the repository browser.