Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 288842 - [kde-testing] app-office/scribus-1.3.5.1 fails to compile with python:3
Summary: [kde-testing] app-office/scribus-1.3.5.1 fails to compile with python:3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
: 288843 (view as bug list)
Depends on:
Blocks: 267193
  Show dependency tree
 
Reported: 2009-10-13 09:14 UTC by MT
Modified: 2010-01-06 19:34 UTC (History)
1 user (show)

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


Attachments
scribus-1.3.5.1.ebuild.patch (scribus-1.3.5.1.ebuild.patch,1.41 KB, patch)
2009-10-13 09:17 UTC, MT
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description MT 2009-10-13 09:14:16 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 MT 2009-10-13 09:17:07 UTC
Created attachment 206934 [details, diff]
scribus-1.3.5.1.ebuild.patch
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2009-10-14 13:08:36 UTC
*** Bug 288843 has been marked as a duplicate of this bug. ***
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2010-01-06 19:34:31 UTC
Should be fixed in Portage with 1.3.5.1 bump.