SWIG (Simplified Wrapper and Interface Generator) is a compiler that integrates C and C++ with languages including Perl, Python, Tcl, Ruby, PHP, Java, C#, D, Go, Lua, Octave, R, Scheme, Ocaml, Modula-3, Common Lisp, and Pike. SWIG can also export its parse tree into Lisp s-expressions and XML.
SWIG reads annotated C/C++ header files and creates wrapper code (glue code) in order to make the corresponding C/C++ libraries available to the listed languages, or to extend C/C++ programs with a scripting language.
This package is known to build and work properly using an LFS-7.8 platform.
Download (HTTP): http://downloads.sourceforge.net/swig/swig-3.0.7.tar.gz
Download MD5 sum: 7fff46c84b8c630ede5b0f0827e3d90a
Download size: 5.7 MB
Estimated disk space required: 88 MB (1.1 GB with tests)
Estimated build time: 0.4 SBU (6.4 SBU with tests, using -j4)
Boost-1.59.0 for tests, and any of the languages mentionned in the introduction, as run-time dependencies
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/swig
Install SWIG by running the following commands:
./configure --prefix=/usr \ --without-clisp \ --without-maximum-compile-warnings && make
To test the results, issue: make -k check. Tests for many languages are executed, depending on which ones you have installed. Therefore, disk space and SBU values for the tests should be considered only indications of necessary space and time, but not even approximated values should they be considered. If you have both Python-2.7.10 and Python-3.4.3 installed, the Python-3 tests are not run. You can run tests for Python-3 by issuing PY3=1 make check-python-examples followed by PY3=1 make check-python-test-suite. According to SWIG's documentation, the failure of some tests should not be considered harmful.
Now, as the
make install && install -v -m755 -d /usr/share/doc/swig-3.0.7 && cp -v -R Doc/* /usr/share/doc/swig-3.0.7
disables compiler ansi conformance enforcement, which triggers
errors in the Lua headers
(starting with Lua 5.3).
disabling the building of tests and examples for <language>,
but all the languages capabilities of SWIG are always built. We use it for
Clisp, because the SWIG
implementation is very incomplete and a lot of tests fail.
Last updated on 2015-09-20 15:38:20 -0700