# vtk compile error on embedded linux

**URL:** https://discourse.vtk.org/t/vtk-compile-error-on-embedded-linux/1912
**Category:** Support
**Tags:** proposal
**Created:** [October 11, 2019, 2:43am UTC](https://discourse.vtk.org/t/vtk-compile-error-on-embedded-linux/1912 "2019-10-11T02:43:56Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![emily-5728](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/e/c0e974/32.png) [@emily-5728](https://discourse.vtk.org/u/emily-5728)
#### Post date: [October 11, 2019, 2:43am UTC](https://discourse.vtk.org/t/vtk-compile-error-on-embedded-linux/1912/1 "2019-10-11T02:43:56Z")

</div>

hello，  
I want to use the vtk library on the am5728 (armv7 core, run linux operating system) chip  
and use cmake-gui for cross-compilation on Ubuntu.  
The compiler prompts: system is unknown to make, for arm\_linux\_gnueabihf, that vtk does not support the use of arm linux? If I want to use it, what should I do with it? thank you!

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [October 11, 2019, 5:33pm UTC](https://discourse.vtk.org/t/vtk-compile-error-on-embedded-linux/1912/2 "2019-10-11T17:33:40Z")

</div>

Cross compilation should be supported. First, you’ll need to make the compile tools to run on the host. That can be done with the `VTK_BUILD_COMPILE_TOOLS_ONLY` flag. You should then be able to point VTK at that and the rest of the build go fine. This is how the Android and iOS builds are set up.

Do you have more information? CMake flags? Error output?

Cc: @Chuck_Atkins @ken-martin

---

<div class="post-metadata">

### Author: ![emily-5728](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/e/c0e974/32.png) [@emily-5728](https://discourse.vtk.org/u/emily-5728)
#### Post date: [October 12, 2019, 7:38am UTC](https://discourse.vtk.org/t/vtk-compile-error-on-embedded-linux/1912/3 "2019-10-12T07:38:27Z")

</div>

Hi,  
Thanks for your reply.

Download the vtk-7.1.1 source code, compile using cmake-gui(version: 3.12.2),  
the configuration information is as follows:

 ![vtk_am5728_cfg](https://discourse.vtk.org/uploads/default/original/1X/ce93bde699bd13e38aa49a14451201e255a93b0b.png)

during the compilation process, report the following error:

 ![vtk_err](https://discourse.vtk.org/uploads/default/original/1X/368829a8753ea406b3f6a36fcb6ae7c70ea321e9.png)

please help see what caused it? How should I modify it? Thank you!

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [October 12, 2019, 3:08pm UTC](https://discourse.vtk.org/t/vtk-compile-error-on-embedded-linux/1912/4 "2019-10-12T15:08:30Z")

</div>

Oh, I’m not familiar enough with 7.1.1 to know off-hand anymore. It certainly won’t work the way I described.

One thing I see is that the target OS should just be “Linux”. I’d first try getting a simple project to work with the cross-compiling and then re-use the settings that work for it for VTK.

---

<div class="post-metadata">

### Author: ![emily-5728](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/e/c0e974/32.png) [@emily-5728](https://discourse.vtk.org/u/emily-5728)
#### Post date: [October 16, 2019, 1:45am UTC](https://discourse.vtk.org/t/vtk-compile-error-on-embedded-linux/1912/5 "2019-10-16T01:45:14Z")

</div>

I’m sorry to bother you, but for cmake and vtk, I’m a new person. The problem is still unresolved. Could you please take a look at it for me?  
I need to use the vtk library on am5728 (CPU: armv7-based architecture, running the linux system),  
download the VTK-8.2.0 source code, compile it using cmake (version 3.12.2),  
and write the toolchain.cmake file, as follows:  
SET(CMAKE\_CXX\_COMPILER /home/tronlong/ti-processor-sdk-linux-am57xx-evm-03.01.00.06/linux-devkit/sysroots/x86\_64-arago-linux/usr/bin/arm-linux-gnueabihf-g++)  
SET(CMAKE\_C\_COMPILER /home/tronlong/ti-processor-sdk-linux-am57xx-evm-03.01.00.06/linux-devkit/sysroots/x86\_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc)  
SET(BUILID\_SHARED\_LIBS:BOOL ON)  
SET(CMAKE\_BUILD\_TYPE Release)  
SET(CMAKE\_INSTALL\_PREFIX /home/tronlong/ti-processor-sdk-linux-am57xx-evm-03.01.00.06/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib)  
SET(CMAKE\_SYSTEM\_NAME Linux -DCMAKE\_EXE\_LINKER=-lGLESv2)  
SET(CMAKE\_PREFIX\_PATH /home/tronlong/3d\_lib/VTK-8.2.0)

Compile with cmake-DMKAE\_TOOLCHAIN\_FILE=toolchain.cmake and report the following error:  
[root@tl VTK-8.2.0]# cmake -DMKAE\_TOOLCHAIN\_FILE=toolchain.cmake  
CMake Error at CMake/vtkCrossCompiling.cmake:24 (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.  
Call Stack (most recent call first):  
CMakeLists.txt:54 (include)

– Configuring incomplete, errors occurred!  
See also “/home/tronlong/3d\_lib/VTK-8.2.0/CMakeFiles/CMakeOutput.log”.  
[root@tl VTK-8.2.0]#

sorry, for VTK,cmake, I’m anewcomers。  
do FindVTKCompileTools.cmake and VTKCompileToolsConfig.cmake files need to be written by myself?  
Can you provide a sample reference?  
I would be very appreciated if you could help me through this issue.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [October 16, 2019, 1:23pm UTC](https://discourse.vtk.org/t/vtk-compile-error-on-embedded-linux/1912/6 "2019-10-16T13:23:35Z")

</div>

> [@emily-5728](#):
>
> -DMKAE\_TOOLCHAIN\_FILE

This should be `-DCMAKE_TOOLCHAIN_FILE`.

> [@emily-5728](#):
>
> SET(CMAKE\_SYSTEM\_NAME Linux -DCMAKE\_EXE\_LINKER=-lGLESv2)

Umm. `-D` flags don’t belong here.

I suggest getting a small CMake program to compile using your toolchain first. Once it works there, VTK can then be worked on. However, first, you will need to compile `VTKCompileTools` for your the build machine. I don’t remember the steps for that in 8.2. @ken-martin Is that documented somewhere?
