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

    Building new docker image error - Cmake version not good

    Software Development
    4
    10
    1397
    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.
    • M
      marian
      last edited by

      Hello,

      I'm trying to build a new docker image on Voxl Flight deck and I get this error:

      Step 10 : RUN cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -Bbuild/default -H.
      ---> Running in 88527c85a1aa
      CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
      CMake 3.13 or higher is required. You are running version 3.10.2

      In the existent image the verison is till 3.10.2 and is the newest as seeing below:

      root@apq8096:/home/MAVSDK/examples/takeoff_land# apt-get install cmake
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      cmake is already the newest version (3.10.2-1ubuntu2.18.04.2).
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

      Please let me know how to deal with it.

      1 Reply Last reply Reply Quote 0
      • Chad SweetC
        Chad Sweet ModalAI Team
        last edited by

        It looks like you need to be using a newer version of cmake. Can you share the Docker file? make sure you're running 'apt update' to get the latest packages

        1 Reply Last reply Reply Quote 0
        • Eric KatzfeyE
          Eric Katzfey ModalAI Team
          last edited by

          What file system are you using in your Docker? A version of Ubuntu?

          1 Reply Last reply Reply Quote 0
          • M
            marian
            last edited by

            @Chad-Sweet The docker file was downloaded from here https://gitlab.com/voxl-public/voxl-docker-images/voxl-docker-mavsdk-cpp

            The Docker file:
            yocto:/data/docker/mavsdk-cpp$ more Dockerfile
            FROM arm64v8/ubuntu:bionic

            WORKDIR /home

            RUN apt-get update
            RUN apt-get install cmake build-essential colordiff git doxygen -y
            RUN apt install git -y

            RUN git clone https://github.com/mavlink/MAVSDK.git

            WORKDIR /home/MAVSDK
            RUN git checkout main
            RUN git submodule update --init --recursive

            RUN cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -Bbuild/default -H.
            RUN cmake --build build/default --target install
            RUN ldconfig

            WORKDIR /home/MAVSDK/examples/takeoff_land
            COPY takeoff_and_land.cpp .
            RUN cmake .
            RUN make

            CMD ["/bin/bash"]

            @Eric-Katzfey I activated docker on VOXL with voxl-configure-docker.sh and i use the system versiondelivered with the voxl deck, I didn't change it.

            Here are the info of system version:

            / # bash
            yocto:/$ uname -a
            Linux apq8096 3.18.71-perf #1 SMP PREEMPT Sun Jun 6 19:41:01 UTC 2021 aarch64 GNU/Linux
            yocto:/$

            yocto:/$ docker run -it --rm --privileged --net=host gcr.io/modalai-public/voxl-mavsdk-cpp:v1.0 /bin/bash
            root@apq8096:/home/MAVSDK/examples/takeoff_land# uname -a
            Linux apq8096 3.18.71-perf #1 SMP PREEMPT Sun Jun 6 19:41:01 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
            root@apq8096:/home/MAVSDK/examples/takeoff_land#

            1 Reply Last reply Reply Quote 0
            • Eric KatzfeyE
              Eric Katzfey ModalAI Team
              last edited by

              I found these instructions for updating cmake https://askubuntu.com/questions/355565/how-do-i-install-the-latest-version-of-cmake-from-the-command-line. You can try these instructions to update the cmake version.

              1 Reply Last reply Reply Quote 0
              • M
                marian
                last edited by

                Hi @Eric-Katzfey I followed up the full reinstall of the cmake in docker on voxl platform, and it is goes well but once I exited from the docker and come back it put back the 3.10.2 version as show below:

                Screenshot 2022-06-16 at 10.39.29.png

                Could you, please, guide me forward to resolve this?

                Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                • Chad SweetC
                  Chad Sweet ModalAI Team
                  last edited by

                  This post on stack overflow might help? https://stackoverflow.com/questions/44480740/how-to-save-a-docker-container-state

                  1 Reply Last reply Reply Quote 0
                  • C
                    CY-1992
                    last edited by

                    @marian Try to use base image arm64v8/ubuntu:20.04 in Dockerfile. It has the latest cmake version.

                    FROM arm64v8/ubuntu:20.04
                    
                    1 Reply Last reply Reply Quote 0
                    • Eric KatzfeyE
                      Eric Katzfey ModalAI Team @marian
                      last edited by

                      @marian Anything you do while a docker image is running (as a container) isn't saved back to the base image. There are generally 2 ways to approach this. The preferred method is to add the new commands to the dockerfile and rebuild the image. The second approach is to run docker commit to save changes to a currently running container https://docs.docker.com/engine/reference/commandline/commit/.

                      1 Reply Last reply Reply Quote 0
                      • M
                        marian
                        last edited by

                        @CY-1992 said in Building new docker image error - Cmake version not good:

                        ubuntu:20.04

                        Thanks @CY-1992 is working just fine!

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