pycolmap icon indicating copy to clipboard operation
pycolmap copied to clipboard

ERROR: Failed building wheel for pycolmap [Windows 10]

Open devrajneupane opened this issue 2 years ago • 2 comments

While building pycolmap as instrcuted in the readme, it always throws long build error message indicating build failure.

Build Failure log

Processing c:\dev\pycolmap
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycolmap
  Building wheel for pycolmap (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [229 lines of output]
      running bdist_wheel
      running build
      running build_ext
      C:\dev\pycolmap\setup.py:29: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', out.decode()).group(1))
      -- Building for: Visual Studio 16 2019
      -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
      -- The C compiler identification is MSVC 19.29.30146.0
      -- The CXX compiler identification is MSVC 19.29.30146.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
      -- Looking for pthread_create in pthreads
      -- Looking for pthread_create in pthreads - not found
      -- Looking for pthread_create in pthread
      -- Looking for pthread_create in pthread - not found
      -- Check if compiler accepts -pthread
      -- Check if compiler accepts -pthread - no
      -- Found Threads: TRUE
      -- Looking for sgemm_
      -- Looking for sgemm_ - not found
      -- Looking for sgemm_
      -- Looking for sgemm_ - found
      -- Found BLAS: C:/dev/vcpkg/installed/x64-windows/debug/lib/openblas.lib
      -- Using VCPKG FindLAPACK from package 'lapack-reference'
      -- Looking for cheev_
      -- Looking for cheev_ - not found
      -- Looking for cheev_
      -- Looking for cheev_ - not found
      -- Looking for cheev_
      -- Looking for cheev_ - found
      -- A library with LAPACK API found.
      -- Found required Ceres dependency: Eigen version 3.4.0 in C:/dev/vcpkg/installed/x64-windows/share/eigen3
      -- Using VCPKG FindLAPACK from package 'lapack-reference'
      -- A library with LAPACK API found.
      -- Found Ceres version: 2.1.0 installed in: C:/dev/vcpkg/installed with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, SchurSpecializations, Multithreading]
      -- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found version "1.79.0") found components: program_options filesystem system unit_test_framework
      -- Found Eigen3: C:/dev/vcpkg/installed/x64-windows/include/eigen3 (Required is at least version "2.91.0")
      -- Found Eigen
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include/eigen3
      -- Found FreeImage
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/lib/FreeImage.lib
      -- Found Metis
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/metis.lib
      -- Found Glog
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/glog.lib
      -- Found OpenGL: opengl32
      -- Visual Leak Detector (VLD) is not found.
      -- Using header-only CGAL
      -- Targetting Visual Studio 16 2019
      -- Target build environment supports auto-linking
      -- Using VC toolset 142.
      -- Generator uses intermediate configuration directory: $(Configuration)
      -- Found GMP: debug;C:/dev/vcpkg/installed/x64-windows/debug/lib/gmp.lib;optimized;C:/dev/vcpkg/installed/x64-windows/debug/lib/gmp.lib
      -- Found MPFR: C:/dev/vcpkg/installed/x64-windows/debug/lib/mpfr.lib
      -- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found suitable version "1.79.0", minimum required is "1.48")
      -- Boost include dirs: C:/dev/vcpkg/installed/x64-windows/include
      -- Boost libraries:
      -- pybind11 v2.8.1
      -- Found PythonInterp: D:/<path/to/anaconda/environment>/python.exe (found version "3.9.13")
      -- Found PythonLibs: D:/<path/to/anaconda/environment>/libs/python39.lib
      -- Performing Test HAS_MSVC_GL_LTCG
      -- Performing Test HAS_MSVC_GL_LTCG - Failed
      Compiling bindings without CUDA support.
      -- Configuring done
      -- Generating done
      CMake Warning:
        Manually-specified variables were not used by the project:

          VERSION_INFO


      -- Build files have been written to: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release
      Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
      Copyright (C) Microsoft Corporation. All rights reserved.

        Checking Build System
        Building Custom Rule C:/dev/pycolmap/CMakeLists.txt
      cl : command line warning D9002: ignoring unknown option '-std=c++14' [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
        main.cc
      C:\dev\pycolmap\sift.cc(159,50): warning C4244: 'argument': conversion from 'Eigen::EigenBase<Derived>::Index' to 'int', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    Derived=Eigen::Ref<const Eigen::Matrix<float,-1,-1,1,-1,-1>,0,Eigen::OuterStride<-1>>
                ]
      C:\dev\pycolmap\sift.cc(158,50): warning C4244: 'argument': conversion from 'Eigen::EigenBase<Derived>::Index' to 'int', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    Derived=Eigen::Ref<const Eigen::Matrix<float,-1,-1,1,-1,-1>,0,Eigen::OuterStride<-1>>
                ]
      C:\dev\pycolmap\sift.cc(221,55): warning C4244: '=': conversion from 'double' to 'float', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\reconstruction/image.cc(50,62): warning C4267: 'argument': conversion from 'size_t' to 'const colmap::camera_t', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\helpers.h(70,63): warning C4101: 'ex': unreferenced local variable [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\estimators/absolute_pose.cc(183): message : see reference to function template instantiation 'void make_dataclass<colmap::AbsolutePoseEstimationOptions>(pybind11::class_<colmap::AbsolutePoseEstimationOptions>)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xmemory(681,1): warning C4267: 'argument': conversion from 'size_t' to 'const colmap::point2D_t', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(713): message : see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,size_t&,size_t&>(_Alloc &,_Objty *const ,size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    _Alloc=std::allocator<colmap::FeatureMatch>,
                    _Ty=colmap::FeatureMatch,
                    _Objty=colmap::FeatureMatch
                ]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(713): message : see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,size_t&,size_t&>(_Alloc &,_Objty *const ,size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    _Alloc=std::allocator<colmap::FeatureMatch>,
                    _Ty=colmap::FeatureMatch,
                    _Objty=colmap::FeatureMatch
                ]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(731): message : see reference to function template instantiation 'void std::vector<colmap::FeatureMatch,std::allocator<colmap::FeatureMatch>>::_Emplace_back_with_unused_capacity<size_t&,size_t&>(size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\estimators/two_view_geometry.cc(45): message : see reference to function template instantiation 'void std::vector<colmap::FeatureMatch,std::allocator<colmap::FeatureMatch>>::emplace_back<size_t&,size_t&>(size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
           Creating library C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/Release/pycolmap.lib and object C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/Release/pycolmap.exp
      LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_malloc_init referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_malloc_init [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_malloc_cleanup referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_malloc_cleanup [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(mincover.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(minconn.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(contig.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(debug.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayfm.c.obj) : error LNK2019: unresolved external symbol gk_errexit referenced in function libmetis__Greedy_KWayCutOptimize [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(minconn.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(coarsen.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(contig.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_sigtrap referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_sigtrap [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_siguntrap referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_siguntrap [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_log2 referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2019: unresolved external symbol gk_CPUSeconds referenced in function GrowBisectionNode2 [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(refine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(sfm.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(coarsen.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_cur_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_cur_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_idxsmalloc referenced in function libmetis__ipqInit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_realloc referenced in function libmetis__irealloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_realloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randinit referenced in function libmetis__isrand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randint64 referenced in function libmetis__irand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randint32 referenced in function libmetis__irand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2019: unresolved external symbol gk_rmpath referenced in function libmetis__graph_WriteToDisk [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreCreate referenced in function libmetis__AllocateWorkSpace [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreDestroy referenced in function libmetis__FreeWorkSpace [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreMalloc referenced in function libmetis__wspacemalloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcorePush referenced in function libmetis__wspacepush [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcorePop referenced in function libmetis__wspacepop [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\build\lib.win-amd64-cpython-39\pycolmap.cp39-win_amd64.pyd : fatal error LNK1120: 22 unresolved externals [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\dev\pycolmap\setup.py", line 80, in <module>
          setup(
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\core.py", line 177, in setup
          return run_commands(dist)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\core.py", line 193, in run_commands
          dist.run_commands()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\wheel\bdist_wheel.py", line 290, in run
          self.run_command('build')
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\command\build.py", line 24, in run
          super().run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "C:\dev\pycolmap\setup.py", line 34, in run
          self.build_extension(ext)
        File "C:\dev\pycolmap\setup.py", line 77, in build_extension
          subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
        File "D:\<path\to\anaconda\environment>lib\subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.
      ['cmake', 'C:\\dev\\pycolmap', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\dev\\pycolmap\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=D:\\<path\\to\\anaconda\\environment>\\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_TOOLCHAIN_FILE=C:\\dev\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\dev\\pycolmap\\build\\lib.win-amd64-cpython-39', '-DVCPKG_TARGET_TRIPLET=x64-windows', '-A', 'x64']
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycolmap
  Running setup.py clean for pycolmap
Failed to build pycolmap
WARNING: Error parsing requirements for jupyterthemes: [Errno 2] No such file or directory: 'd:\\<path\\to\\anaconda\\environment>\\lib\\site-packages\\jupyterthemes-0.20.0.dist-info\\METADATA'
Installing collected packages: pycolmap
  Running setup.py install for pycolmap ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pycolmap did not run successfully.
  │ exit code: 1
  ╰─> [233 lines of output]
      running install
      D:\<path\to\anaconda\environment>lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      C:\dev\pycolmap\setup.py:29: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', out.decode()).group(1))
      -- Building for: Visual Studio 16 2019
      -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
      -- The C compiler identification is MSVC 19.29.30146.0
      -- The CXX compiler identification is MSVC 19.29.30146.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
      -- Looking for pthread_create in pthreads
      -- Looking for pthread_create in pthreads - not found
      -- Looking for pthread_create in pthread
      -- Looking for pthread_create in pthread - not found
      -- Check if compiler accepts -pthread
      -- Check if compiler accepts -pthread - no
      -- Found Threads: TRUE
      -- Looking for sgemm_
      -- Looking for sgemm_ - not found
      -- Looking for sgemm_
      -- Looking for sgemm_ - found
      -- Found BLAS: C:/dev/vcpkg/installed/x64-windows/debug/lib/openblas.lib
      -- Using VCPKG FindLAPACK from package 'lapack-reference'
      -- Looking for cheev_
      -- Looking for cheev_ - not found
      -- Looking for cheev_
      -- Looking for cheev_ - not found
      -- Looking for cheev_
      -- Looking for cheev_ - found
      -- A library with LAPACK API found.
      -- Found required Ceres dependency: Eigen version 3.4.0 in C:/dev/vcpkg/installed/x64-windows/share/eigen3
      -- Using VCPKG FindLAPACK from package 'lapack-reference'
      -- A library with LAPACK API found.
      -- Found Ceres version: 2.1.0 installed in: C:/dev/vcpkg/installed with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, SchurSpecializations, Multithreading]
      -- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found version "1.79.0") found components: program_options filesystem system unit_test_framework
      -- Found Eigen3: C:/dev/vcpkg/installed/x64-windows/include/eigen3 (Required is at least version "2.91.0")
      -- Found Eigen
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include/eigen3
      -- Found FreeImage
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/lib/FreeImage.lib
      -- Found Metis
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/metis.lib
      -- Found Glog
      --   Includes : C:/dev/vcpkg/installed/x64-windows/include
      --   Libraries : C:/dev/vcpkg/installed/x64-windows/debug/lib/glog.lib
      -- Found OpenGL: opengl32
      -- Visual Leak Detector (VLD) is not found.
      -- Using header-only CGAL
      -- Targetting Visual Studio 16 2019
      -- Target build environment supports auto-linking
      -- Using VC toolset 142.
      -- Generator uses intermediate configuration directory: $(Configuration)
      -- Found GMP: debug;C:/dev/vcpkg/installed/x64-windows/debug/lib/gmp.lib;optimized;C:/dev/vcpkg/installed/x64-windows/debug/lib/gmp.lib
      -- Found MPFR: C:/dev/vcpkg/installed/x64-windows/debug/lib/mpfr.lib
      -- Found Boost: C:/dev/vcpkg/installed/x64-windows/include (found suitable version "1.79.0", minimum required is "1.48")
      -- Boost include dirs: C:/dev/vcpkg/installed/x64-windows/include
      -- Boost libraries:
      -- pybind11 v2.8.1
      -- Found PythonInterp: D:/<path/to/anaconda/environment>/python.exe (found version "3.9.13")
      -- Found PythonLibs: D:/<path/to/anaconda/environment>/libs/python39.lib
      -- Performing Test HAS_MSVC_GL_LTCG
      -- Performing Test HAS_MSVC_GL_LTCG - Failed
      Compiling bindings without CUDA support.
      -- Configuring done
      -- Generating done
      CMake Warning:
        Manually-specified variables were not used by the project:

          VERSION_INFO


      -- Build files have been written to: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release
      Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
      Copyright (C) Microsoft Corporation. All rights reserved.

        Checking Build System
        Building Custom Rule C:/dev/pycolmap/CMakeLists.txt
      cl : command line warning D9002: ignoring unknown option '-std=c++14' [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
        main.cc
      C:\dev\pycolmap\sift.cc(159,50): warning C4244: 'argument': conversion from 'Eigen::EigenBase<Derived>::Index' to 'int', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    Derived=Eigen::Ref<const Eigen::Matrix<float,-1,-1,1,-1,-1>,0,Eigen::OuterStride<-1>>
                ]
      C:\dev\pycolmap\sift.cc(158,50): warning C4244: 'argument': conversion from 'Eigen::EigenBase<Derived>::Index' to 'int', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    Derived=Eigen::Ref<const Eigen::Matrix<float,-1,-1,1,-1,-1>,0,Eigen::OuterStride<-1>>
                ]
      C:\dev\pycolmap\sift.cc(221,55): warning C4244: '=': conversion from 'double' to 'float', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\reconstruction/image.cc(50,62): warning C4267: 'argument': conversion from 'size_t' to 'const colmap::camera_t', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\helpers.h(70,63): warning C4101: 'ex': unreferenced local variable [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\estimators/absolute_pose.cc(183): message : see reference to function template instantiation 'void make_dataclass<colmap::AbsolutePoseEstimationOptions>(pybind11::class_<colmap::AbsolutePoseEstimationOptions>)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xmemory(681,1): warning C4267: 'argument': conversion from 'size_t' to 'const colmap::point2D_t', possible loss of data [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(713): message : see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,size_t&,size_t&>(_Alloc &,_Objty *const ,size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    _Alloc=std::allocator<colmap::FeatureMatch>,
                    _Ty=colmap::FeatureMatch,
                    _Objty=colmap::FeatureMatch
                ]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(713): message : see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,size_t&,size_t&>(_Alloc &,_Objty *const ,size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
                with
                [
                    _Alloc=std::allocator<colmap::FeatureMatch>,
                    _Ty=colmap::FeatureMatch,
                    _Objty=colmap::FeatureMatch
                ]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\vector(731): message : see reference to function template instantiation 'void std::vector<colmap::FeatureMatch,std::allocator<colmap::FeatureMatch>>::_Emplace_back_with_unused_capacity<size_t&,size_t&>(size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\estimators/two_view_geometry.cc(45): message : see reference to function template instantiation 'void std::vector<colmap::FeatureMatch,std::allocator<colmap::FeatureMatch>>::emplace_back<size_t&,size_t&>(size_t &,size_t &)' being compiled [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
           Creating library C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/Release/pycolmap.lib and object C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/Release/pycolmap.exp
      LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_malloc_init referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_malloc_init [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_malloc_cleanup referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_malloc_cleanup [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(mincover.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(minconn.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(contig.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(debug.c.obj) : error LNK2001: unresolved external symbol gk_free [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayfm.c.obj) : error LNK2019: unresolved external symbol gk_errexit referenced in function libmetis__Greedy_KWayCutOptimize [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(minconn.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(coarsen.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(contig.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_errexit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_sigtrap referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_sigtrap [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_siguntrap referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_siguntrap [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2019: unresolved external symbol gk_log2 referenced in function METIS_PartGraphKway [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2019: unresolved external symbol gk_CPUSeconds referenced in function GrowBisectionNode2 [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(refine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(sfm.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(coarsen.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_CPUSeconds [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_cur_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_cur_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kmetis.c.obj) : error LNK2001: unresolved external symbol gk_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(pmetis.c.obj) : error LNK2001: unresolved external symbol gk_jbufs [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_idxsmalloc referenced in function libmetis__ipqInit [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(initpart.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(srefine.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(kwayrefine.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(options.c.obj) : error LNK2001: unresolved external symbol gk_malloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_realloc referenced in function libmetis__irealloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2001: unresolved external symbol gk_realloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randinit referenced in function libmetis__isrand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randint64 referenced in function libmetis__irand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(gklib.c.obj) : error LNK2019: unresolved external symbol gk_randint32 referenced in function libmetis__irand [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(graph.c.obj) : error LNK2019: unresolved external symbol gk_rmpath referenced in function libmetis__graph_WriteToDisk [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreCreate referenced in function libmetis__AllocateWorkSpace [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreDestroy referenced in function libmetis__FreeWorkSpace [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcoreMalloc referenced in function libmetis__wspacemalloc [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcorePush referenced in function libmetis__wspacepush [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      metis.lib(wspace.c.obj) : error LNK2019: unresolved external symbol gk_mcorePop referenced in function libmetis__wspacepop [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      C:\dev\pycolmap\build\lib.win-amd64-cpython-39\pycolmap.cp39-win_amd64.pyd : fatal error LNK1120: 22 unresolved externals [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\pycolmap.vcxproj]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\dev\pycolmap\setup.py", line 80, in <module>
          setup(
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\core.py", line 177, in setup
          return run_commands(dist)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\core.py", line 193, in run_commands
          dist.run_commands()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\command\install.py", line 68, in run
          return orig.install.run(self)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\command\install.py", line 690, in run
          self.run_command('build')
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\command\build.py", line 24, in run
          super().run()
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\dist.py", line 1229, in run_command
          super().run_command(command)
        File "D:\<path\to\anaconda\environment>lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
          cmd_obj.run()
        File "C:\dev\pycolmap\setup.py", line 34, in run
          self.build_extension(ext)
        File "C:\dev\pycolmap\setup.py", line 77, in build_extension
          subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
        File "D:\<path\to\anaconda\environment>lib\subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.
      ['cmake', 'C:\\dev\\pycolmap', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\dev\\pycolmap\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=D:\\<path\\to\\anaconda\\environment>\\python.exe', '-DVERSION_INFO=0.2.0', '-DCMAKE_TOOLCHAIN_FILE=C:\\dev\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\dev\\pycolmap\\build\\lib.win-amd64-cpython-39', '-DVCPKG_TARGET_TRIPLET=x64-windows', '-A', 'x64']
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycolmap

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

following is the CMakeError.log file that i found under pycolmap\build\ dirctory

C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeError.log
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_58046.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  src.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CMAKE_HAVE_LIBC_PTHREAD /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_58046.dir\Debug\\" /Fd"cmTC_58046.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\src.c"

C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\src.c(1,10): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_58046.vcxproj]



Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_1e737.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=pthread_create /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_1e737.dir\Debug\\" /Fd"cmTC_1e737.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c"

LINK : fatal error LNK1104: cannot open file 'pthreads.lib' [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_1e737.vcxproj]




Determining if the function pthread_create exists in the pthread failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_54ff7.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=pthread_create /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_54ff7.dir\Debug\\" /Fd"cmTC_54ff7.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c"

LINK : fatal error LNK1104: cannot open file 'pthread.lib' [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_54ff7.vcxproj]




Determining if the function sgemm_ exists failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_f0573.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=sgemm_ /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_f0573.dir\Debug\\" /Fd"cmTC_f0573.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c"

CheckFunctionExists.obj : error LNK2019: unresolved external symbol sgemm_ referenced in function main [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_f0573.vcxproj]

C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\Debug\cmTC_f0573.exe : fatal error LNK1120: 1 unresolved externals [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_f0573.vcxproj]




Determining if the function cheev_ exists failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_824fb.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=cheev_ /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_824fb.dir\Debug\\" /Fd"cmTC_824fb.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c"

CheckFunctionExists.obj : error LNK2019: unresolved external symbol cheev_ referenced in function main [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_824fb.vcxproj]

C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\Debug\cmTC_824fb.exe : fatal error LNK1120: 1 unresolved externals [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_824fb.vcxproj]




Determining if the function cheev_ exists failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_a2e33.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=cheev_ /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_a2e33.dir\Debug\\" /Fd"cmTC_a2e33.dir\Debug\vc142.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.24\Modules\CheckFunctionExists.c"

CheckFunctionExists.obj : error LNK2019: unresolved external symbol cheev_ referenced in function main [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_a2e33.vcxproj]

C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\Debug\cmTC_a2e33.exe : fatal error LNK1120: 1 unresolved externals [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_a2e33.vcxproj]




Performing C++ SOURCE FILE Test HAS_MSVC_GL_LTCG failed with the following output:
Change Dir: C:/dev/pycolmap/build/temp.win-amd64-cpython-39/Release/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_27073.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  src.cxx

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /GL /D _MBCS /D "VERSION_INFO=\"0.2.0\"" /D WIN32 /D _WINDOWS /D HAS_MSVC_GL_LTCG /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /openmp /Fo"cmTC_27073.dir\Debug\\" /Fd"cmTC_27073.dir\Debug\vc142.pdb" /external:W3 /Gd /TP /errorReport:queue  -std=c++14 "C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\src.cxx"

cl : command line warning D9002: ignoring unknown option '-std=c++14' [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_27073.vcxproj]

LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification [C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\cmTC_27073.vcxproj]

  Generating code

  Finished generating code

  cmTC_27073.vcxproj -> C:\dev\pycolmap\build\temp.win-amd64-cpython-39\Release\CMakeFiles\CMakeTmp\Debug\cmTC_27073.exe



Source file was:
int main() { return 0; }

devrajneupane avatar Aug 17 '22 14:08 devrajneupane

It looks like vcpkg COLMAP recently also had some issues with Metis, maybe related? https://github.com/colmap/colmap/pull/1568

sarlinpe avatar Aug 23 '22 07:08 sarlinpe

Thanks for the reply After tons of googling and messing with vcpkg, i successfully build pycolmap on windows 10 by manually installing pthread library from vcpkg and explicitly inlcuding follwing line to CMakeLists.txt

find_package(PTHREAD REQUIRED)

devrajneupane avatar Aug 24 '22 13:08 devrajneupane