Skip to content
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

master branch doesn't have setup.py file #226

Closed
shubham-monarch opened this issue Jan 9, 2024 · 8 comments
Closed

master branch doesn't have setup.py file #226

shubham-monarch opened this issue Jan 9, 2024 · 8 comments

Comments

@shubham-monarch
Copy link

shubham-monarch commented Jan 9, 2024

I need to work with the commit #89ce83. To make it work, I have checked out to the appropriate COLMAP version, and built + installed it.

However, I am facing issue installing pycolmap for the aforementioned commit. I have been using pip install . but that doesn't seem to be working. More specifically, I am getting the error —

The link interface of target "colmap::colmap_scene" contains: SQLite::SQLite3 but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing.

The repo also doesn't seem to contain any setup.py file corresponding to the commit. What am I missing?

Also, probably a very navie question — since setup.py is missing, how come pip install . is working in the first place?

@sarlinpe
Copy link
Collaborator

sarlinpe commented Jan 10, 2024

  • We need to update the doc: the commit that you reference requires COLMAP 3.9. Does the error still occur at that point?
  • We recently switched from setup.py to pyproject.toml, which is now the recommended way of managing builds. I think that this requires pip>=10.0.

@shubham-monarch
Copy link
Author

shubham-monarch commented Jan 10, 2024

I checked out to COLMAP 3.9 and built and installed it. On running pip install . , I am still getting the same error —

CMake Error at /usr/local/share/colmap/colmap-targets.cmake:138 (set_target_properties):
    The link interface of target colmap::colmap_scene contains:
      SQLite::SQLite3
    but the target was not found.  Possible reasons include:
      - There is a typo in the target name.
      - A find_package call is missing for an IMPORTED target.
      - An ALIAS target is missing.
 Call Stack (most recent call first):
    /usr/local/share/colmap/colmap-config.cmake:105 (include)
    CMakeLists.txt:21 (find_package)
  CMake Error at /usr/local/share/colmap/colmap-targets.cmake:159 (set_target_properties):
    The link interface of target "colmap::colmap_util" contains:
      SQLite::SQLite3
    but the target was not found.  Possible reasons include:
      - There is a typo in the target name.
      - A find_package call is missing for an IMPORTED target.
      - An ALIAS target is missing.
  Call Stack (most recent call first):
    /usr/local/share/colmap/colmap-config.cmake:105 (include)
    CMakeLists.txt:21 (find_package)
   Generating done (0.0s)
  CMake Generate step failed.  Build files cannot be regenerated correctly.
  CMake configuration failed
  ERROR: Failed building wheel for pycolmap

If I comment out SQLite:SQLite3 from set_target_properties(colmap::colmap_scene) and (colmap::colmap_util) inside the colmap-targets.cmake file, pip install . finishes successfully. However, import pycolmap doesn't work in that case.

Also, when I run pip install . --verbose , somewhere in the print log, I do see

-- Found SQLite3
  --   Includes : /usr/include
  --   Libraries : /usr/lib/x86_64-linux-gnu/libsqlite3.so

which makes me believe it is not a missing SQLite library issue.

@sarlinpe
Copy link
Collaborator

sarlinpe commented Jan 10, 2024

Can you include the full log? Can you try to swap the 2 include(...) lines in /usr/local/share/colmap/colmap-config.cmake: https://github.com/colmap/colmap/blob/71cebde85b5ce290c93f67326eea7c1b1c0cea97/cmake/colmap-config.cmake.in#L81-L82

@shubham-monarch
Copy link
Author

Already tried swapping those 2 lines. Doesn't help.
I am attaching the complete log for your reference.
log.txt

@sarlinpe
Copy link
Collaborator

sarlinpe commented Jan 10, 2024

-- Found SQLite3
  --   Includes : /usr/include
  --   Libraries : /usr/lib/x86_64-linux-gnu/libsqlite3.so

is the log printed by the old, broken FindSQLite3.cmake shipped in COLMAP <= 3.8; CMake>=3.14 ships it own FindSQLite3.cmake, which properly defines the SQLite::SQLite3 target: https://cmake.org/cmake/help/latest/module/FindSQLite3.html Maybe you didn't properly uninstall 3.8 and the file /usr/local/share/colmap/cmake/FindSQLite3.cmake remains?

@shubham-monarch
Copy link
Author

@sarlinpe what would be the best way to uninstall colmap 3.8?

@sarlinpe
Copy link
Collaborator

This should work:

rm -rf /usr/local/bin/colmap /usr/local/share/colmap/ /usr/local/include/colmap/ /usr/local/lib/libcolmap*  /usr/local/share/applications/COLMAP.desktop

@shubham-monarch
Copy link
Author

I noticed the CMakeUnistall.cmake file inside the colmap/build/ folder. So, I just ran sudo cmake -P CMakeUnistall.cmake. That did the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants