[vtkusers] Building VTK on a BlueGene/P

François Bissey fbissey at slingshot.co.nz
Thu Sep 5 18:45:24 EDT 2013


Hi David,

On 2013-09-06 02:15, David E DeMarle wrote:
> 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.
> 

I may have to source the book as the wiki has not been clear enough for 
me.

> 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.
> 

I had actually compiled and installed vtk for the host. What I didn't 
realise
is that you need to point to the build directory (which I had 
conveniently
removed) not the installed copy.

> 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.
> 

Yes I understand that will be needed. I may post again if I require 
further
assistance.

Francois



More information about the vtkusers mailing list