uzh-rpg/rpg_ig_active_reconstruction

Cant compile

vakeome opened this issue · 6 comments

Dear developers I was trying to compile the project however i could not!

home/irving/catkin_ws/src/rpg_ig_active_reconstruction/ig_active_reconstruction/src/code_base/view_space.cpp: In member function ‘void ig_active_reconstruction::views::ViewSpace::loadFromFile(std::__cxx11::string)’:
/home/irving/catkin_ws/src/rpg_ig_active_reconstruction/ig_active_reconstruction/src/code_base/view_space.cpp:246:36: error: cannot convert ‘std::basic_istream::__istream_type {aka std::basic_istream}’ to ‘bool’ in initialization
bool success = (in >> nr_of_views);
^
rpg_ig_active_reconstruction/ig_active_reconstruction/CMakeFiles/ig_active_reconstruction.dir/build.make:134: recipe for target 'rpg_ig_active_reconstruction/ig_active_reconstruction/CMakeFiles/ig_active_reconstruction.dir/src/code_base/view_space.cpp.o' failed
make[2]: *** [rpg_ig_active_reconstruction/ig_active_reconstruction/CMakeFiles/ig_active_reconstruction.dir/src/code_base/view_space.cpp.o] Error 1
CMakeFiles/Makefile2:417: recipe for target 'rpg_ig_active_reconstruction/ig_active_reconstruction/CMakeFiles/ig_active_reconstruction.dir/all' failed
make[1]: *** [rpg_ig_active_reconstruction/ig_active_reconstruction/CMakeFiles/ig_active_reconstruction.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

Hi vakeome,

Thank you for reporting! Could you please tell us which compiler (and version) you are using? Gcc 5?

Best

That does look familiar to a similar error I received when trying to compile with gcc 4.9 or 5.0.

@vakeome : I would recommend that you try with gcc 4.8 as recommended in the wiki. If you're using linux, you can set your system to switch between different compiler versions with update-alternatives. This blog post gives an idea of how to set it up.

@islers : Maybe we can chat offline about what it would take to get newer gcc versions working? Besides this issue of converting streams to bool, I also remember there being a few other features that were not supported.

@jeffdelmerico Yes. Especially since I wouldn't expect that to be too much of an issue.

Hi, Islers, Jeff,

I got a fresh ubuntu 16.04 installed with ROS Kinectic. The GCC installed was 5.3.1. I hope switching to 4.9 will not have problems with other packages. BTW I wrote to Scaramuzza but no answer on my inbox yet.

@vakeome : We haven't tested with 16.04 or Kinetic yet, but I don't know of any issues that would cause problems.

For the GCC version, you need to use version 4.8 not 4.9. Please refer to the installation directions on the wiki for the details.

I should note that the nice thing about update-alternatives is that you can select the version that you want to use right before you compile something, and then switch it back afterward (using: sudo update-alternatives --config gcc). Since this code has few dependencies, and they are well-developed, I do not anticipate that the dependent packages will have problems with gcc 4.8.

Also, do not expect a reply from Prof. Scaramuzza. As the head of the lab where this was developed, he does not have time to troubleshoot any of our code releases. However, as the maintainers, @islers and I will be happy to answer your questions.

I'm marking this as closed, although I've opened another issue for us to work on supporting gcc 4.9 and 5.0.