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

Can't build ORB_SLAM2 because of Pangolin #850

Closed
milan-r-shah opened this issue Mar 22, 2023 · 5 comments
Closed

Can't build ORB_SLAM2 because of Pangolin #850

milan-r-shah opened this issue Mar 22, 2023 · 5 comments

Comments

@milan-r-shah
Copy link

milan-r-shah commented Mar 22, 2023

I'm trying to build https://github.com/raulmur/ORB_SLAM2. After some modifications in its cmake, I was able to get rid of OpenCV-related errors. However, now, I'm getting errors related to Pangolin:

CMake Error at /home/milan/milan2/dev/Pangolin/build/PangolinTargets.cmake:70 (set_target_properties):
  The link interface of target "pango_geometry" contains:

    Eigen3::Eigen

  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):
  /home/milan/milan2/dev/Pangolin/build/PangolinConfig.cmake:6 (include)
  CMakeLists.txt:45 (find_package)


CMake Error at /home/milan/milan2/dev/Pangolin/build/PangolinTargets.cmake:87 (set_target_properties):
  The link interface of target "pango_image" contains:

    Eigen3::Eigen

  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):
  /home/milan/milan2/dev/Pangolin/build/PangolinConfig.cmake:6 (include)
  CMakeLists.txt:45 (find_package)


CMake Error at /home/milan/milan2/dev/Pangolin/build/PangolinTargets.cmake:96 (set_target_properties):
  The link interface of target "pango_opengl" contains:

    Eigen3::Eigen

  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):
  /home/milan/milan2/dev/Pangolin/build/PangolinConfig.cmake:6 (include)
  CMakeLists.txt:45 (find_package)

.
.
.

/home/milan/milan2/dev/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:79: error: ‘decay_t’ is not a member of ‘std’
 constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value;
                                                                               ^~~~~~~
/home/milan/milan2/dev/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:79: note: suggested alternative: ‘decay’
 constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value;
                                                                               ^~~~~~~
                                                                               decay
/home/milan/milan2/dev/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:79: error: ‘decay_t’ is not a member of ‘std’
/home/milan/milan2/dev/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:79: note: suggested alternative: ‘decay’
 constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value;
                                                                               ^~~~~~~
                                                                               decay
/home/milan/milan2/dev/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:87: error: template argument 1 is invalid
 constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value;
                                                                                       ^
/home/milan/milan2/dev/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:92: error: ‘::value’ has not been declared
 constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value;
                                                                                            ^~~~~
/home/milan/milan2/dev/Pangolin/components/pango_core/include/sigslot/signal.hpp:109:92: note: suggested alternative: ‘valloc’
 constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value;
                                                                                            ^~~~~
                                                                                            valloc
/home/milan/milan2/dev/Pangolin/components/pango_core/include/sigslot/signal.hpp:132:53: error: ‘remove_pointer_t’ is not a member of ‘std’
                                                std::remove_pointer_t<T>>::value;
                                                     ^~~~~~~~~~~~~~~~
/home/milan/milan2/dev/Pangolin/components/pango_core/include/sigslot/signal.hpp:132:53: note: suggested alternative: ‘remove_pointer’
                                                std::remove_pointer_t<T>>::value;
                                                     ^~~~~~~~~~~~~~~~
                                                     remove_pointer
.
.
.
... a lot of errors in the signal.hpp


I followed these steps for installing Pangolin:

# Get Pangolin
cd ~/your_fav_code_directory
git clone --recursive https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin

# Install dependencies (as described above, or your preferred method)
./scripts/install_prerequisites.sh recommended

# with Ninja for faster builds (sudo apt install ninja-build)
cmake -B build -GNinja

# GIVEME THE PYTHON STUFF!!!! (Check the output to verify selected python version)
cmake --build build -t pypangolin_pip_install

Some relevant issues (related to Pangolin):

  1. ctest does not work on Ubuntu 18.04! #847
  2. How can I check Pangolin has been installed properly if ctest is not working? #849
@stevenlovegrove
Copy link
Owner

Which version of pangolin are you on?

https://github.com/stevenlovegrove/Pangolin/blob/master/cmake/PangolinConfig.cmake.in#L14

should be locating Eigen when Pangolin is imported, but it seems as though it isn't working in your case. You can try updating Pangolin, or if that doesn't help, you can explicitly find Eigen and add Eigen::Eigen as a dependency to whatever program is having this issue.

Those other errors related to signal.hpp look like a compiler version thing. Ubuntu 18.04 is pretty old so perhaps it doesn't support the C++ version that is being used there, or the C++ version hasn't been set to a sufficient version in the client library attempting to link Pangolin

@milan-r-shah
Copy link
Author

Which version of pangolin are you on?

I cloned the master branch last week.

@irsyadtc
Copy link

I tag here if others might face the same signal.hpp issue
[https://github.com/raulmur/ORB_SLAM2/issues/1015]

The latest Pangolin is currently using a higher version c++ compiler (c++ 17) while orb-slam2 still on c++ 11.

@ParikaGoel
Copy link

ParikaGoel commented Jan 8, 2024

@milan-r-shah Similar issue raised : #856 (comment)
There is a workaround mentioned in this issue which worked for me

@christian-rauch
Copy link
Collaborator

This has been fixed by #901.

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

5 participants