Ask Your Question
2

catkin_make vs. catkin build for CGAL [closed]

asked 2015-06-05 10:36:22 -0500

updated 2015-06-05 10:38:25 -0500

Hi all,

I have a ROS package, which did work, when I compiled it with "catkin_make". It still compiles with "catkin build" (see catkin_tools), but it does not run anymore. The created executable is using CGAL, and that library is complaining about some rounding issue, when I compile it with "catkin build".

Here is the runtime error:

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)?
Aborted (core dumped)

Does anybody has a clue, why catkin build breaks it? Here is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(msl_base)

## Use c++ 11x std
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

## Enable exception handling for segfaults
set(CMAKE_CXX_FLAGS "-rdynamic -g -fnon-call-exceptions -ggdb ${CMAKE_CXX_FLAGS}")

## Used for cgal
set(CGAL_DONT_OVERRIDE_CMAKE_FLAGS TRUE CACHE BOOL "Don't override flags")
set(CMAKE_CXX_FLAGS "-lCGAL -lCGAL_Core -frounding-math ${CMAKE_CXX_FLAGS}")

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roscpp 
  system_config 
  system_util 
  fsystem 
  autodiff 
  event_handling 
  alica_engine 
  alica_ros_proxy 
  msl_expressions 
  msl_worldmodel
)

find_package(CGAL REQUIRED COMPONENTS Core)


###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
  INCLUDE_DIRS include
  LIBRARIES
  CATKIN_DEPENDS alica_engine alica_ros_proxy msl_expressions msl_simulator msl_worldmodel
  DEPENDS cgal
)

###########
## Build ##
###########


## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(include ${catkin_INCLUDE_DIRS} ${CGAL_INCLUDE_DIRS})
include(${CGAL_USE_FILE})

## Declare a cpp executable
add_executable(msl_base src/Base.cpp)

## Specify libraries to link a library or executable target against
target_link_libraries(msl_base ${catkin_LIBRARIES} ${CGAL_LIBRARIES})

## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
add_dependencies(msl_base ${catkin_LIBRARIES} ${CGAL_LIBRARIES})
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Stopfer
close date 2015-06-26 02:37:46.666702

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-08 02:10:52 -0500

With a lot of help from JBohren, this has been fixed. See: https://github.com/catkin/catkin_tool...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-06-05 10:36:22 -0500

Seen: 909 times

Last updated: Jun 08 '15