Description of problem:
python3 changed ABI in rawhide, leading to dependency errors of the form:
I'm attempting to rebuild znc against the latest python3
However, I run into errors of this form:
Building ZNC python bindings library...
modpython/_znc_core.cpp: In function 'std::list<CString, std::allocator<CString> >* std_list_Sl_CString_Sg____getitem____SWIG_0(std::list<CString, std::allocator<CString> >*, PySliceObject*)':
modpython/_znc_core.cpp:4468:60: error: cannot convert 'PySliceObject*' to 'PyObject*' for argument '1' to 'int PySlice_GetIndices(PyObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)'
This appears to be due to this change in python 3:
I'm not yet sure if this is an issue with znc or with swig.
Version-Release number of selected component (if applicable):
Looks like the issue is in swig, the code is being injected from:
(In reply to comment #1)
> Looks like the issue is in swig, the code is being injected from:
Can you verify if znc's python module compiled via the latest swig-2.0.1-2.fc15 works fine, please? Thank you in advance.
swig-2.0.1-2.fc15 seems to fix the compilation error; thanks.
I've rebuilt znc-0.097-3.svn2214.fc15 for dist-rawhide (using the new swig)
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=2699642
Ok, thanks for feedback, closing. Please reopen this bug if the python plugin doesn't work fine.
I seem to be hitting another instance of this bug:
It in fact seems to be the same bug, but the other way around. In my mock rawhide, the API again is:
int PySlice_GetIndices(PySliceObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)
> rpm -q python-devel
... which, per koji, is the latest greatest
Ok, so the problem is that the API change took place in python3 package. python kept the API intact. Thus the simple solution in SWIG won't work. Either you break one, or the other. Note that this issue arises only in C++, so passing the "slice" object as void* won't work either.
It is also blocking rebuild of gnuradio, please drop the swig200-rh666429.patch for f15/f16
Does the patch need some nasty C preprocessor hackery to conditionalize based on the python versions?
#if PY_MAJOR_VERSION == 3
#if PY_VERSION_HEX > 0x0302000
/* >= 3.2 */
/* 3.0, 3.1*/
/* 2.x */
(In reply to comment #10)
Oops, wrong number of zeroes
> #if PY_VERSION_HEX > 0x0302000
#if PY_VERSION_HEX > 0x03020000
I built improved swig-2.0.1-4.fc16/swig-2.0.1-4.fc15 packages which should fix both gnuradio & znc builds (i.e. new swig should be compatible with both python 2.x and 3.x).
swig-2.0.1-4.fc15 has been submitted as an update for Fedora 15.
swig-2.0.1-4.fc15 has been pushed to the Fedora 15 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.1-4.fc15
For gnuradio it works, thanks.
swig-2.0.2-1.fc15 has been submitted as an update for Fedora 15.
swig-2.0.2-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
It seems that this patch as not been sent upstream. Any reason for that ?