stella-cv / stella_vslam

This is a unofficial fork of OpenVSLAM (https://github.com/xdspacelab/openvslam)
https://stella-cv.rtfd.io/en/latest/
Other
875 stars 374 forks source link

Docker Error - CMake 3.14 or higher is required. #479

Closed ajsnyde closed 1 year ago

ajsnyde commented 1 year ago

Describe the bug

Docker CMake version is too old to compile g2o.

CMake 3.14 or higher is required. You are running version 3.10.2

To Reproduce

Running sudo docker build -t stella_vslam-desktop -f Dockerfile.desktop . --build-arg NUM_THREADS=4, and get this:



 => ERROR [ 6/16] RUN set -x &&   git clone https://github.com/RainerKuemmerle/g2o.git &&   cd g2o &&   git checkout ed40a5bb028566fd56a78fd7b04921b613492d6f &&   mkdir -p b  3.5s
------                                                                                                                                                                              
 > [ 6/16] RUN set -x &&   git clone https://github.com/RainerKuemmerle/g2o.git &&   cd g2o &&   git checkout ed40a5bb028566fd56a78fd7b04921b613492d6f &&   mkdir -p build &&   cd build &&   cmake     -DCMAKE_BUILD_TYPE=Release     -DCMAKE_INSTALL_PREFIX=/usr/local     -DBUILD_SHARED_LIBS=ON     -DBUILD_UNITTESTS=OFF     -DG2O_USE_CHOLMOD=OFF     -DG2O_USE_CSPARSE=ON     -DG2O_USE_OPENGL=OFF     -DG2O_USE_OPENMP=OFF     -DG2O_BUILD_APPS=OFF     -DG2O_BUILD_EXAMPLES=OFF     -DG2O_BUILD_LINKED_APPS=OFF     .. &&   make -j13 &&   make install &&   cd /tmp &&   rm -rf *:                                                                                                                                                    
#0 0.281 + git clone https://github.com/RainerKuemmerle/g2o.git                                                                                                                     
#0 0.283 Cloning into 'g2o'...
#0 3.075 + cd g2o
#0 3.075 + git checkout ed40a5bb028566fd56a78fd7b04921b613492d6f
#0 3.130 Note: checking out 'ed40a5bb028566fd56a78fd7b04921b613492d6f'.
#0 3.130 
#0 3.130 You are in 'detached HEAD' state. You can look around, make experimental
#0 3.130 changes and commit them, and you can discard any commits you make in this
#0 3.130 state without impacting any branches by performing another checkout.
#0 3.130 
#0 3.130 If you want to create a new branch to retain commits you create, you may
#0 3.130 do so (now or later) by using -b with the checkout command again. Example:
#0 3.130 
#0 3.130   git checkout -b <new-branch-name>
#0 3.130 
#0 3.130 HEAD is now at ed40a5bb Merge pull request #619 from RainerKuemmerle/rainer/cholmod_internal
#0 3.130 + mkdir -p build
#0 3.131 + cd build
#0 3.131 + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON -DBUILD_UNITTESTS=OFF -DG2O_USE_CHOLMOD=OFF -DG2O_USE_CSPARSE=ON -DG2O_USE_OPENGL=OFF -DG2O_USE_OPENMP=OFF -DG2O_BUILD_APPS=OFF -DG2O_BUILD_EXAMPLES=OFF -DG2O_BUILD_LINKED_APPS=OFF ..
#0 3.141 CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
#0 3.141   CMake 3.14 or higher is required.  You are running version 3.10.2
#0 3.141 
#0 3.141 
#0 3.141 -- Configuring incomplete, errors occurred!
------
Dockerfile.desktop:85
--------------------
  84 |     WORKDIR /tmp
  85 | >>> RUN set -x && \
  86 | >>>   git clone https://github.com/RainerKuemmerle/g2o.git && \
  87 | >>>   cd g2o && \
  88 | >>>   git checkout ${G2O_COMMIT} && \
  89 | >>>   mkdir -p build && \
  90 | >>>   cd build && \
  91 | >>>   cmake \
  92 | >>>     -DCMAKE_BUILD_TYPE=Release \
  93 | >>>     -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} \
  94 | >>>     -DBUILD_SHARED_LIBS=ON \
  95 | >>>     -DBUILD_UNITTESTS=OFF \
  96 | >>>     -DG2O_USE_CHOLMOD=OFF \
  97 | >>>     -DG2O_USE_CSPARSE=ON \
  98 | >>>     -DG2O_USE_OPENGL=OFF \
  99 | >>>     -DG2O_USE_OPENMP=OFF \
 100 | >>>     -DG2O_BUILD_APPS=OFF \
 101 | >>>     -DG2O_BUILD_EXAMPLES=OFF \
 102 | >>>     -DG2O_BUILD_LINKED_APPS=OFF \
 103 | >>>     .. && \
 104 | >>>   make -j${NUM_THREADS} && \
 105 | >>>   make install && \
 106 | >>>   cd /tmp && \
 107 | >>>   rm -rf *
 108 |     ENV g2o_DIR=${CMAKE_INSTALL_PREFIX}/lib/cmake/g2o
--------------------
ERROR: failed to solve: process "/bin/sh -c set -x &&   git clone https://github.com/RainerKuemmerle/g2o.git &&   cd g2o &&   git checkout ${G2O_COMMIT} &&   mkdir -p build &&   cd build &&   cmake     -DCMAKE_BUILD_TYPE=Release     -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}     -DBUILD_SHARED_LIBS=ON     -DBUILD_UNITTESTS=OFF     -DG2O_USE_CHOLMOD=OFF     -DG2O_USE_CSPARSE=ON     -DG2O_USE_OPENGL=OFF     -DG2O_USE_OPENMP=OFF     -DG2O_BUILD_APPS=OFF     -DG2O_BUILD_EXAMPLES=OFF     -DG2O_BUILD_LINKED_APPS=OFF     .. &&   make -j${NUM_THREADS} &&   make install &&   cd /tmp &&   rm -rf *" did not complete successfully: exit code: 1
~/stella_vslam (main)$ cmake -v
CMake Error: Unknown argument -v
CMake Error: Run 'cmake --help' for all supported options.
ajsnyde commented 1 year ago

I corrected the issue by changing the Docker file to use Ubuntu 20.04 instead of 18.04. I haven't tested any functionality yet, I was just about to build the image.

ajsnyde commented 1 year ago

Oh lol you just did that. Nice! Is there a way I can donate a little? I appreciate the super-fast response time

ymd-stella commented 1 year ago

I think it will work on 20.04 as it has been tested by CI.

ymd-stella commented 1 year ago

Just reporting bugs would be appreciated.