ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    tensorflow lite dev setup failing on Ubuntu 22

    Ask your questions right here!
    3
    4
    37
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Nse ObotN
      Nse Obot
      last edited by

      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
      
      1 Reply Last reply Reply Quote 0
      • A
        arcj
        last edited by

        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

        Alex KushleyevA 1 Reply Last reply Reply Quote 0
        • Alex KushleyevA
          Alex Kushleyev ModalAI Team @arcj
          last edited by

          @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

          Nse ObotN 1 Reply Last reply Reply Quote 1
          • Nse ObotN
            Nse Obot @Alex Kushleyev
            last edited by

            @Alex-Kushleyev That worked! Thanks.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB | Contributors