-
Notifications
You must be signed in to change notification settings - Fork 399
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
Segmentation fault at PCL when compiling with -std=c++11 #8
Comments
Thanks, for the report. I'll make the changes you suggest. If you have them available as a patch, I would be interested. Otherwise, as the error doesn't occur with my setup (12.04 + Hydro), would you be able and willing to test the changes? |
Thank you for the quick reply. I created an pullrequest for the hydro branch that fixed the compilation on my system. |
This is actually related to this: PointCloudLibrary/pcl#619 |
Wouldn't surprise me if that was the issue. I remember an OpenCV version that didn't even compile when c++11 activated, because a syntax error came after an #ifndef <c++11 activated> :-). |
Thank you for this! I will keep searching for the issue from the PCL side of things if I could find something there. |
To resolve this issue, you need to go a bit deeper. To my knowledge, it is caused by the differing boost implementations when compiling with c++11 and something else. As the PCl is not compiled with -std=c++11 option, it will contain different boost headers compared to rgbdslam. This results in segmentation fault on the initialization of boost. To correct this, you need to compile PCL from their git repo (this change might be needed PointCloudLibrary/pcl#980). One way to make PCL compile with the c++11 option is to add this to the CMakeLists.txt: SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") When you have the PCL compiled, you need to make install, and change CMakeLists.txt on rgbdslam to use these libraries, this can be done by changing the line: find_package(PCL 1.7 REQUIRED COMPONENTS common io) to find_package(PCL 1.8 REQUIRED COMPONENTS common io) |
Just add to JoonasMelin's correct diagnosis:
|
This appears to be an underlying issue with Point Cloud Library's use of non-C++11 features. See felixendres/rgbdslam_v2#8 for more details.
The use of auto type requires compilation with c++11 option(or c++0x), but this results in PCL libraries failing when trying to start rgbd slam. This is the print that gdb gives:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7600a8c in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() () from /usr/lib/libpcl_io.so.1.7
The code works if you replace the auto type with the real type and recompile with out c++11.
The failure is also present in PCL compiled from their GIT repository.
I managed to fix this on my branch from the hydro branch but the increased use of the auto type etc. in the experimental odometry branch makes compilation without c++11 harder.
I am using ubuntu 14.04 with Indigo.
The text was updated successfully, but these errors were encountered: