FS#43340 - [vtk] Please update to qt5 plugins

Attached to Project: Community Packages
Opened by Ng Oon-Ee (ngoonee) - Monday, 05 January 2015, 08:03 GMT
Last edited by Anatol Pomozov (anatolik) - Monday, 19 October 2015, 23:31 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Ray Rashif (schivmeister)
Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Currently vtk package provides QT Designer plugins for qt4, but qt5 has been the default for some time now. Would appreciate this being updated. I've tried to build it myself, but hit an unrelated build error which I could not solve regarding templatization of the 'min' function.
This task depends upon

Closed by  Anatol Pomozov (anatolik)
Monday, 19 October 2015, 23:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  6.3.0-3
Comment by Ng Oon-Ee (ngoonee) - Monday, 05 January 2015, 08:17 GMT
For reference, here's the error. Also happens on trying to build without modifying for qt5.

/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx: In member function ‘bool vtkFreeTypeTool
s::CalculateBoundingBox(const T&, vtkFreeTypeTools::MetaData&)’:
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1190:51: error: no matching function for
call to ‘min(unsigned int&, int&)’
metaData.descent);
^
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1190:51: note: candidates are:
In file included from /usr/include/c++/4.9.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.9.2/ios:40,
from /usr/include/c++/4.9.2/ostream:38,
from /usr/include/c++/4.9.2/iostream:39,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkIOStream.h:33,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkSystemIncludes.h:36,
from /home/ngoonee/cower/vtk/src/build/Common/Core/vtkAtomicInt.h:38,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObjectBase.h:44,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObject.h:42,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.h:27,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:16:
/usr/include/c++/4.9.2/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.9.2/bits/stl_algobase.h:194:5: note: template argument deduction/substitution failed:
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1190:51: note: deduced conflicting type
s for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
metaData.descent);
^
In file included from /usr/include/c++/4.9.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.9.2/ios:40,
from /usr/include/c++/4.9.2/ostream:38,
from /usr/include/c++/4.9.2/iostream:39,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkIOStream.h:33,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkSystemIncludes.h:36,
from /home/ngoonee/cower/vtk/src/build/Common/Core/vtkAtomicInt.h:38,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObjectBase.h:44,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObject.h:42,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.h:27,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:16:
/usr/include/c++/4.9.2/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _
Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.9.2/bits/stl_algobase.h:240:5: note: template argument deduction/substitution failed:
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1190:51: note: deduced conflicting type
s for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
metaData.descent);
^
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx: In member function ‘void vtkFreeTypeTool
s::GetLineMetrics(T, T, vtkFreeTypeTools::MetaData&, int&, int*)’:
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1954:77: error: no matching function for
call to ‘max(int&, unsigned int&)’
bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width);
^
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1954:77: note: candidates are:
In file included from /usr/include/c++/4.9.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.9.2/ios:40,
from /usr/include/c++/4.9.2/ostream:38,
from /usr/include/c++/4.9.2/iostream:39,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkIOStream.h:33,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkSystemIncludes.h:36,
from /home/ngoonee/cower/vtk/src/build/Common/Core/vtkAtomicInt.h:38,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObjectBase.h:44,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObject.h:42,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.h:27,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:16:
/usr/include/c++/4.9.2/bits/stl_algobase.h:217:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.9.2/bits/stl_algobase.h:217:5: note: template argument deduction/substitution failed:
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1954:77: note: deduced conflicting type
s for parameter ‘const _Tp’ (‘int’ and ‘unsigned int’)
bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width);
^
In file included from /usr/include/c++/4.9.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.9.2/ios:40,
from /usr/include/c++/4.9.2/ostream:38,
from /usr/include/c++/4.9.2/iostream:39,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkIOStream.h:33,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkSystemIncludes.h:36,
from /home/ngoonee/cower/vtk/src/build/Common/Core/vtkAtomicInt.h:38,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObjectBase.h:44,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObject.h:42,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.h:27,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:16:
/usr/include/c++/4.9.2/bits/stl_algobase.h:261:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _
Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.9.2/bits/stl_algobase.h:261:5: note: template argument deduction/substitution failed:
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1954:77: note: deduced conflicting type
s for parameter ‘const _Tp’ (‘int’ and ‘unsigned int’)
bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width);
^
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1955:79: error: no matching function for
call to ‘min(int&, unsigned int&)’
bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows);
^
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1955:79: note: candidates are:
In file included from /usr/include/c++/4.9.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.9.2/ios:40,
from /usr/include/c++/4.9.2/ostream:38,
from /usr/include/c++/4.9.2/iostream:39,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkIOStream.h:33,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkSystemIncludes.h:36,
from /home/ngoonee/cower/vtk/src/build/Common/Core/vtkAtomicInt.h:38,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObjectBase.h:44,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObject.h:42,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.h:27,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:16:
/usr/include/c++/4.9.2/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.9.2/bits/stl_algobase.h:194:5: note: template argument deduction/substitution failed:
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1955:79: note: deduced conflicting type
s for parameter ‘const _Tp’ (‘int’ and ‘unsigned int’)
bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows);
^
In file included from /usr/include/c++/4.9.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.9.2/ios:40,
from /usr/include/c++/4.9.2/ostream:38,
from /usr/include/c++/4.9.2/iostream:39,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkIOStream.h:33,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkSystemIncludes.h:36,
from /home/ngoonee/cower/vtk/src/build/Common/Core/vtkAtomicInt.h:38,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObjectBase.h:44,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Common/Core/vtkObject.h:42,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.h:27,
from /home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:16:
/usr/include/c++/4.9.2/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _
Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.9.2/bits/stl_algobase.h:240:5: note: template argument deduction/substitution failed:
/home/ngoonee/cower/vtk/src/VTK-6.1.0/Rendering/FreeType/vtkFreeTypeTools.cxx:1955:79: note: deduced conflicting type
s for parameter ‘const _Tp’ (‘int’ and ‘unsigned int’)
bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows);
^
[ 59%] [ 59%] Building CXX object Rendering/Core/CMakeFiles/vtkRenderingCoreJava.dir/vtkDistanceToCameraJava.cxx.o
Rendering/FreeType/CMakeFiles/vtkRenderingFreeType.dir/build.make:121: recipe for target 'Rendering/FreeType/CMakeFiles
/vtkRenderingFreeType.dir/vtkFreeTypeTools.cxx.o' failed
make[2]: *** [Rendering/FreeType/CMakeFiles/vtkRenderingFreeType.dir/vtkFreeTypeTools.cxx.o] Error 1
CMakeFiles/Makefile2:5125: recipe for target 'Rendering/FreeType/CMakeFiles/vtkRenderingFreeType.dir/all' failed
make[1]: *** [Rendering/FreeType/CMakeFiles/vtkRenderingFreeType.dir/all] Error 2
Comment by Ng Oon-Ee (ngoonee) - Monday, 05 January 2015, 08:49 GMT
Point of note - building in a clean chroot does not work either.
Comment by Andrzej Giniewicz (Giniu) - Monday, 05 January 2015, 18:23 GMT
https://bugs.archlinux.org/task/43007 is related, already tried it, but wasn't able to make it work. Might try it again.
Comment by Ng Oon-Ee (ngoonee) - Thursday, 08 January 2015, 02:46 GMT Comment by Ng Oon-Ee (ngoonee) - Thursday, 08 January 2015, 21:46 GMT
I've at least trivially found the problem in vtkFreeTypeTools.cxx, in lines 1189, 1956, and 1955 we need to cast bitmap->width (or bitmap->rows) to (int). It compiles for me then. I'll nudge upstream [vtk-devel] about that. Surprising that it didn't use to cause a problem though, as the commit is Nov 15 which caused this (commit 6dd7b574d7594319e764fea4d336adf85a71d8ab). How could the sources have changed between when vtk was compiled by Andrzej (7 Dec) and now? Probably the real root cause is elsewhere.

