-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update Windows build instructions for PyCOLMAP #3746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update Windows build instructions for PyCOLMAP #3746
Conversation
These are intended to clarify multiple snags that I hit while building on Windows.
Warning box markdown isn't rendering properly for READMEs right now.
| python -m pip install . | ||
| ``` | ||
| - On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3), run in powershell: | ||
| - On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: not your fault but this link is actually not persistent, and we should link using a markdown reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the Windows source-build section anchor is named that way because the section header is a duplicate? Maybe it would be reasonable to add an explicitly named anchor.
Or the link could be removed entirely, maybe? Maybe change this to:
| - On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3): | |
| - On Windows, after installing COLMAP via VCPKG per the installation instructions above: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a PR to add a permanent section anchor: colmap/colmap.github.io#19
Accidentally updated the mirror of the site instead of the actual docs. I'll add the anchor to this PR shortly.
| ``` | ||
| - On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3), run in powershell: | ||
| - On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3): | ||
| 1. Determine the installed COLMAP version via: `<VCPKG-ROOT>\packages\colmap_<TRIPLET>\tools\colmap\colmap.exe help` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: The easier path would be to just run vcpkg install from the root of the colmap repo. Then the version is guaranteed to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, noted. That does seem much easier. :)
I'll go verify, then make the edit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahojnnes So I tried vcpkg install from the root of the repo and all it did was install the dependencies. Is there another command I should try?
I also tried doing a cmake build using the vcpkg toolchain file, then the pip command in the install docs + some changes to resolve pybind11. That built successfully, but was pretty convoluted and I ultimately can't get the resulting package to load because it fails to resolve DLL dependencies in the vcpkg_installed folder.
For what it's worth, I also couldn't load the resulting package when building the python bindings against the vcpkg install colmap:x64-windows version. It's the same DLL resolution issue caused by vcpkg-built shared libraries living in their own prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are 3 issues causing the loading problem:
- vcpkg shared libraries can't be found
- CUDA libraries can't be found
- OpenEXR 3.4 is crashing during initialization (something about a null pointer dereference while locking a critical section)
I'll update the build instructions based on the method I originally proposed in my PR, then open a separate issue to track this loading issue.
ahojnnes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
|
Please also update the instructions at https://github.com/colmap/colmap/blob/main/doc/pycolmap/index.rst |
The current build instructions for PyCOLMAP don't work on Windows. This PR adds some additional steps and context that should resolve the problem.