Compliling on mac

439 views
Skip to first unread message

Jeremiah Alfrey

unread,
Dec 13, 2021, 11:30:41 PM12/13/21
to COLMAP
I followed the instructions here: 
https://colmap.github.io/install.html
The GUI failed to launch for me. Checking it looks like I don't have Qt5 but I do have Qt6

Could you please update the code to work with Qt6? 

Attempts in vain below. :0 

Trying to manually put the path in for Qt6 as the argument: 

cmake .. -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt6

Generates the following error:

Super-Villian-Consulting:build aernan$ colmap gui

ERROR: Cannot start colmap GUI; colmap was built without GUI support or QT dependency is missing.

Super-Villian-Consulting:build aernan$ cmake .. -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt6

-- Found required Ceres dependency: Eigen version 3.4.0 in /usr/local/include/eigen3

-- Found required Ceres dependency: glog

-- Found required Ceres dependency: gflags

-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, AccelerateSparse, SchurSpecializations, Multithreading]

-- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found version "1.76.0") found components: program_options filesystem graph system unit_test_framework 

-- Found Eigen

--   Includes : /usr/local/include/eigen3

-- Found FreeImage

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libfreeimage.dylib

-- Found Glog

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libglog.dylib

-- Found Glew

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libGLEW.dylib

-- Using header-only CGAL

-- Targetting Unix Makefiles

-- Using /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ compiler.

-- DARWIN_VERSION=21

-- Mac Leopard detected

-- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found suitable version "1.76.0", minimum required is "1.48")  

-- Boost include dirs: /usr/local/include

-- Boost libraries:    

CMake Warning at CMakeLists.txt:119 (find_package):

  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has

  asked CMake to find a package configuration file provided by "Qt5", but

  CMake did not find one.


  Could not find a package configuration file provided by "Qt5" (requested

  version 5.4) with any of the following names:


    Qt5Config.cmake

    qt5-config.cmake


  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"

  to a directory containing one of the above files.  If "Qt5" provides a

  separate development package or SDK, be sure it has been installed.



-- Disabling GUI will also disable OpenGL

-- Found CGAL

--   Includes : /usr/local/include

--   Libraries : CGAL

-- Build type not specified, using Release

-- Enabling SIMD support

-- Disabling OpenMP support

-- Enabling interprocedural optimization

-- Disabling CUDA support

-- Disabling GUI support

-- Disabling OpenGL support

-- Disabling profiling support

-- Enabling CGAL support

-- Configuring done

-- Generating done

-- Build files have been written to: /Users/aernan/workspace/colmap/build

Super-Villian-Consulting:build aernan$ make clean

Super-Villian-Consulting:build aernan$ pwd

/Users/aernan/workspace/colmap/build

Super-Villian-Consulting:build aernan$ cmake .. -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt6

-- Found required Ceres dependency: Eigen version 3.4.0 in /usr/local/include/eigen3

-- Found required Ceres dependency: glog

-- Found required Ceres dependency: gflags

-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, AccelerateSparse, SchurSpecializations, Multithreading]

-- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found version "1.76.0") found components: program_options filesystem graph system unit_test_framework 

-- Found Eigen

--   Includes : /usr/local/include/eigen3

-- Found FreeImage

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libfreeimage.dylib

-- Found Glog

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libglog.dylib

-- Found Glew

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libGLEW.dylib

-- Using header-only CGAL

-- Targetting Unix Makefiles

-- Using /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ compiler.

-- DARWIN_VERSION=21

-- Mac Leopard detected

-- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found suitable version "1.76.0", minimum required is "1.48")  

-- Boost include dirs: /usr/local/include

-- Boost libraries:    

CMake Warning at CMakeLists.txt:119 (find_package):

  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has

  asked CMake to find a package configuration file provided by "Qt5", but

  CMake did not find one.


  Could not find a package configuration file provided by "Qt5" (requested

  version 5.4) with any of the following names:


    Qt5Config.cmake

    qt5-config.cmake


  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"

  to a directory containing one of the above files.  If "Qt5" provides a

  separate development package or SDK, be sure it has been installed.



-- Disabling GUI will also disable OpenGL

-- Found CGAL

--   Includes : /usr/local/include

--   Libraries : CGAL

-- Build type not specified, using Release

-- Enabling SIMD support

-- Disabling OpenMP support

-- Enabling interprocedural optimization

-- Disabling CUDA support

-- Disabling GUI support

-- Disabling OpenGL support

-- Disabling profiling support

-- Enabling CGAL support

-- Configuring done

-- Generating done

-- Build files have been written to: /Users/aernan/workspace/colmap/build

Super-Villian-Consulting:build aernan$ cmake .. -DQt6_DIR=/usr/local/opt/qt/lib/cmake/Qt6

-- Found required Ceres dependency: Eigen version 3.4.0 in /usr/local/include/eigen3

-- Found required Ceres dependency: glog

-- Found required Ceres dependency: gflags

-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, AccelerateSparse, SchurSpecializations, Multithreading]

-- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found version "1.76.0") found components: program_options filesystem graph system unit_test_framework 

-- Found Eigen

--   Includes : /usr/local/include/eigen3

-- Found FreeImage

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libfreeimage.dylib

-- Found Glog

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libglog.dylib

-- Found Glew

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libGLEW.dylib

-- Using header-only CGAL

-- Targetting Unix Makefiles

-- Using /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ compiler.

-- DARWIN_VERSION=21

-- Mac Leopard detected

-- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found suitable version "1.76.0", minimum required is "1.48")  

-- Boost include dirs: /usr/local/include

-- Boost libraries:    

CMake Warning at CMakeLists.txt:119 (find_package):

  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has

  asked CMake to find a package configuration file provided by "Qt5", but

  CMake did not find one.


  Could not find a package configuration file provided by "Qt5" (requested

  version 5.4) with any of the following names:


    Qt5Config.cmake

    qt5-config.cmake


  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"

  to a directory containing one of the above files.  If "Qt5" provides a

  separate development package or SDK, be sure it has been installed.



-- Disabling GUI will also disable OpenGL

-- Found CGAL

--   Includes : /usr/local/include

--   Libraries : CGAL

-- Build type not specified, using Release

-- Enabling SIMD support

-- Disabling OpenMP support

-- Enabling interprocedural optimization

-- Disabling CUDA support

-- Disabling GUI support

-- Disabling OpenGL support

-- Disabling profiling support

-- Enabling CGAL support

-- Configuring done

-- Generating done

CMake Warning:

  Manually-specified variables were not used by the project:


    Qt6_DIR



-- Build files have been written to: /Users/aernan/workspace/colmap/build


Wayne Cochran

unread,
Dec 14, 2021, 11:04:01 AM12/14/21
to COLMAP
You are probably going to have to install Qt5. Hopefully you can find a way to have both Qt5 and Qt6 installed.
I used macports to install Qt5 : https://ports.macports.org/port/qt5/
which installs under /opt/local
I would like to know what the different calls are. Qt is used by colmap for more than the UI -- Qt is used to load boilerplate
stuff for GL shaders iin  non UI programs (which is really awkward, but works as long it's not on a sub-thread);
You will see this pattern in places (e.g. line 194 in https://github.com/colmap/colmap/blob/dev/src/exe/feature.cc)

std::unique_ptr<QApplication> app;

if (useGpu && kUseOpenGL) {

  app.reset(new QApplication(argc, argv));

}

It doesn't look like this stuff changed in Qt6, so there must be something in the UI code that is differerent.

Jeremiah Alfrey

unread,
Dec 14, 2021, 4:37:43 PM12/14/21
to COLMAP
Found/install macports (throwback). 
Got qt5 compiled/installed
Found full path the qt5 lib directory. 

SuperVinsulting:build aernan$ cmake .. -DQt5_DIR=/opt/local/libexec/qt5/lib

CMake Warning at /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/Platform/Darwin-Initialize.cmake:303 (message):

  Ignoring CMAKE_OSX_SYSROOT value:


   /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk


  because the directory does not exist.

Call Stack (most recent call first):

  /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:21 (include)

  CMakeLists.txt:34 (project)



-- Found required Ceres dependency: Eigen version 3.4.0 in /usr/local/include/eigen3

-- Found required Ceres dependency: glog

-- Found required Ceres dependency: gflags

-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, AccelerateSparse, SchurSpecializations, Multithreading]

-- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found version "1.76.0") found components: program_options filesystem graph system unit_test_framework 

-- Found Eigen

--   Includes : /usr/local/include/eigen3

-- Found FreeImage

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libfreeimage.dylib

-- Found Glog

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libglog.dylib

-- Found Glew

--   Includes : /usr/local/include

--   Libraries : /usr/local/lib/libGLEW.dylib

-- Using header-only CGAL

-- Targetting Unix Makefiles

-- Using /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ compiler.

-- DARWIN_VERSION=21

-- Mac Leopard detected

-- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found suitable version "1.76.0", minimum required is "1.48")  

-- Boost include dirs: /usr/local/include

-- Boost libraries:    

CMake Error at /opt/local/libexec/qt5/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):

  Failed to find "gl.h" in

  "/System/Library/Frameworks/OpenGL.framework/Headers;/System/Library/Frameworks/AGL.framework/Headers".

Call Stack (most recent call first):

  /opt/local/libexec/qt5/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:227 (include)

  /opt/local/libexec/qt5/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:93 (find_package)

  /opt/local/libexec/qt5/lib/cmake/Qt5OpenGL/Qt5OpenGLConfig.cmake:93 (find_package)

  /opt/local/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)

  CMakeLists.txt:119 (find_package)



-- Configuring incomplete, errors occurred!

See also "/Users/aernan/workspace/colmap/build/CMakeFiles/CMakeOutput.log".

See also "/Users/aernan/workspace/colmap/build/CMakeFiles/CMakeError.log".


Reply all
Reply to author
Forward
0 new messages