I get the following error only when I debug using gdb on my code compiled with debug flag
Program received signal SIGSEGV, Segmentation fault.
0x00007fffc79a7ff0 in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() ()
from /usr/lib/libpcl_surface.so.1.7
OS: unbutu 14.04
I have the latest pcl library (1.7 Sprikelhof) and boost library (1.54)
Note, there is no segfault when running outside gdb.
I had a similar issue when compiling using -std=c++11
but only in Debug
mode: set(CMAKE_BUILD_TYPE Debug)
.
In Release
or RelWithDebInfo
mode, instead, everything was working as expected.
I solved the issue optimizing the compiled code (in Debug
mode) with the -O1
option. i.e. set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O1")
.
I don't why it works but it's working for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With