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

Building issue, colmap version requirement? #21

Open
Goulustis opened this issue Aug 1, 2024 · 8 comments
Open

Building issue, colmap version requirement? #21

Goulustis opened this issue Aug 1, 2024 · 8 comments

Comments

@Goulustis
Copy link

Goulustis commented Aug 1, 2024

I'm trying to build glomap but faced this error:

glomap/build/_deps/colmap-src/src/colmap/util/logging.h:150:3: note: candidate: ‘colmap::LogMessageFatalThrow<T>::LogMessageFatalThrow(const char*, int) [with T = std::invalid_argument]’
  150 |   LogMessageFatalThrow(const char* file, int line)
      |   ^~~~~~~~~~~~~~~~~~~~
projects/misc/glomap/build/_deps/colmap-src/src/colmap/util/logging.h:150:3: note:   candidate expects 2 arguments, 3 provided

Is there a requirement for colmap version?

@Goulustis Goulustis changed the title Building issue Building issue, colmap version requirement? Aug 1, 2024
@Goulustis
Copy link
Author

Goulustis commented Aug 1, 2024

Need:
glog = 0.6.0
tbb = 2020.2
boost

@ahojnnes
Copy link
Contributor

ahojnnes commented Aug 2, 2024

Could you show the full error message and build log? It will be good to understand the callsite where this error is triggered. Thank you.

@ichsan2895
Copy link

the latest commit of glomap needs latest version of colmap

@Goulustis
Copy link
Author

Goulustis commented Aug 3, 2024

My first error is resolved specifically with:
glog = 0.6.0

After I updated my packages with what I got above, I'm left with this error:

