Skip to content
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

Segfault on app start using Trusty Beta with packaged PCL #619

Closed
kubat opened this issue Apr 7, 2014 · 4 comments
Closed

Segfault on app start using Trusty Beta with packaged PCL #619

kubat opened this issue Apr 7, 2014 · 4 comments

Comments

@kubat
Copy link

kubat commented Apr 7, 2014

I am trying out the Ubuntu 14.04LTS Beta (Trusty) and have been seeing a strange error.
When using the prebuilt packages by Jochen Sprickerhof, my apps segfault on start if I compile with c++11 enabled.

  • This does not occur without c++11 enabled.
  • This does not occur when I compile and install from sources.

From within GDB, I see the following trace for the crashes:

`(gdb) run
Program received signal SIGSEGV, Segmentation fault.
0x00007fffed3a1bb0 in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::
init() () from /usr/lib/libpcl_features.so.1.7
(gdb) bt
#0 0x00007fffed3a1bb0 in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::in

it::init() () from /usr/lib/libpcl_features.so.1.7
#1 0x00007ffff7dea13a in call_init (l=, argc=argc@entry=1, argv=argv@entry=0x7fffffffdc58, env=env@entry

=0x7fffffffdc68) at dl-init.c:78
#2 0x00007ffff7dea223 in call_init (env=, argv=, argc=, l=)

at dl-init.c:36
#3 _dl_init (main_map=0x7ffff7ffe1c8, argc=1, argv=0x7fffffffdc58, env=0x7fffffffdc68) at dl-init.c:126
#4 0x00007ffff7ddb30a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#5 0x0000000000000001 in ?? ()
#6 0x00007fffffffdfda in ?? ()
#7 0x0000000000000000 in ?? ()`

Jochen was kind enough to help me build my own .debs from sources, and these seem to exhibit the same problem.

Details of my setup:

  • Ubuntu 14.04LTS Beta
  • Running on a VMWare VM on a Macbook Pro (i7)
  • Using libboost-math1.54-dev version 1.54.0-4ununtu3 (installed deb)
@Breakthru
Copy link

I get the same error on a call generated from the sample_consensus module.
In my case, it happens when CMAKE_BUILD_TYPE is set to Debug (and not on Relase)
Does not happen with a build from source on the same machine.
I'm compiling with C++11 using the flag -std=c++0x
Using Ubuntu 14.04 with libpcl-1.7-all from packages, and g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2

gdb backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff1e55c50 in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() () from /usr/lib/libpcl_sample_consensus.so.1.7
(gdb) bt
#0 0x00007ffff1e55c50 in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() () from /usr/lib/libpcl_sample_consensus.so.1.7
#1 0x00007ffff1e2d6de in ?? () from /usr/lib/libpcl_sample_consensus.so.1.7

@taketwo
Copy link
Member

taketwo commented Feb 11, 2016

This is a know problem, see this or this. In short, you should not mix libraries compiled with different versions of C++ standard. So either build everything from source with C++11 support by yourself, or use system libraries and limit yourself to the old standard. That being said, in many cases you could get lucky and mixing will work just fine.

@taketwo taketwo closed this as completed Feb 11, 2016
@jcar87
Copy link

jcar87 commented Feb 21, 2016

As taketwo has mentioned, this is a known problem with Boost, when mixing binaries that include boost/math/special_functions/lanczos.hpp , and one of the binaries is built with c++11 and the other isn't.

If you are building your own project with c++11, you may be better off building PCL with c++11 mode as well (see this patch )

If this isn't possible, I'd suggest using boost 1.60, which apparently fixes this issue. But you would also have to re build PCL (c++11 or not), with that version of boost.

argenos pushed a commit to b-it-bots/mas_common_robotics that referenced this issue Feb 28, 2018
Perception indigo fixes

* removed c++11 compilation. This was causing tabletop_cloud_accumulator and clusterer to crash on launch. Probably caused because PCL wasn't complied with c++11 [github issue](PointCloudLibrary/pcl#619)
* removed unused code (plane extraction, polyclipping)
* fixed warnings about specifying queue_size in publishers
* use cPickle instead of joblib to pickle the svm classifier. So there's no need to install an old version of sklearn/joblib

There is a problem with the ProjectInliers nodelet that still needs to be looked into (#19). Otherwise, the perception pipeline is compiling, launching and running ok under indigo.

See merge request !170
argenos pushed a commit to b-it-bots/mas_perception that referenced this issue Apr 30, 2018
Perception indigo fixes

* removed c++11 compilation. This was causing tabletop_cloud_accumulator and clusterer to crash on launch. Probably caused because PCL wasn't complied with c++11 [github issue](PointCloudLibrary/pcl#619)
* removed unused code (plane extraction, polyclipping)
* fixed warnings about specifying queue_size in publishers
* use cPickle instead of joblib to pickle the svm classifier. So there's no need to install an old version of sklearn/joblib

There is a problem with the ProjectInliers nodelet that still needs to be looked into (#19). Otherwise, the perception pipeline is compiling, launching and running ok under indigo.

See merge request !170
@liuzhenboo
Copy link

This is a know problem, see this or this. In short, you should not mix libraries compiled with different versions of C++ standard. So either build everything from source with C++11 support by yourself, or use system libraries and limit yourself to the old standard. That being said, in many cases you could get lucky and mixing will work just fine.

我解决了:catkin_make -DCMAKE_BUILD_TYPE=Release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants