Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 365549 - dev-python/sip-4.12.3, kde-base/pykde4-4.6.4 incompatible with Python 3.2
Summary: dev-python/sip-4.12.3, kde-base/pykde4-4.6.4 incompatible with Python 3.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All All
: Normal normal with 2 votes (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 370041 371929 (view as bug list)
Depends on: 372407
Blocks: python-3.2
  Show dependency tree
 
Reported: 2011-05-01 13:12 UTC by Markus Peloquin
Modified: 2011-07-14 14:24 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sip-4.12.1-sliceobject.patch (sip-4.12.1-sliceobject.patch,733 bytes, patch)
2011-05-01 13:13 UTC, Markus Peloquin
Details | Diff
pykde4-4.6.2-sliceobject.patch (pykde4-4.6.2-sliceobject.patch,602 bytes, patch)
2011-05-01 13:18 UTC, Markus Peloquin
Details | Diff
Build log of failed build (build.log,74.67 KB, text/x-log)
2011-05-30 22:01 UTC, georgi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Peloquin 2011-05-01 13:12:08 UTC
pykde4 uses sip's macro sipConvertFromSliceObject(), which casts the argument to a (PySliceObject*) before calling PySlice_GetIndicesEx().  From Python-3.1.2 to -3.2, that function was changed from taking a PySliceObject* to take a PyObject*.  If you were wondering, PySliceObject is a subclass, in a sense, of PyObject.

The sip patch adds a python version check to the header. The pykde4 patch does the same.

Reproducible: Always
Comment 1 Markus Peloquin 2011-05-01 13:13:46 UTC
Created attachment 271739 [details, diff]
sip-4.12.1-sliceobject.patch

Add check to sip.h so fix the cast it makes.
Comment 2 Markus Peloquin 2011-05-01 13:18:49 UTC
Created attachment 271745 [details, diff]
pykde4-4.6.2-sliceobject.patch

Add the same to one place in the pykde4 source.  It's presently compiling, but I have every confidence in my ability to get it right the second time.
Comment 3 Markus Peloquin 2011-05-01 13:39:20 UTC
The sip patch applies on 4.12, as well:

~/sip-4.12 $ patch -p1 < ../sip-4.12.1-sliceobject.patch 
patching file siplib/sip.h.in
Hunk #1 succeeded at 1552 (offset -1 lines).

It got further in the build but my system froze up (it's happened before; no CPU/IO activity in one of the processes; I believe it's unrelated).  I'm rebuilding but I have to go.

PCHOOOOO
Comment 4 Markus Peloquin 2011-05-01 14:52:26 UTC
Ah crap.  It fails in the install phase:


>>> Install pykde4-4.6.2 into /var/tmp/portage/kde-base/pykde4-4.6.2/image/ category kde-base
>>> Working in BUILD_DIR: "/var/tmp/portage/kde-base/pykde4-4.6.2/work/pykde4-4.6.2_build"
make -j2 DESTDIR=/var/tmp/portage/kde-base/pykde4-4.6.2/image/ install 

[  8%] Built target python_module_PyKDE4_dnssd

[ 16%] Built target python_module_PyKDE4_kdecore
[ 16%] Built target compile_python_files
[ 24%] Built target python_module_PyKDE4_khtml
[ 33%] Built target python_module_PyKDE4_kdeui
[ 41%] Built target python_module_PyKDE4_kio
[ 50%] Built target python_module_PyKDE4_knewstuff
[ 58%] Built target python_module_PyKDE4_kparts
[ 66%] Built target python_module_PyKDE4_ktexteditor
[ 75%] Built target python_module_PyKDE4_kutils
[ 83%] Built target python_module_PyKDE4_phonon
[ 94%] [100%] Built target python_module_PyKDE4_solid
Built target python_module_PyKDE4_plasma


[100%] Built target compile_python_files
Install the project...
-- Install configuration: "Gentoo"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/kdecore.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/kdecore.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/solid.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/solid.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/kdeui.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/kdeui.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/kio.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/kio.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/kutils.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/kutils.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/kparts.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/kparts.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/ktexteditor.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/ktexteditor.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/khtml.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/khtml.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/knewstuff.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/knewstuff.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/dnssd.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/dnssd.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/phonon.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/phonon.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/plasma.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.2/image//usr/lib/python3.2/site-packages/PyKDE4/plasma.so" to "/usr/lib/qt4"
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.2/image/usr/lib/python3.2/site-packages/PyKDE4/__init__.py
CMake Error at python/pykde4/cmake_install.cmake:280 (FILE):
  file INSTALL cannot find
  "/var/tmp/portage/kde-base/pykde4-4.6.2/work/pykde4-4.6.2_build/python/pykde4//__init__.pyc".
Call Stack (most recent call first):
  python/cmake_install.cmake:37 (INCLUDE)
  cmake_install.cmake:37 (INCLUDE)


My patches are still good I guess.
Comment 5 Markus Peloquin 2011-05-01 15:06:01 UTC
The compiled files do exist, but in a different place with different names:

$ find /var/tmp/portage/kde-base/pykde4-4.6.2/work/pykde4-4.6.2_build/python/ | grep '\.py[oc]$'
/var/tmp/portage/kde-base/pykde4-4.6.2/work/pykde4-4.6.2_build/python/pykde4/var/tmp/portage/kde-base/pykde4-4.6.2/work/pykde4-4.6.2_build/python/pykde4/__pycache__/pykdeconfig.cpython-32.pyc
/var/tmp/portage/kde-base/pykde4-4.6.2/work/pykde4-4.6.2_build/python/pykde4/tools/pykdeuic4/__pycache__/kde4.cpython-32.pyc
/var/tmp/portage/kde-base/pykde4-4.6.2/work/pykde4-4.6.2_build/python/pykde4/tools/pykdeuic4/__pycache__/pykdeuic4.cpython-32.pyc
/var/tmp/portage/kde-base/pykde4-4.6.2/work/pykde4-4.6.2_build/python/pykde4/__pycache__/__init__.cpython-32.pyc

The failed command comes from python/pykde4/CMakeLists.txt:
PYTHON_INSTALL(__init__.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)

PYTHON_INSTALL is defined in /usr/share/apps/cmake/modules/PythonMacros.cmake, which in turn comes from kdelibs-4.6.2-r2.  UGH
Comment 6 georgi 2011-05-30 22:01:08 UTC
Created attachment 275233 [details]
Build log of failed build

I am also experiencing this on AMD64 with pykde4-4.6.3 and sip-4.12.3. Attaching build log.
Comment 7 Luigi 'Comio' Mantellini 2011-06-11 14:56:24 UTC
same error in pykde4-4.6.4

bye.

luigi
Comment 8 georgi 2011-06-12 07:23:54 UTC
Thanks for your help, Markus.

I applied both patches to sip-4.12.3 and pykde4-4.6.4 after adjusting the version numbers inside and I get the INSTALL error you posted. I don't quite understand what you said in comment 5, but the output of the find+grep command is:

# find /tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/ | grep '\.py[oc]$'                                                
/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/__pycache__/__init__.cpython-32.pyc
/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/tools/pykdeuic4/__pycache__/pykdeuic4.cpython-32.pyc
/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/tools/pykdeuic4/__pycache__/kde4.cpython-32.pyc
/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/tmp/portage/kde-base/pykde4-4.6.4/work/pykde4-4.6.4_build/python/pykde4/__pycache__/pykdeconfig.cpython-32.pyc

I'm stuck in the middle of an upgrade to KDE 4.6.4. Any help would be greatly appreciated :)
Comment 9 Luigi 'Comio' Mantellini 2011-06-12 12:27:34 UTC
(In reply to comment #8)
> Thanks for your help, Markus.
> 
...
> I'm stuck in the middle of an upgrade to KDE 4.6.4. Any help would be greatly
> appreciated :)

me too... :D
Comment 10 Markus Peloquin 2011-06-12 15:06:13 UTC
I think if you guys had run python-updater, you would have run into the problem before upgrading to kde-4.6.  I myself gave up and downgraded my system python to 2.7.
Comment 11 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2011-06-14 15:00:25 UTC
*** Bug 370041 has been marked as a duplicate of this bug. ***
Comment 12 Rafał Mużyło 2011-06-16 17:22:02 UTC
*** Bug 371929 has been marked as a duplicate of this bug. ***
Comment 13 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-06-17 15:49:47 UTC
I have reported:
https://bugs.kde.org/show_bug.cgi?id=275919
Comment 14 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-06-20 16:49:51 UTC
http://www.riverbankcomputing.com/pipermail/pyqt/2011-June/029986.html
Comment 15 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-06-24 21:37:14 UTC
Fixed in dev-python/sip-4.12.3-r1 and kde-base/pykde4-{4.6.3-r1,4.6.4-r1}.
Comment 16 Kobboi 2011-07-14 14:21:01 UTC
(In reply to comment #15)
> Fixed in dev-python/sip-4.12.3-r1 and kde-base/pykde4-{4.6.3-r1,4.6.4-r1}.

Again present in kde-base/pykde4-4.6.5-r1:

-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.5-r1/temp/images/2.7/usr/share/apps/pykde4/examples/./default.py
-- Installing: /var/tmp/portage/kde-base/pykde4-4.6.5-r1/temp/images/2.7/usr/lib64/kde4/kpython2.7pluginfactory.so
-- Set runtime path of "/var/tmp/portage/kde-base/pykde4-4.6.5-r1/temp/images/2.7/usr/lib64/kde4/kpython2.7pluginfactory.so" to "/usr/lib64/qt4"
 * Installation of kde-base/pykde4-4.6.5-r1 with CPython 3.2...
make -j10 DESTDIR=/var/tmp/portage/kde-base/pykde4-4.6.5-r1/temp/images/3.2 install
make: *** No rule to make target `install'.  Stop.
emake failed
 * ERROR: kde-base/pykde4-4.6.5-r1 failed (install phase):
 *   emake install failed for Python 3.2