interactive_slam icon indicating copy to clipboard operation
interactive_slam copied to clipboard

portable-file-dialogs.h and eigen errors while compiling

Open rrkmiao opened this issue 5 years ago • 7 comments

In member function ‘std::__cxx11::string pfd::internal::dialog::buttons_to_name(pfd::choice) const’: /home/XXX/catkin_ws/src/interactive_slam/thirdparty/portable-file-dialogs/portable-file-dialogs.h:493:18: error: ‘choice’ is not a class, namespace, or enumeration case choice::ok_cancel: return "okcancel"; ^ /home/XXX/catkin_ws/src/interactive_slam/thirdparty/portable-file-dialogs/portable-file-dialogs.h:494:18: error: ‘choice’ is not a class, namespace, or enumeration case choice::yes_no: return "yesno"; In member function ‘std::__cxx11::string pfd::internal::dialog::get_icon_name(pfd::icon) const’: /home/XXX/catkin_ws/src/interactive_slam/thirdparty/portable-file-dialogs/portable-file-dialogs.h:506:18: error: ‘icon’ is not a class, namespace, or enumeration case icon::warning: return "warning"; ^ /home/XXX/catkin_ws/src/interactive_slam/thirdparty/portable-file-dialogs/portable-file-dialogs.h:507:18: error: ‘icon’ is not a class, namespace, or enumeration case icon::error: return "error";

/home/XXX/catkin_ws/src/interactive_slam/src/hdl_graph_slam/plane_alignment_modal.cpp:93:67: required from here /usr/include/eigen3/Eigen/src/Core/DenseBase.h:41:34: error: invalid use of incomplete type ‘struct Eigen::internal::traits’ template<typename Derived> class DenseBase

/home/XXX/catkin_ws/src/interactive_slam/src/hdl_graph_slam/plane_alignment_modal.cpp:1: /usr/include/eigen3/Eigen/src/Core/DenseBase.h:57:61: error: invalid use of incomplete type ‘struct Eigen::internal::traits’ typedef typename internal::traits<Derived>::StorageKind StorageKind;

/home/XXX/catkin_ws/src/interactive_slam/src/hdl_graph_slam/plane_alignment_modal.cpp:1: /usr/include/eigen3/Eigen/src/Core/DenseBase.h:75:46: error: invalid use of incomplete type ‘struct Eigen::internal::traits’ typedef typename NumTraits<Scalar>::Real RealScalar;

and so on, all about "portable-file-dialogs.h" and eigen3 Working on ubuntu 16.04. Thanks for sharing your work! Looking forward to your reply!

rrkmiao avatar Dec 06 '19 13:12 rrkmiao

I am also woking on ubuntu 16.04 with ROS Kinetic, I also have the same problem! Wish you can help fix the problem, Thanks!

whydaydayup avatar Dec 06 '19 17:12 whydaydayup

Hi guys, I confirmed that the package can be built on Kinetic using LLVM toolchain (clang + lld). Try to pull the latest devel branch and:

sudo apt install clang-6.0 lld-6.0
sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-6.0 50
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 50
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-6.0 50
cd ~/catkin_ws && rm -rf build devel    # be aware of that this command removes build and devel directories
CC=clang CXX=clang++ catkin_make -DCMAKE_BUILD_TYPE=Release

If you want to revert ld to the default one (ld.bfd) after building the package, do:

sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.bfd 10
sudo update-alternatives --config ld
# select ld.bfd

I try to update the code so that it works with gcc and ld on kinetic. But, it's low priority and no ETA so far.

koide3 avatar Dec 08 '19 05:12 koide3

Thanks! I tried, but it still didn't work.

rrkmiao avatar Dec 17 '19 11:12 rrkmiao

@rrkmiao , Could you try to remove deval and build directories in catkin_ws before doing catkin_make?

koide3 avatar Dec 18 '19 07:12 koide3

@koide3 I can confirm that this works, both master and devel branch, when deleting build and devel directories.

So, using exactly those instructions as specified by @koide3, works perfectly :

sudo apt install clang-6.0 lld-6.0
sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-6.0 50
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 50
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-6.0 50
cd ~/catkin_ws && rm -rf build devel    # be aware of that this command removes build and devel directories
CC=clang CXX=clang++ catkin_make -DCMAKE_BUILD_TYPE=Release

Thanks again =).

WbHappy avatar Jan 16 '20 15:01 WbHappy

I dont understand why cd ~/catkin_ws && rm -rf build devel can fix this problem. Although I did pass the build after adding this instruction

QiukuZ avatar Feb 23 '20 02:02 QiukuZ

@QiukuZ catkin determines the compiler to be used when you run catkin_make first time. To change the compiler you have to remove build directory to force catkin to clear and reconfigure the build parameters cache.

koide3 avatar Feb 24 '20 07:02 koide3