pycolmap icon indicating copy to clipboard operation
pycolmap copied to clipboard

PYCOLMAP failed building on Windows

Open bycloudai opened this issue 3 years ago • 5 comments

Hi

I am trying to build it on Windows and after running this command:

python -m pip install ./

I ran into this error:

C:\Users\user\AppData\Local\Temp\pip-req-build-iz4keycs\pipeline.cc(10,10): fatal error C1083: Cannot open include file: 'colmap/exe/feature.h': No such file or directory [C:\Users\user\AppData\Local\Temp\pip-req-build-iz4keycs\build\temp.win-amd64-3.8\Release\pycolmap.vcxproj]

do you guys have any idea on how to solve this? Thank you

bycloudai avatar Jan 27 '22 23:01 bycloudai

I was getting the same error today and figured out a way to resolve it. Unfortunately, I don't know enough about cmake/vcpkg/pycolmap to know why the files in the /exe dir aren't being included during the build, but I was able to get the build working by manually copying the include/colmap/exe directory from the colmap repository into my vcpkg colmap include directory.

Essentially, the exe header files are not in this directory and need to be for the build to work: {vcpkg_dir}\installed\x64-windows\include\colmap

stevosaurus avatar Jan 28 '22 18:01 stevosaurus

colmap/exe/feature.h was only exposed recently in the installed library: https://github.com/colmap/colmap/commit/83aa3402304551eccf238bccfed81eaa3e089c70 I don't use Windows so I don't know how vcpkg works, I guess that it should have pulled the latest COLMAP commit.

sarlinpe avatar Jan 28 '22 18:01 sarlinpe

@stevosaurus do you mind elaborating a bit more? I've tried getting the files feature.h included from colmap/src/head/dev-55e04ac3eb.clean/src/exe to vcpkg/installed/x64-windows/include/colmap but it still the same error unfortunately.

bycloudai avatar Jan 28 '22 20:01 bycloudai

this line here is the problem I believe https://github.com/microsoft/vcpkg/blob/47cbed88514c0e48fdb72ddc29545f35136f5461/ports/colmap/portfile.cmake#L69 this folder was empty before and thus removed at the end of the build but it's no longer the case. I removed it on my machine, compiled colmap; then installed pycolmap and it seem to work.

yocabon avatar Mar 21 '22 13:03 yocabon

Unrelated

CMake Deprecation Warning at scripts/cmake/vcpkg_check_features.cmake:182 (message):
  calling `vcpkg_check_features` without the `FEATURES` keyword has been
  deprecated.

      Please add the `FEATURES` keyword to the call.
Call Stack (most recent call first):
  ports/libjpeg-turbo/portfile.cmake:35 (vcpkg_check_features)
  scripts/ports.cmake:142 (include)

mexicantexan avatar Jun 28 '22 18:06 mexicantexan