← All tasks
cppcolmap/colmap #2101Not a task: not reproduced

gtest/gtest.h needed even though TESTS_ENABLED=NO

envgap__colmap__colmap-2101

01 / FAILURE SIGNATURE

As reported upstream

/home/nero/repos/external/colmap/src/colmap/util/testing.cc:39:10: fatal error: gtest/gtest.h: No such file or directory
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
bb00ccc6e4b7b54fcb823970ed264bfc1f412c13
Manifest
src/colmap/util/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

colmap/colmap #2101 · read the original issue
**Describe the bug**

Following the installation instructions on linux (Ubuntu 22.04) https://colmap.github.io/install.html fails at compiling `testing.cc`



```sh

[2/111] Building CXX object src/colmap/util/CMakeFiles/colmap_util.dir/testing.cc.o

FAILED: src/colmap/util/CMakeFiles/colmap_util.dir/testing.cc.o 

/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DCOLMAP_GUI_ENABLED -DCOLMAP_OPENGL_ENABLED -DCOLMAP_OPENMP_ENABLED -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/nero/repos/external/colmap/src -isystem /usr/include/eigen3 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -Wno-maybe-uninitialized -Wall -std=c++14 -O3 -DNDEBUG -std=gnu++14 -fPIC -MD -MT src/colmap/util/CMakeFiles/colmap_util.dir/testing.cc.o -MF src/colmap/util/CMakeFiles/colmap_util.dir/testing.cc.o.d -o src/colmap/util/CMakeFiles/colmap_util.dir/testing.cc.o -c /home/nero/repos/external/colmap/src/colmap/util/testing.cc

/home/nero/repos/external/colmap/src/colmap/util/testing.cc:39:10: fatal error: gtest/gtest.h: No such file or directory

   39 | #include <gtest/gtest.h>

      |          ^~~~~~~~~~~~~~~

compilation terminated.

```



Without source modifications one needs to install the package `libgtest-dev` for compilation to work (as described in https://github.com/colmap/colmap/issues/2070)



**To Reproduce**

Steps to reproduce the behavior:

follow installation instructions from: https://colmap.github.io/install.html#linux



1. install dependencies:

```sh

sudo apt-get install \

    git \

    cmake \

    ninja-build \

    build-essential \

    libboost-program-options-dev \

    libboost-filesystem-dev \

    libboost-graph-dev \

    libboost-system-dev \

    libboost-test-dev \

    libeigen3-dev \

    libflann-dev \

    libfreeimage-dev \

    libmetis-dev \

    libgoogle-glog-dev \

    libgflags-dev \

    libsqlite3-dev \

    libglew-dev \

    qtbase5-dev \

    libqt5opengl5-dev \

    libcgal-dev \

    libceres-dev

```

2. configure and build project

```sh

cmake -S . -B build -GNinja

cmake --build build

```

3. get compillation error





**Expected behavior**

When `TESTS_ENABLED=NO` the project should compile without installing package `libgtest-dev`



**Environment:**

 - OS: Ubuntu 22.04

 - COLMAP Version: bb00ccc6

  ```sh

  $ git describe

  1.0-1653-gbb00ccc6

  ```

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]