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

Cleaning up CMakeLists to not rely on catkin_make crosstalk #1

Merged
merged 1 commit into from Jun 7, 2015

Conversation

jbohren
Copy link
Contributor

@jbohren jbohren commented Jun 6, 2015

Fixes catkin/catkin_tools#210

This is the backtrace from master:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: -CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)
File: /usr/include/CGAL/Interval_nt.h
Line: 209
Explanation: Wrong rounding: did you forget the  -frounding-math  option if you use GCC (or  -fp-model strict  for Intel)?

Program received signal SIGABRT, Aborted.
0x00007ffff5b76cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0  0x00007ffff5b76cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff5b7a0d8 in __GI_abort () at abort.c:89
#2  0x00007ffff617b6b5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff6179836 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff6179863 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff6179aa2 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff3ac6689 in CGAL::assertion_fail(char const*, char const*, int, char const*) () from /usr/lib/libCGAL.so.10
#7  0x00007ffff696ae2b in CGAL::Interval_nt<false>::Test_runtime_rounding_modes::Test_runtime_rounding_modes (this=0x7ffff6c7b048 <CGAL::Interval_nt<false>::tester>)
    at /usr/include/CGAL/Interval_nt.h:208
#8  0x00007ffff6964e80 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /usr/include/CGAL/Interval_nt.h:223
#9  0x00007ffff6965013 in _GLOBAL__sub_I_ConditionCreator.cpp(void) () at /home/jbohren/ws/msl/src/cnc-msl/msl_expressions/autogenerated/src/ConditionCreator.cpp:719
#10 0x00007ffff7dea13a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffcdb8, env=env@entry=0x7fffffffcdc8) at dl-init.c:78
#11 0x00007ffff7dea223 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at dl-init.c:36
#12 _dl_init (main_map=0x7ffff7ffe1c8, argc=1, argv=0x7fffffffcdb8, env=0x7fffffffcdc8) at dl-init.c:126
#13 0x00007ffff7ddb30a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#14 0x0000000000000001 in ?? ()
#15 0x00007fffffffd1a7 in ?? ()
#16 0x0000000000000000 in ?? ()

This line gives it away:

#9  0x00007ffff6965013 in _GLOBAL__sub_I_ConditionCreator.cpp(void) () at /home/jbohren/ws/msl/src/cnc-msl/msl_expressions/autogenerated/src/ConditionCreator.cpp:719

The msl_expressions package was including the code that was initializing CGAL, but it was relying on CMAKE_CXX_FLAGS from one of the other packages. When built in isolation, it wasn't getting the flags it needed. This PR adds a cfg-extra which will automatically get all the CGAL stuff when someone depends on msl_worldmodel.

StephanOpfer added a commit that referenced this pull request Jun 7, 2015
Cleaning up CMakeLists to not rely on catkin_make crosstalk
@StephanOpfer StephanOpfer merged commit 5472837 into dasys-lab:master Jun 7, 2015
@StephanOpfer
Copy link
Contributor

@jbohren Thank you, for your help. Now it is fixed.

We are still learning CMake and all that build dependency stuff. "catkin build" is a great tool, as it showed a lot of failures in our build configurations. To be honest, it took be 1 hour to remove all the failures, we had in our configurations. The astonishing fact is, that it all worked with "catkin_make" before.

The failure with the CGAL stuff, would have took be days to find! :)

I personally didn't know about the CFG_EXTRAS command, so here is the documentation for everyone interested: http://docs.ros.org/hydro/api/catkin/html/dev_guide/generated_cmake_api.html#catkin_package.

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

Successfully merging this pull request may close these issues.

None yet

2 participants