[ITK-users] [Paraview] compile itk (VTKGlue ON) with vtk from paraview
Dr. Roman Grothausmann
grothausmann.roman at mh-hannover.de
Mon Feb 2 05:41:41 EST 2015
Hi Matt,
On 31/01/15 17:25, Matt McCormick wrote:
>>> I would recommend creating build instructions to build against a
>>> ParaView build tree. I have just verified that ITK builds with the
>>> ITKVtkGlue module ON when pointing VTK_DIR to the <ParaView-build>/VTK
>>> directory.
>>
>> Did You use BUILD_SHARED_LIBS ON for both ITK and ParaView? ITK also
>> compiles fine without any errors for me if I use BUILD_SHARED_LIBS OFF,
>> however the problems then arise when compiling the plugin.
>
> I was using BUILD_SHARED_LIBS for both. What issue were you seeing?
If I configure ITK with:
BUILD_SHARED_LIBS ON
Module_ITKVtkGlue ON
VTK_DIR /opt/compilation/paraview-git_build/VTK/
cmake is happy but I get linker errors at the end of the compilation of ITK when
the VTKGlue is due. After switching off all PV plugin builds leaves:
Linking CXX shared library ../../../../lib/libITKVtkGlue-4.6.so
/usr/bin/ld: cannot find -lvtkPVPythonCatalyst
/usr/bin/ld: cannot find -lvtkUtilitiesPythonInitializer
Both libraries seem to be missing entries in
/opt/compilation/paraview-git_build/VTK/VTKTargets.cmake
I guess that's why the linker cannot find these libraries which are there but
with the ending *-pv4.3.so. So a
cd /opt/compilation/paraview-git_build/lib/
for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done
did the trick but I guess that's not the way it ought to be done.
My guess is that either some lines need to be added to VTKTargets.cmake or that
the ITK-build needs to be told that there is no need to link against these
libraries for the ITKVtkGlue (if that is true).
> Again, I think the best approach is to build VTK separately, then
> build both ParaView and ITK against that version.
OK, I tried that with vtk-git of today but then paraview cmake complains:
cmake -DUSE_EXTERNAL_VTK:BOOL=ON ../paraview-git/
-- Determined Source Version : 4.3.1-18-g04df19f
-- Using External VTK from "/opt/vtk-git_150202/lib/cmake/vtk-6.2"
CMake Error at CMake/ParaViewModuleTop.cmake:61 (include):
include could not find load file:
vtkGroups
Call Stack (most recent call first):
CMakeLists.txt:605 (include)
CMake Error at CMake/ParaViewModuleTop.cmake:184 (include):
include could not find load file:
TopologicalSort
Call Stack (most recent call first):
CMakeLists.txt:605 (include)
CMake Error at CMake/ParaViewModuleTop.cmake:185 (topological_sort):
Unknown CMake command "topological_sort".
Call Stack (most recent call first):
CMakeLists.txt:605 (include)
-- Configuring incomplete, errors occurred!
I also tried a VTK-6.1 but that just yielded other errors.
How do I figure out what VTK-version ParaView needs? Otherwise I think this is
not a suitable instruction to give in the publication as the VTK-Version needed
is likely to change in future ParaView releases.
Therefore I prefer instructions that use the VTK bundled with ParaView.
What could be the reason that You did not have the linker problems when
ITKVtkGlue was compiled?
Again, many thanks for looking into this.
Roman
>> On 26/01/15 17:54, Matt McCormick wrote:
>>>
>>> Hi Roman,
>>>
>>> Thanks for the update. Great to hear about the Midas Journal article!
>>>
>>> I do not think the Midas Journal will be able to build your plugin.
>>>
>>> I would recommend creating build instructions to build against a
>>> ParaView build tree. I have just verified that ITK builds with the
>>> ITKVtkGlue module ON when pointing VTK_DIR to the <ParaView-build>/VTK
>>> directory.
>>>
>>> I don't see the install tree VTKTargets.cmake file in my ParaView
>>> build, either. In the long term, the ParaView CMake configuration
>>> should be corrected.
>>>
>>> HTH,
>>> Matt
>>>
>>> On Mon, Jan 26, 2015 at 4:02 AM, Dr. Roman Grothausmann
>>> <grothausmann.roman at mh-hannover.de> wrote:
>>>>
>>>> Hi Matt,
>>>>
>>>>
>>>> Thank You very much for Your reply.
>>>> I can only find one VTKTargets.cmake in
>>>> /opt/compilation/paraview-git_build/VTK/
>>>> It seems though that it is lacking the relevant entries for the libraries
>>>> that troubled me, e.g. vtkPVPythonCatalyst and
>>>> vtkUtilitiesPythonInitializer.
>>>>
>>>> I'm about to publish the ITK-VTK PV plugin in the Midas Journal, what
>>>> installation instructions should I give there?
>>>> Will the testing environment be able to compile this plugin and its tests
>>>> or
>>>> should I disable automatic testing for this contribution?
>>>>
>>>> Many thanks for looking into this.
>>>> Roman
>>>>
>>>>
>>>> On 23/01/15 18:15, Matt McCormick wrote:
>>>>>
>>>>>
>>>>> Hi Roman,
>>>>>
>>>>> Thanks for looking into the issue and reporting it to the mailing list.
>>>>>
>>>>> Paraview should be installing VTKTargets.cmake, which tells the build
>>>>> system where to find the libraries. Note that there might be two
>>>>> VTKTargets.cmake files that are generated -- one for the build tree
>>>>> and one for the install tree.
>>>>>
>>>>> HTH,
>>>>> Matt
>>>>>
>>>>> On Fri, Jan 23, 2015 at 4:20 AM, Dr. Roman Grothausmann
>>>>> <grothausmann.roman at mh-hannover.de> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 22/01/15 11:21, Dr. Roman Grothausmann wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Adding the abs. file locations to the build command does not help nor
>>>>>>> does
>>>>>>> -L/opt/paraview-4.3.1_git/lib/paraview-4.3/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I figured that the vtk dynamic libraries of PV have the ending
>>>>>> *-pv4.3.so
>>>>>> which seems to be the reason why the linker does not find them. If I
>>>>>> create
>>>>>> symbolic links to these files without the extension:
>>>>>>
>>>>>> cd /opt/compilation/paraview-git_build/lib/
>>>>>> for i in *-pv*.so; do ln -s $i ${i%-pv*}.so; done
>>>>>>
>>>>>> and adding -L/opt/compilation/paraview-git_build/lib/ to
>>>>>> CMAKE_CXX_FLAGS
>>>>>> the compilation of ITK succeeds.
>>>>>>
>>>>>> I wonder, is that the way it's meant to be done?
>>>>>>
>>>>>>
>>>>>>
>>>>>>> What am I missing in my configuration of PV and ITK?
>>>>>>>
>>>>>>> When and where should I specify:
>>>>>>> CMAKE_CXX_FLAGS -fPIC
>>>>>>> BUILD_SHARED_LIBS ON/OFF
>>>>>>>
>>>>>>> Is this the right VTK_DIR specification for ITK:
>>>>>>> /opt/compilation/ParaView-v4.3.1/build/VTK
>>>>>>> or
>>>>>>> /opt/paraview-4.3.1_git/lib/cmake/paraview-4.3
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Many thanks for any help or hints.
>>>>>>> Roman
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dr. Roman Grothausmann
>>>>>>
>>>>>> Tomographie und Digitale Bildverarbeitung
>>>>>> Tomography and Digital Image Analysis
>>>>>>
>>>>>> Institut für Funktionelle und Angewandte Anatomie, OE 4120
>>>>>> Medizinische Hochschule Hannover
>>>>>> Carl-Neuberg-Str. 1
>>>>>> D-30625 Hannover
>>>>>>
>>>>>> Tel. +49 511 532-9574
>>>>>> _____________________________________
>>>>>> Powered by www.kitware.com
>>>>>>
>>>>>> Visit other Kitware open-source projects at
>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>
>>>>>> Kitware offers ITK Training Courses, for more information visit:
>>>>>> http://www.kitware.com/products/protraining.php
>>>>>>
>>>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>>>
>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>> http://public.kitware.com/mailman/listinfo/insight-users
>>>>
>>>>
>>>>
>>>> --
>>>> Dr. Roman Grothausmann
>>>>
>>>> Tomographie und Digitale Bildverarbeitung
>>>> Tomography and Digital Image Analysis
>>>>
>>>> Institut für Funktionelle und Angewandte Anatomie, OE 4120
>>>> Medizinische Hochschule Hannover
>>>> Carl-Neuberg-Str. 1
>>>> D-30625 Hannover
>>>>
>>>> Tel. +49 511 532-9574
>>
>>
>> --
>> Dr. Roman Grothausmann
>>
>> Tomographie und Digitale Bildverarbeitung
>> Tomography and Digital Image Analysis
>>
>> Institut für Funktionelle und Angewandte Anatomie, OE 4120
>> Medizinische Hochschule Hannover
>> Carl-Neuberg-Str. 1
>> D-30625 Hannover
>>
>> Tel. +49 511 532-9574
--
Dr. Roman Grothausmann
Tomographie und Digitale Bildverarbeitung
Tomography and Digital Image Analysis
Institut für Funktionelle und Angewandte Anatomie, OE 4120
Medizinische Hochschule Hannover
Carl-Neuberg-Str. 1
D-30625 Hannover
Tel. +49 511 532-9574
More information about the Insight-users
mailing list