Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 288843

Summary: [kde-testing] app-office/scribus-1.3.5.1 fails to compile with python:3
Product: Gentoo Linux Reporter: MT <toffanin.mauro>
Component: New packagesAssignee: Gentoo KDE team <kde>
Status: RESOLVED DUPLICATE    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description MT 2009-10-13 09:14:39 UTC
compilation of app-office/scribus-1.3.5.1 from the kde-testing overlay fails with the following error:

/var/tmp/portage/app-office/scribus-1.3.5.1/work/scribus-1.3.5.1/scribus/plugins/scriptplugin/cmdcolor.cpp: In function ‘PyObject* scribus_colornames(PyObject*)’:
/var/tmp/portage/app-office/scribus-1.3.5.1/work/scribus-1.3.5.1/scribus/plugins/scriptplugin/cmdcolor.cpp:24: error: ‘PyString_FromString’ was not declared in this scope
make[2]: *** [scribus/plugins/scriptplugin/CMakeFiles/scriptplugin.dir/cmdcolor.o] Error 1
make[1]: *** [scribus/plugins/scriptplugin/CMakeFiles/scriptplugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

This happens because I have dev-lang/python:3 and dev-util/cmake compiled with USE 'python3' enabled which force libraries and include directory from python:3 instead of the python2 (scribus requires python:2 to successfuly compile).

The only viable solution is to force CMake Advanced Variables: PYTHON_LIBRARY, PYTHON_INCLUDE_PATH to point to the last stable release of python: v2.6. Attached there is an ebuild patch that fix the issue using the python eclass and global vars: NEED_PYTHON, PYVER.

Hope to be useful
Mauro Toffanin

p.s.: watching the ebuild and the CMakeLists.txt files I have noticed that HAVE_PYTHON is NOT a CMake option that users can override through USE flags, indeed it's an automagic dependency as the previously reported compilation issue happens with or without the USE 'python' enabled (this mean that the USE flag 'python' disabled do not disable the scribus's python scripting support); 'python' flag is useless as dev-lang/python is a required dependency, but the same apply to other USE flags too, like, for example, 'spell' and 'podofo'; please fix this mess before to commit the ebuild inside the portage tree, otherwise the ebuild can leads to a lot of unpredictable problems (most probably most of the -DHAVE_*=ON -DWANT_*=ON declarations are redundant and useless too).

p.p.s.: there are missing dependencies too, like openssl and the postgres support from x11-libs/qt-sql; the ebuild patch fix it.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2009-10-14 13:08:36 UTC

*** This bug has been marked as a duplicate of bug 288842 ***