Anyway tl;dr is - casting bitmap->width and bitmap->rows to int in those lines allows compilation. May break everything, but I haven't been able to test that, am unlikely to use freetype stuff from vtk anyway.
Comment by Ng Oon-Ee (ngoonee) - Thursday, 08 January 2015, 21:57 GMT
http://public.kitware.com/pipermail/vtkusers/2015-January/089949.html literally sent his email just as I sent mine. There's a fix there.
Comment by Alex (nylocx) - Wednesday, 15 April 2015, 14:17 GMT
VTK 6.2 seems to build clean against Qt5 is there any reason not to update to 6.2 with qt5 instead of qt4 as dependency?
Comment by Ray Rashif (schivmeister) - Wednesday, 29 April 2015, 19:52 GMT
Ng and Alex, sorry for the delay. Andrzej is actually no longer maintainer since I adopted this off of him and prevented him from dropping it to AUR (where it would have been better taken care of, but I did not want to have to re-upload it when I did get around to it).

Anyway, I will attend to it in a couple of days since a quick test build did not succeed. It probably needs a clean-up of the patches or worse, a rewrite. Did any of you succeed with a build on 6.2?
Comment by Ng Oon-Ee (ngoonee) - Monday, 04 May 2015, 08:13 GMT
Thanks schiv, but no, my current working build is 6.1.0-8
Comment by Alex (nylocx) - Monday, 06 July 2015, 11:08 GMT
Hi, today I had to revisit this issu as I neede a current build of VTK (6.2) with Qt5 and Java support.
The main problem was that the xdmf lib required the vtk versions of hdf5, zlib and libxml. And I also could not use the system libs for netcdf and libproj4. So I had to disable the USE_SYSTEM_* settings for this libs. (I know that this should not be the way to do it but I needed a working Version today ;))
So I guess for a working package that fits the arch packaging rules you would have to package the xdmf libs and patch some CMake files, but I didn't have time to look into that.
For reference the settings I ended up with where:
Cache file:
VTK_QT_VERSION:STRING=5
VTK_USE_SYSTEM_OGGTHEORA:BOOL=1
VTK_USE_SYSTEM_EXPAT:BOOL=1
BUILD_TESTING:BOOL=0
VTK_USE_SYSTEM_FREETYPE:BOOL=1
VTK_BUILD_ALL_MODULES:BOOL=1
VTK_USE_SYSTEM_GL2PS:BOOL=1
VTK_WRAP_JAVA:BOOL=1
VTK_USE_SYSTEM_LIBRARIES:BOOL=1
VTK_USE_SYSTEM_XDMF2:BOOL=0
VTK_USE_SYSTEM_LIBXML2:BOOL=0
VTK_USE_SYSTEM_ZLIB:BOOL=0
VTK_USE_SYSTEM_PNG:BOOL=1
VTK_USE_SYSTEM_NETCDF:BOOL=0
VTK_USE_SYSTEM_HDF5:BOOL=0
VTK_USE_SYSTEM_JPEG:BOOL=1
CMAKE_INSTALL_PREFIX:PATH=/usr
VTK_USE_SYSTEM_XDMF3:BOOL=0
VTK_USE_SYSTEM_JSONCPP:BOOL=1
VTK_USE_SYSTEM_TIFF:BOOL=1
VTK_USE_SYSTEM_LIBPROJ4:BOOL=0
CMAKE_BUILD_TYPE:STRING=Release

Hope that helps at least a bit. Would really like to see VTK 6.2 with qt5 support in arch linux.
Comment by Matthias Blaicher (mabl) - Tuesday, 11 August 2015, 21:03 GMT
I recently saw this commit on vtk master: https://gitlab.kitware.com/vtk/vtk/commit/d2013691999c8978b84db1623b905e8eff2d3035

It might be the fix needed for vtk 6.2. In anycase, vtk 6.3. will release soon, it might be worth concentrating on the current 6.3rc.
Comment by Anatol Pomozov (anatolik) - Thursday, 08 October 2015, 20:03 GMT
I just pushed vtk-6.3.0-3 to [community-testing] repository. In addition to version bump it contains a lot of changes and cleanups. It also rebuilt with Qt5.

Please test this package and share your experience.

Loading...