When building vtk-5.8.0 I received the following error: In file included from /var/tmp/portage/sci-libs/vtk-5.8.0/work/VTK/Wrapping/Python/vtkPythonOverload.h:28:0, from /var/tmp/portage/sci-libs/vtk-5.8.0/work/VTK/Wrapping/Python/vtkPythonOverload.cxx:26: /var/tmp/portage/sci-libs/vtk-5.8.0/work/VTK/Wrapping/Python/vtkPython.h:93:2: error: #error "Python.h is different version from what VTK was configured with!!" In file included from /var/tmp/portage/sci-libs/vtk-5.8.0/work/VTK/Wrapping/Python/vtkPythonUtil.h:18:0, from /var/tmp/portage/sci-libs/vtk-5.8.0/work/VTK/Wrapping/Python/vtkPythonArgs.h:27, from /var/tmp/portage/sci-libs/vtk-5.8.0/work/VTK/Wrapping/Python/vtkPythonArgs.cxx:24: /var/tmp/portage/sci-libs/vtk-5.8.0/work/VTK/Wrapping/Python/vtkPython.h:93:2: error: #error "Python.h is different version from what VTK was configured with!!" This is caused by FindPythonLibs.cmake auto-detecting a newer Python even though an older Python is the active Gentoo version. The ebuild passes the correct version active version (2.6 in my case) when configuring, however, the config process auto-selects a different version (2.7 in my case) which causes the above build error. Hopefully the relevant Python build variables can be configured manually using cmake rather than relying on FindPythonLibs to get things right (which it doesnt...). I'm working on a patch now. will submit to my overlay if I figure it out... Reproducible: Always Steps to Reproduce: 1. Select Python2.6 as active Python version 2. Install newer Python version but do not activate (Python2.7, Python3, etc) 3. emerge -va vtk
Created attachment 300707 [details] build.log for vtk-5.8.0 Python-related failure
Created attachment 300715 [details, diff] patch for vtk 5.8.0 ebuild that fixes this bug Full patched ebuild available in my overlay: http://git.overlays.gentoo.org/gitweb/?p=user/jtriley.git
Thanks for the patch, I will test it. But inclusion might be delayed because of fosdem.
No problem, hope you're having fun :D
mmh, it seems to be already included in the ebuild: if use python; then mycmakeargs+=( -DVTK_WRAP_PYTHON=ON -DVTK_WRAP_PYTHON_SIP=ON -DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip" -DSIP_INCLUDE_DIR="${EPREFIX}$(python_get_includedir)" -DVTK_PYTHON_INCLUDE_DIR="${EPREFIX}"$(python_get_includedir) -DVTK_PYTHON_LIBRARY="${EPREFIX}$(python_get_library)" -DVTK_PYTHON_SETUP_ARGS:STRING=--root="${D}") fi And your overlay seems down :( But I can reproduce the error
(In reply to comment #5) > mmh, it seems to be already included in the ebuild: Not quite, my ebuild patch (attached to this bug) adds PYTHON_INCLUDE_DIR and PYTHON_LIBRARY (no prefixes) which seems to fix the problem for me. > And your overlay seems down :( Weird, it's hosted on git.overlays.gentoo.org. I just checked and it's up now but in case you have issues here's my github mirror: https://github.com/jtriley/jtriley-overlay
(In reply to comment #6) > (In reply to comment #5) > > mmh, it seems to be already included in the ebuild: > Not quite, my ebuild patch (attached to this bug) adds PYTHON_INCLUDE_DIR and > PYTHON_LIBRARY (no prefixes) which seems to fix the problem for me. ah, I didn't test the EPREFIX removal. Will do that tonight. > > > And your overlay seems down :( > Weird, it's hosted on git.overlays.gentoo.org. I just checked and it's up now > but in case you have issues here's my github mirror: > > https://github.com/jtriley/jtriley-overlay g.o.g.o was done, sorry for the noise.
> ah, I didn't test the EPREFIX removal. Will do that tonight. I didn't remove EPREFIX I meant that I'm passing PYTHON_INCLUDE_DIR and PYTHON_LIBRARY (ie *not* VTK_PYTHON_INCLUDE_DIR, etc) to mycmake args. Have a look at the ebuild patch attached to this bug - specifically these lines are being added to mycmakeargs: + -DPYTHON_INCLUDE_DIR="${EPREFIX}"$(python_get_includedir) + -DPYTHON_LIBRARY="${EPREFIX}$(python_get_library)" From my limited testing this fixes the problem. HTH ~jtriley
Yeah I tested it yesterday and it worked fine. But forgot to commit it :(
+ 10 Feb 2012; Justin Lecher <jlec@gentoo.org> -vtk-5.4.2-r1.ebuild, + -vtk-5.6.0-r2.ebuild, -vtk-5.6.0-r3.ebuild, vtk-5.6.1.ebuild, + vtk-5.8.0.ebuild: + Use selected python ABI, #401839, patch by JTRiley; dropped old +