Sunday, July 6, 2008

Gentoo: dev-python/pyqt4-4.4 failed on pluginloader.cpp

I've been trying to get the latest version of Amarok to build on Gentoo. This in turn requires PyQt4-4.4 but that ebuild fails with this error on pluginloader.cpp:

pluginloader.cpp: In static member function 'static PyObject* PyCustomWidgets::getModuleAttr(const char*, const char*)':
pluginloader.cpp:284: error: invalid conversion from 'const char*' to 'char*'
pluginloader.cpp:284: error: initializing argument 1 of 'PyObject* PyImport_ImportModule(char*)'
pluginloader.cpp:296: error: invalid conversion from 'const char*' to 'char*'
pluginloader.cpp:296: error: initializing argument 2 of 'PyObject* PyObject_GetAttrString(PyObject*, char*)'
make[1]: *** [pluginloader.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/dev-python/PyQt4-4.4/work/PyQt-x11-gpl-4.4/designer'
make: *** [all] Error 2

There's some discussion of this issue on the forums which leads to bug 222435. Ebuild patches are available in the bug attachments.

To install the patches:

  • Download PyQt4-4.4-r1.ebuild to /usr/portage/dev-python/PyQt4/
  • Download PyQt4-4.4-compile.patch to /usr/portage/dev-python/PyQt4/files/
  • Run ebuild /usr/portage/dev-python/PyQt4/PyQt4-4.4-r1.ebuild digest
  • emerge dev-python/PyQt4

No comments: