Bug 1263740 - shipped swig breaks compilation for other projects
shipped swig breaks compilation for other projects
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: swig (Show other bugs)
7.1
x86_64 Linux
high Severity unspecified
: rc
: ---
Assigned To: Jitka Plesnikova
Martin Cermak
: EasyFix
Depends On:
Blocks: 1289025 1305230
  Show dependency treegraph
 
Reported: 2015-09-16 10:48 EDT by Matteo Brancaleoni
Modified: 2016-11-03 21:05 EDT (History)
4 users (show)

See Also:
Fixed In Version: swig-2.0.10-5.el7
Doc Type: Bug Fix
Doc Text:
Cause: Use swig for generating code Consequence: Invalid symbols generated Fix: Remove the setools patch which breaks the code. The setools bug was fixed by upstream different way Result: Undefined symbols are not generated.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 21:05:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
CentOS 9469 None None None Never

  None (edit)
Description Matteo Brancaleoni 2015-09-16 10:48:11 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:
https://github.com/swig/swig/issues/515

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):
swig-2.0.10-4.el7

How reproducible:
Always

Steps to Reproduce:
1. Get nfqueue-bindings sources ( https://github.com/chifflier/nfqueue-bindings )
2. build and try to load in a python application

Actual results:
unresolved symbols on swig generated module


Expected results:
swig module works ok


Additional info:
According to author, the patch is not needed anymore, so can be dropped (also from Fedora)
Comment 2 Jitka Plesnikova 2015-09-17 03:21:24 EDT
The removing unnecessary patch solves the bug.
Comment 5 Jitka Plesnikova 2016-03-16 12:21:28 EDT
Tests steps:
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 
#!/usr/bin/python

import sys

sys.path.append('python')
sys.path.append('build/python')
import nfqueue

Output is empty.

Previously it failed with following error:

Traceback (most recent call last):
  File "./test.py", line 7, in <module>
    import nfqueue
  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
Comment 6 Martin Cermak 2016-07-22 12:38:15 EDT
Reproduced with swig-2.0.10-4.el7, verified with swig-2.0.10-5.el7.
Comment 8 errata-xmlrpc 2016-11-03 21:05:32 EDT
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.

https://rhn.redhat.com/errata/RHBA-2016-2227.html

Note You need to log in before you can comment on or make changes to this bug.