[vtkusers] Building VTK on a BlueGene/P

David E DeMarle dave.demarle at kitware.com
Thu Sep 5 10:15:35 EDT 2013


Hello Francois,

You best place to learn about cross compilation is chapter 8 of the CMake
book (Mastering CMake fifth edition). It explains cross compilation in
detail and uses VTK as an example project.

The gist of what you are missing is that for a complex project like VTK, in
which the build process itself creates and runs compile time executables
that generate code and do system introspection, you need to compile
twice. The first compile runs on and produces executables that run on the
host system. The second compile runs on (using the compile time executables
produced in the first pass) the host but produces executables that run on
the target system.

In your case you are doing the second pass and have not added the location
of the first pass into your CMAKE_PREFIX_PATH, so CMake can not find the
compile time executables it needs.

After that, you will also need to provide the results of the compile time
system introspection queries that the host side can not determine. It can't
because it has to submit and run those compile time executable on the
target system in order to determine the nature of the target system. To do
that you provide a TryRunResults file. It turns out not to be too hard to
generate that, CMake tells you exactly what to run and what to fill in. But
most likely you can just use the one in the ParaView superbuild project
(bgp_xlc) or the one in VTK/CMake/TryRunResults-VTK-bgl-gcc.cmake.

cheers and let us know how it goes,


David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Wed, Sep 4, 2013 at 10:08 PM, François Bissey <fbissey at slingshot.co.nz>wrote:

> Hi,
>
> I am trying to build vtk 6.0 on a BlueGene/P. I tried to configure
> the build with:
> ccmake -DCMAKE_SYSTEM_NAME=BlueGeneP-**static ../VTK6.0.0
>
> but cmake spit an error message:
> CMake Error at CMakeLists.txt:98 (find_package):
>    By not providing "FindVTKCompileTools.cmake" in CMAKE_MODULE_PATH this
>    project has asked CMake to find a package configuration file provided by
>    "VTKCompileTools", but CMake did not find one.
>
>    Could not find a package configuration file provided by
> "VTKCompileTools"
>    with any of the following names:
>
>      VTKCompileToolsConfig.cmake
>      vtkcompiletools-config.cmake
>
>    Add the installation prefix of "VTKCompileTools" to CMAKE_PREFIX_PATH or
>    set "VTKCompileTools_DIR" to a directory containing one of the above
> files.
>    If "VTKCompileTools" provides a separate development package or SDK, be
>    sure it has been installed.
>
> I cannot find any of these files anywhere. Are they files that I am
> supposed
> to provide for cross compilation? If so what should be in them? The wiki
> page
> on cross compiling with cmake doesn't really offer me any clues and neither
> does the code in CMakeLists.txt.
>
>
> --
> Dr François Bissey
> BlueFern team - http://www.bluefern.**canterbury.ac.nz<http://www.bluefern.canterbury.ac.nz>
> University of Canterbury
> New Zealand
> ______________________________**_________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_**FAQ <http://www.vtk.org/Wiki/VTK_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130905/821aeb7e/attachment.htm>


More information about the vtkusers mailing list