# tensorflow lite dev setup failing on Ubuntu 22

Source: https://forum.modalai.com/topic/4569/tensorflow-lite-dev-setup-failing-on-ubuntu-22
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2025-07-06 17:28:22 UTC by Nse Obot
Replies: 7 · Views: 1810

## Nse Obot · 2025-07-06 17:28:22 UTC

Dear ModalAI, 

Below are the steps I took to get tensorflow lite working on a voxl2 sterling drone. The main issue is that the build script on my dev machine is failing on Modal SDK dependencies. 

Install Ubuntu Desktop 22.04 on laptop
https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview

Install docker
https://docs.docker.com/install/linux/docker-ce/ubuntu/

Create a modal ai developer account
https://developer.modalai.com/

Download Voxl-cross V4.0
https://developer.modalai.com/asset/eula-download/173

Install voxl-docker
https://gitlab.com/voxl-public/support/voxl-docker

Read through the Voxl2 SDK feature page on Deep Learning
https://docs.modalai.com/voxl-tflite-server/

Go to the source section to find the Gitlab source code for tensor flow lite on voxl
https://gitlab.com/voxl-public/voxl-sdk/services/voxl-tflite-server

Follow the instructions for chipset qrb5165 (voxl-2)
Failing on step 3. Build scripts. Console log below:

```
./build.sh qrb5165
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

WARN you're using a deprecated toolchain, please use the new toolchains:
WARN qrb5165_ubun1_18.04_aarch64.toolchain.cmake
WARN qrb5165_ubun2_20.04_aarch64.toolchain.cmake
-- ---------------------------------------------------------
-- Using voxl-cross 64-bit toolchain for QRB5165 ubun1 18.04
-- C Compiler 	: /usr/bin/aarch64-linux-gnu-gcc-10
-- C++ Compiler   : /usr/bin/aarch64-linux-gnu-g++-10
-- Sysroot    	: /opt/sysroots/qrb5165_1
-- C flags    	: -idirafter /usr/include -march=armv8.2-a
-- CXX flags  	: -idirafter /usr/include -march=armv8.2-a
-- EXE Link Flags : -L/opt/sysroots/qrb5165_1/usr/lib/aarch64-linux-gnu -L/opt/sysroots/qrb5165_1/lib -L/opt/sysroots/qrb5165_1/usr/lib -L/usr/lib64 -L/usr/lib
-- SO Link Flags  : -L/opt/sysroots/qrb5165_1/usr/lib/aarch64-linux-gnu -L/opt/sysroots/qrb5165_1/lib -L/opt/sysroots/qrb5165_1/usr/lib -L/usr/lib64 -L/usr/lib
CMake Deprecation Warning at src/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/root/build
[  6%] Building CXX object src/CMakeFiles/voxl-tflite-server.dir/config_file.cpp.o
[ 13%] Building CXX object src/CMakeFiles/voxl-tflite-server.dir/inference_handler.cpp.o
In file included from /home/root/src/config_file.cpp:1:
/home/root/src/../include/config_file.h:37:10: fatal error: modal_json.h: No such file or directory
   37 | #include <modal_json.h>
  	|      	^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/voxl-tflite-server.dir/build.make:79: src/CMakeFiles/voxl-tflite-server.dir/config_file.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/root/src/inference_handler.cpp:1:
/home/root/src/../include/inference_handler.h:14:10: fatal error: modal_pipe.h: No such file or directory
   14 | #include <modal_pipe.h>
  	|      	^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/voxl-tflite-server.dir/build.make:107: src/CMakeFiles/voxl-tflite-server.dir/inference_handler.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:106: src/CMakeFiles/voxl-tflite-server.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

```

Resolution attempts

Configuring Ubuntu Package manager
https://docs.modalai.com/configure-pkg-manager/

Fails on: The repository does not have release file. 
This indicates that the Voxl2 SDK does not have Ubuntu 22.04 support yet. 

Running Docker on the Sterling
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04
Policy check indicates no repo is available for docker-ce 
apt-cache policy docker-ce
```
docker-ce:
  Installed: (none)
  Candidate: (none)
  Version table:
```
This leads to no package found
```
sudo apt install docker-ce
Reading package lists... Done
Building dependency tree  	 
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  docker-ce-cli:amd64

E: Package 'docker-ce' has no installation candidate
```
Also tried Modal AI’s docs on docker  installation
https://docs.modalai.com/voxl-docker-and-cross-installation/#installing-voxl-docker

Fails on docker.com resolve host
```
curl -fsSL https://get.docker.com -o get-docker.sh
curl: (6) Could not resolve host: get.docker.com
```

## Reply by arcj · 2025-07-07 15:35:09 UTC

I'm having the same issue trying to compile the latest tflite-server from gitlab. I haven't even changed any code and it still did not build for qrb5165. It has multiple missing files such as modal_json.h, modal_pipe.h, c_api_internal.h, delegate.h, etc. 

I copied and pasted the json and pipe headers from the libmodal repositories from voxl SDK/Code Libs on Gitlab and that fixed the first two. But still got the file not found error. 

![Screenshot from 2025-07-07 11-34-21.png](https://forum.modalai.com/assets/uploads/files/1751902501577-screenshot-from-2025-07-07-11-34-21.png)

## Reply by Alex Kushleyev (ModalAI staff) · 2025-07-07 21:59:04 UTC (in reply to arcj)

@arcj and @Nse-Obot ,

Yes we just saw that there is an issue in the build.

However, it looks like the following workaround is working:

- use `voxl-cross:V2.7`
- use `./install_build_deps.sh qrb5165 sdk-1.3` to install the dependencies
- `./clean.sh`
- `./build.sh qrb5165`

Please try!

We will work on fixing the build for `voxl-cross:V4.0`. The native build on VOXL2 is also failing at the moment.

Alex

## Reply by Nse Obot · 2025-07-08 18:35:12 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev That worked! Thanks.

## Reply by Ege Yüceel · 2025-07-09 04:03:42 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev I was having the same problem and thanks to this answer I can build without an issue. But the only thing I am worried is when I deploy this to my Voxl 2 machine with SDK version 1.4.1 and voxl-tflite-server version 0.3.9, would it break anything? My aim is to develop some custom tflite application.

## Reply by Alex Kushleyev (ModalAI staff) · 2025-07-09 04:51:58 UTC (in reply to Ege Yüceel)

@Ege-Yüceel , in this case, i believe it should be OK to cross compile the `voxl-tflite-server` with dependencies from SDK 1.3 but deploy the application to VOXL2 that is running SDK 1.4.1. This is because there were no interface changes that would affect voxl-tflite-server (to my knowledge).

We will try to resolve the build issue soon, it should be a matter of fixing up CMakeLists file.

Alex

## Reply by Ege Yüceel · 2025-07-11 22:25:08 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev Thanks for the response.

## Reply by arcj · 2026-08-05 17:52:06 UTC

I tried cross-compiling latest tflite-server on voxl-corss:V4.4 and got the same error despite adding /usr/include/ in the src/Cmakelist.txt
