Bug 275919 - pykde4 fails to build with Python 3.2
Summary: pykde4 fails to build with Python 3.2
Status: RESOLVED UNMAINTAINED
Alias: None
Product: bindings
Classification: Developer tools
Component: pykde (show other bugs)
Version: unspecified
Platform: Gentoo Packages All
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-17 17:43 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2018-11-17 05:28 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix building with Python 3.2 (488 bytes, patch)
2011-06-20 23:57 UTC, Arfrever Frehtes Taifersar Arahesis
Details
cmake macros patch for python3.2 (3.05 KB, patch)
2012-07-24 20:54 UTC, Yaakov Selkowitz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2011-06-17 17:43:37 UTC
Version:           unspecified (using KDE 4.6.4) 
OS:                All

pykde4 builds correctly with Python 3.1 and fails to build with Python 3.2.

[ 15%] Building CXX object python/pykde4/CMakeFiles/python_module_PyKDE4_kdecore.dir/sip/kdecore/sipkdecorepart1.o
In file included from /usr/include/python3.2/Python.h:8:0,                                                                                                   
                 from /usr/include/python3.2/sip.h:32,
                 from /var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/sip/kdecore/sipAPIkdecore.h:11,
                 from /var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/sip/kdecore/sipkdecorepart1.cpp:7:
/usr/include/python3.2/pyconfig.h:1195:0: warning: "_XOPEN_SOURCE" redefined
<command-line>:0:0: note: this is the location of the previous definition
In file included from /usr/include/python3.2/Python.h:52:0,
                 from /usr/include/python3.2/sip.h:32,
                 from /var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/sip/kdecore/sipAPIkdecore.h:11,
                 from /var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/sip/kdecore/sipkdecorepart1.cpp:7:
/usr/include/python3.2/pyatomic.h:59:1: warning: unused parameter ‘address’
/var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/sip/kdecore/sipkdecorepart1.cpp: In function ‘PyObject* meth_KUser_fullName(PyObject*, PyObject*)’:
/var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/sip/kdecore/sipkdecorepart1.cpp:4844:51: warning: ‘QString KUser::fullName() const’ is deprecated (declared at /usr/include/kuser.h:180)
/var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4/python/pykde4/sip/kdecore/kurl.sip: In function ‘PyObject* slot_KUrl_List___getitem__(PyObject*, PyObject*)’:
/var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4/python/pykde4/sip/kdecore/kurl.sip:174:9: error: cannot convert ‘PySliceObject*’ to ‘PyObject*’ for argument ‘1’ to ‘int PySlice_GetIndicesEx(PyObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)’
/var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4/python/pykde4/sip/kdecore/kurl.sip: In function ‘int slot_KUrl_List___delitem__(PyObject*, PyObject*)’:
/var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4/python/pykde4/sip/kdecore/kurl.sip:142:9: error: cannot convert ‘PySliceObject*’ to ‘PyObject*’ for argument ‘1’ to ‘int PySlice_GetIndicesEx(PyObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)’
/var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4/python/pykde4/sip/kdecore/kurl.sip: In function ‘int slot_KUrl_List___setitem__(PyObject*, PyObject*)’:
/var/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4/python/pykde4/sip/kdecore/kurl.sip:100:9: error: cannot convert ‘PySliceObject*’ to ‘PyObject*’ for argument ‘1’ to ‘int PySlice_GetIndicesEx(PyObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)’
make[2]: *** [python/pykde4/CMakeFiles/python_module_PyKDE4_kdecore.dir/sip/kdecore/sipkdecorepart1.o] Error 1
make[1]: *** [python/pykde4/CMakeFiles/python_module_PyKDE4_kdecore.dir/all] Error 2
make: *** [all] Error 2

Reproducible: Always
Comment 1 Luigi Mantellini 2011-06-19 12:57:47 UTC
same here... I cannot downgrade my python and I just blocked the kde upgrade (for now).

ciao
Comment 2 Arfrever Frehtes Taifersar Arahesis 2011-06-20 23:57:37 UTC
Created attachment 61186 [details]
Fix building with Python 3.2

This patch was originally created by Markus Peloquin and contains a small change made by me.
Comment 3 Andrea Scarpino 2011-12-21 10:54:36 UTC
I can confirm the bug with KDE 4.8rc1:

[ 31%] Building CXX object CMakeFiles/python_module_PyKDE4_kio.dir/sip/kio/sipkiopart4.o
In file included from /usr/include/python3.2mu/Python.h:52:0,                                                                                                                  
                 from /usr/include/python3.2mu/sip.h:32,
                 from /home/bash/builds/kdebindings-python/src/build/sip/kio/sipAPIkio.h:11,
                 from /home/bash/builds/kdebindings-python/src/build/sip/kio/sipkiopart4.cpp:7:
/usr/include/python3.2mu/pyatomic.h:59:1: warning: unused parameter ‘address’ [-Wunused-parameter]
/home/bash/builds/kdebindings-python/src/pykde4-4.7.95/sip/kio/kfileitem.sip: In function ‘PyObject* slot_KFileItemList___getitem__(PyObject*, PyObject*)’:
/home/bash/builds/kdebindings-python/src/pykde4-4.7.95/sip/kio/kfileitem.sip:239:94: error: cannot convert ‘PySliceObject*’ to ‘PyObject* {aka _object*}’ for argument ‘1’ to ‘int PySlice_GetIndicesEx(PyObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)’
make[2]: *** [CMakeFiles/python_module_PyKDE4_kio.dir/sip/kio/sipkiopart4.o] Error 1
make[1]: *** [CMakeFiles/python_module_PyKDE4_kio.dir/all] Error 2
make: *** [all] Error 2

Also, I confirm Arfrever's patch fixed it!
Comment 4 Andrea Scarpino 2011-12-21 15:37:30 UTC
(In reply to comment #3)
> Also, I confirm Arfrever's patch fixed it!

Wait. make install fails.

-- Installing: /usr/lib/python3.2/site-packages/PyKDE4/__init__.py
CMake Error at cmake_install.cmake:332 (FILE):
  file INSTALL cannot find
  "/builds/kdebindings-python/src/build//__init__.pyc".
Comment 5 Arfrever Frehtes Taifersar Arahesis 2011-12-21 15:46:29 UTC
(In reply to comment #4)
> make install fails.

You can rebuild kdelibs with patch from bug #276151 and set PYTHONDONTWRITEBYTECODE variable.
Comment 6 Yaakov Selkowitz 2012-07-24 20:54:40 UTC
Created attachment 72735 [details]
cmake macros patch for python3.2

Attaching a patch for kdelibs 4.8 (tested with 3.2.3 and 2.6.8).
Comment 7 Andrew Crouthamel 2018-11-17 05:28:17 UTC
Hello, unfortunately this bug is being closed as unmaintained, per request of einar77.