Build error in ULogger.cpp on Raspbian

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Build error in ULogger.cpp on Raspbian

Markvanderuit
Hi people,

I'm trying to build rtabmap on a raspberry pi 3, but I'm getting some errors. It's probably really simple, but I'm still new to linux/cpp, so kind of at a loss here. This happens when I run make.

pi@joost:~/rtabmap/build $ make
Scanning dependencies of target rtabmap_utilite
[  1%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UEventsManager.cpp.o
[  1%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UEventsHandler.cpp.o
[  2%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UEventsSender.cpp.o
[  2%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UFile.cpp.o
[  3%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UDirectory.cpp.o
[  3%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/UConversion.cpp.o
[  4%] Building CXX object utilite/src/CMakeFiles/rtabmap_utilite.dir/ULogger.cpp.o
/home/pi/rtabmap/utilite/src/ULogger.cpp: In static member function 'static void ULogger::unregisterCurrentThread()':
/home/pi/rtabmap/utilite/src/ULogger.cpp:235:9: error: no match for 'operator=' (operand types are 'std::map<std::basic_string<char>, long unsigned int>::iterator {aka std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, long unsigned int> >}' and 'void')
    iter = registeredThreads_.erase(iter);
         ^
/home/pi/rtabmap/utilite/src/ULogger.cpp:235:9: note: candidate is:
In file included from /usr/include/c++/4.9/map:60:0,
                 from /home/pi/rtabmap/utilite/src/../include/rtabmap/utilite/ULogger.h:34,
                 from /home/pi/rtabmap/utilite/src/ULogger.cpp:20:
/usr/include/c++/4.9/bits/stl_tree.h:172:12: note: std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, long unsigned int> >& std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, long unsigned int> >::operator=(const std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, long unsigned int> >&)
     struct _Rb_tree_iterator
            ^
/usr/include/c++/4.9/bits/stl_tree.h:172:12: note:   no known conversion for argument 1 from 'void' to 'const std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, long unsigned int> >&'
utilite/src/CMakeFiles/rtabmap_utilite.dir/build.make:192: recipe for target 'utilite/src/CMakeFiles/rtabmap_utilite.dir/ULogger.cpp.o' failed
make[2]: *** [utilite/src/CMakeFiles/rtabmap_utilite.dir/ULogger.cpp.o] Error 1
CMakeFiles/Makefile2:124: recipe for target 'utilite/src/CMakeFiles/rtabmap_utilite.dir/all' failed
make[1]: *** [utilite/src/CMakeFiles/rtabmap_utilite.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2

Any idea what I'm doing wrong? Thanks for your help!
Reply | Threaded
Open this post in threaded view
|

Re: Build error in ULogger.cpp on Raspbian

matlabbe
Administrator
Hi,

Looks like the same issue as this one: https://github.com/introlab/rtabmap/issues/145

This commit would fix this error.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Build error in ULogger.cpp on Raspbian

Markvanderuit
Hi again,

Thanks for your quick response. That fixed it!