Bug 627310 - swig generated graphviz code breaks with python-2.7
Summary: swig generated graphviz code breaks with python-2.7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: swig
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-25 16:29 UTC by John Ellson
Modified: 2013-04-30 23:47 UTC (History)
2 users (show)

Fixed In Version: swig-2.0.0-5.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-14 05:00:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Ellson 2010-08-25 16:29:34 UTC
Description of problem:
SWIG generated code that has been working for years now breaks on Fedora-14, I think probably because of swig not tracking the python-2.7 upgrade.

Version-Release number of selected component (if applicable):
swig-2.0.0-4.fc14.x86_64
python-devel-2.7-8.fc14.x86_64
graphviz-devel-2.26.0-4.fc14.x86_64
gcc-4.5.1-1.fc14.x86_64

How reproducible:
100%


Steps to Reproduce:
1.swig -c++ -python -o gv_python.cpp /usr/include/graphviz/gv.i
2./usr/bin/g++  -I/usr/include/python2.7 -I/usr/include/graphviz  -c -o gv_python.o gv_python.cpp
  
Actual results:
gv_python.cpp: In function ‘void SWIG_Python_DestroyModule(void*)’:
gv_python.cpp:2511:70: error: invalid conversion from ‘void*’ to ‘PyObject*’
gv_python.cpp:2511:70: error:   initializing argument 1 of ‘void* PyCapsule_GetPointer(PyObject*, const char*)’
gv_python.cpp: In function ‘void SWIG_Python_SetModule(swig_module_info*)’:
gv_python.cpp:2539:34: error: invalid conversion from ‘void (*)(void*)’ to ‘void (*)(PyObject*)’
gv_python.cpp:2539:34: error:   initializing argument 3 of ‘PyObject* PyCapsule_New(void*, const char*, void (*)(PyObj

Expected results:
no compile errors.

Additional info:
On fedora-13, the same test but with-I/usr/include/python2.6 works without error.

Comment 1 John Ellson 2010-08-25 16:58:56 UTC
This bug appears to be related to #623854

Comment 2 Adam Tkac 2010-08-27 08:23:16 UTC
(In reply to comment #1)
> This bug appears to be related to #623854

Right you are.

Comment 3 Fedora Update System 2010-08-27 08:33:36 UTC
swig-2.0.0-5.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/swig-2.0.0-5.fc14

Comment 4 John Ellson 2010-08-27 18:16:54 UTC
Thank you for your fast response.  No more compilation errors.

Comment 5 Fedora Update System 2010-09-02 22:07:24 UTC
swig-2.0.0-5.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update swig'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/swig-2.0.0-5.fc14

Comment 6 Fedora Update System 2010-09-14 05:00:14 UTC
swig-2.0.0-5.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


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