[278/278] Linking CXX executable glomap/glomap
FAILED: glomap/glomap 
: && /bin/c++ -O3 -DNDEBUG  glomap/CMakeFiles/glomap_main.dir/glomap.cc.o glomap/CMakeFiles/glomap_main.dir/exe/global_mapper.cc.o -o glomap/glomap  -Wl,-rpath,/mambaforge-pypy3/envs/glmap/lib:  glomap/libglomap.a  _deps/colmap-build/src/colmap/exe/libcolmap_exe.a  _deps/colmap-build/src/colmap/ui/libcolmap_ui.a  _deps/colmap-build/src/colmap/controllers/libcolmap_controllers.a  _deps/colmap-build/src/colmap/feature/libcolmap_feature.a  _deps/colmap-build/src/colmap/retrieval/libcolmap_retrieval.a  /mambaforge-pypy3/envs/glmap/lib/libflann.so  /mambaforge-pypy3/envs/glmap/lib/liblz4.so  _deps/colmap-build/src/colmap/sfm/libcolmap_sfm.a  _deps/colmap-build/src/colmap/estimators/libcolmap_estimators.a  _deps/colmap-build/src/colmap/optim/libcolmap_optim.a  /mambaforge-pypy3/envs/glmap/lib/libboost_program_options.so.1.82.0  _deps/colmap-build/src/colmap/mvs/libcolmap_mvs_cuda.a  _deps/colmap-build/src/colmap/mvs/libcolmap_mvs.a  _deps/colmap-build/src/colmap/image/libcolmap_image.a  _deps/colmap-build/src/thirdparty/LSD/libcolmap_lsd.a  _deps/colmap-build/src/colmap/scene/libcolmap_scene.a  _deps/colmap-build/src/colmap/feature/libcolmap_feature_types.a  _deps/colmap-build/src/colmap/geometry/libcolmap_geometry.a  _deps/colmap-build/src/colmap/math/libcolmap_math.a  /mambaforge-pypy3/envs/glmap/lib/libmetis.so  /mambaforge-pypy3/envs/glmap/lib/libboost_graph.so.1.82.0  /mambaforge-pypy3/envs/glmap/lib/libboost_regex.so.1.82.0  _deps/colmap-build/src/colmap/sensor/libcolmap_sensor.a  _deps/colmap-build/src/thirdparty/VLFeat/libcolmap_vlfeat.a  /mambaforge-pypy3/envs/glmap/lib/libceres.so.2.2.0  /mambaforge-pypy3/envs/glmap/lib/libfreeimage.so  _deps/colmap-build/src/thirdparty/PoissonRecon/libcolmap_poisson_recon.a  /mambaforge-pypy3/envs/glmap/lib/libmpfr.so  /mambaforge-pypy3/envs/glmap/lib/libgmp.so  _deps/colmap-build/src/colmap/util/libcolmap_util_cuda.a  _deps/colmap-build/src/colmap/util/libcolmap_util.a  /mambaforge-pypy3/envs/glmap/lib/libboost_filesystem.so.1.82.0  /mambaforge-pypy3/envs/glmap/lib/libboost_atomic.so.1.82.0  /mambaforge-pypy3/envs/glmap/lib/libsqlite3.so  /mambaforge-pypy3/envs/glmap/lib/libglog.so.0.6.0  /mambaforge-pypy3/envs/glmap/lib/libgflags.so.2.2.2  /mambaforge-pypy3/envs/glmap/lib/libQt5OpenGL.so.5.15.8  /mambaforge-pypy3/envs/glmap/lib/libQt5Widgets.so.5.15.8  /mambaforge-pypy3/envs/glmap/lib/libQt5Gui.so.5.15.8  /mambaforge-pypy3/envs/glmap/lib/libQt5Core.so.5.15.8  _deps/colmap-build/src/thirdparty/SiftGPU/libcolmap_sift_gpu.a  /usr/lib/x86_64-linux-gnu/libGLX.so  /usr/lib/x86_64-linux-gnu/libOpenGL.so  /mambaforge-pypy3/envs/glmap/lib/libcudart.so  -ldl  /usr/lib/x86_64-linux-gnu/librt.so  /mambaforge-pypy3/envs/glmap/lib/libcurand.so  /mambaforge-pypy3/envs/glmap/lib/libGLEW.so  _deps/poselib-build/PoseLib/libPoseLib.a  /mambaforge-pypy3/envs/glmap/lib/libceres.so.2.2.0  /mambaforge-pypy3/envs/glmap/lib/libglog.so.0.6.0  /mambaforge-pypy3/envs/glmap/lib/libgflags.so.2.2.2  -lpthread  /mambaforge-pypy3/envs/glmap/lib/libcholmod.so  /usr/lib/gcc/x86_64-linux-gnu/9/libgomp.so  /usr/lib/x86_64-linux-gnu/libpthread.so && :
/bin/ld: /mambaforge-pypy3/envs/glmap/lib/libboost_program_options.so.1.82.0: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
/bin/ld: /mambaforge-pypy3/envs/glmap/lib/libceres.so.2.2.0: undefined reference to `std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.30'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Any suggestion as to how to resolve this?

@ahojnnes
Copy link
Contributor

It looks like you have an active python environment and that may be the reason you link inconsistent libraries into the final binary.

@JonasKonrad
Copy link
Contributor

Despite that Python issue, I'd like to stress the importance of adding a version requirement for glog (the original issue of this thread). On Arch, glog v0.7.x is the current maintained version, with which the glomap build fails.

@ahojnnes
Copy link
Contributor

@JonasKonrad I believe, after we merge this PR: #132, glog 0.7.X should work as well.

@JonasKonrad
Copy link
Contributor

JonasKonrad commented Nov 21, 2024

@ahojnnes It does, but not out of the box. Had to change a detail in FindDependencies.cmake. Exporting the version definitions there is restricted to MSVC. This is not how Colmap incorporates Glog. I can provide a PR.
Edit: PR #140.

Btw., I had to go through some bugs before verifying this, because I made use of my installed Colmap, which was up-to-date with the Colmap repo at that time. Basically, Colmap commit #2896 regarding the BundleAdjustment interface are breaking for Glomap. So, I'd love to see find_package(COLMAP $version REQUIRED) statement in glomap's FindDependencies.cmake, but I perfectly get that you cannot do this at at this project stage (if ever).

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

4 participants