Red Hat Bugzilla – Bug 1263740
shipped swig breaks compilation for other projects
Last modified: 2016-11-03 21:05:32 EDT
Description of problem:
swig rpm carries an unneeded patch which breaks some swig uses with other sources.
This patch was added to fix a swig 2.0.7 issue but is not needed anymore from swig 2.0.8.
See author comment here:
Noticed the issue while trying to build nfqueue bindings for perl and python (https://github.com/chifflier/nfqueue-bindings)
which results in incorrectly appended prefixes to some functions names that leads to undefined symbols on
built module usage.
Using the same vanilla version of swig works correctly.
Investigation led to swig207-setools.patch as the culprit.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Get nfqueue-bindings sources ( https://github.com/chifflier/nfqueue-bindings )
2. build and try to load in a python application
unresolved symbols on swig generated module
swig module works ok
According to author, the patch is not needed anymore, so can be dropped (also from Fedora)
The removing unnecessary patch solves the bug.
1) Install cmake, gcc, gcc-c++, python-devel, swig
2) Get nfqueue-bindings sources ( https://github.com/chifflier/nfqueue-bindings )
3) Build and try to load in a python application. I used simple test script
$ cat ./test.py
Output is empty.
Previously it failed with following error:
Traceback (most recent call last):
File "./test.py", line 7, in <module>
File "build/python/nfqueue.py", line 26, in <module>
_nfqueue = swig_import_helper()
File "build/python/nfqueue.py", line 22, in swig_import_helper
_mod = imp.load_module('_nfqueue', fp, pathname, description)
ImportError: build/python/_nfqueue.so: undefined symbol: struct_queue_process_pending
Reproduced with swig-2.0.10-4.el7, verified with swig-2.0.10-5.el7.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.