[vtkusers] Cross Compiling VTK 5.0.8 with Code Sourcery Toolchain for ARM A9!

Marc Ferland ferlandm at sonatest.com
Mon Dec 10 16:25:14 EST 2012


David Gobbi <david.gobbi at gmail.com> writes:

> Hi Anup,
>
>
> Cross compilation of VTK is a very advanced topic.  I've
> never cross-compiled VTK myself, so I definitely won't have all the
> answers, but I can give some pointers.
>
> You can see the reason for the failure here:
>
> Linking C executable ../../../bin/H5make_libsettings
> [  1%] Built target H5make_libsettings
> [  1%] Generating ../H5lib_settings.c
> ../../../bin/H5make_libsettings: 1: ../../../bin/H5make_libsettings:
> Syntax error: word unexpected (expecting ")")
>
> CMake is building an executable "H5make_libsettings" and is then
> trying to run it on your host... but of course this executable was
> compiled for your target and cannot run on your host.  The VTK build
> uses a few of these little custom executables as part of its build
> process.
>
> To do a cross-compile, you first need to do a native compile on your
> host machine to compile all of these little build tools.  Don't ask me
> to list them all... I don't have such a list.  Then, when you do your
> cross-compile (after you've done the native compile), you need to make
> sure that the natively-built executables that are needed during the
> build used in place of the cross-compiled ones.  The following web
> page might help:
>
> http://www.vtk.org/Wiki/CMake_Cross_Compiling
>
> That's about all the help I can give... good luck.
>

I think the tools are:
lproj
ProcessShader
vtkEncodeString
vtkmkg3states
H5detect
H5make_libsettings
vtkParseOGLExt
vtksysEncodeExecutable

As David said you'll first have to do a native build.
To make building these tools a little easier you could try this patch:
http://www.vtk.org/Bug/view.php?id=12686

Also, if you happen to be using yocto or openembedded I have recipe
files that can cross-compile vtk.

Cheers,
Marc



More information about the vtkusers mailing list