Package Details: ros-indigo-orocos-kdl 1.3.1-1

Git Clone URL: https://aur.archlinux.org/ros-indigo-orocos-kdl.git (read-only)
Package Base: ros-indigo-orocos-kdl
Description: ROS - This package contains a recent version of the Kinematics and Dynamics Library (KDL), distributed by the Orocos Project.
Upstream URL: http://wiki.ros.org/orocos_kdl
Licenses: LGPL
Submitter: bchretien
Maintainer: None
Last Packager: bchretien
Votes: 2
Popularity: 0.000000
First Submitted: 2014-06-07 15:53
Last Updated: 2016-04-14 05:18

Latest Comments

1 2 Next › Last »

bchretien commented on 2016-01-19 14:29

@korken89: also, which package owns that FindEigen.cmake? You can type:

$ pacman -Qo /usr/share/cmake-3.4/Modules/FindEigen.cmake

bchretien commented on 2016-01-19 14:24

@korken89: I think the Eigen_INCLUDE_DIR variable is often used, but is actually part of the cache in most FindEigen.cmake implementations, and not an expected output variable. Since projects may have multiple include directories, *_INCLUDE_DIRS is more commonly used. The problem (common with CMake) is that the management of these modules is a huge mess, which leads to that kind of problem. I guess now you understand why I am an advocate of the pkg-config solution, as it tends to unify all of this...

I think the best course of action is to notify the developers: https://github.com/orocos/orocos_kinematics_dynamics

Explain the problem, and provide a patch through a pull request. Then I can apply that patch in the PKGBUILD until they release the next version.

korken89 commented on 2016-01-19 14:06

Here is the (common) instructions from the FindEigen.cmake files:
- Eigen_FOUND: Boolean that indicates if the package was found
- Eigen_INCLUDE_DIRS: Paths to the necessary header files
- Eigen_VERSION: Version of Eigen library found
- Eigen_DEFINITIONS: Definitions to be passed on behalf of eigen

Example usage:

# Passing the version means Eigen_FOUND will only be TRUE if a
# version >= the provided version is found.
find_package(Eigen 3.1.2)
if(NOT Eigen_FOUND)
# Error handling
endif()
...
add_definitions(${Eigen_DEFINITIONS})
...
include_directories(${Eigen_INCLUDE_DIRS} ...)

So it seems to be an error in the variable name in this package.

korken89 commented on 2016-01-19 13:58

I have 2 in my system (3 with the one in tmp):
/opt/ros/indigo/share/cmake_modules/cmake/Modules/FindEigen.cmake
/usr/share/cmake-3.4/Modules/FindEigen.cmake

The one being used is: /usr/share/cmake-3.4/Modules/FindEigen.cmake
And the variable seems to be set correctly in it (I can message it without problem), but it has the name Eigen_INCLUDE_DIRS <- note the S on the end.
This seems to be what is causing the problem.

But, the ROS one is also using Eigen_INCLUDE_DIRS (with an S on the end):
set(Eigen_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})

Is this an error in this package?

bchretien commented on 2016-01-19 13:41

@korben89: now, check if you're using your own FindEigen.cmake (available somewhere on your system), or their bundled FindEigen3.cmake. Normally you removed the other AUR package, but maybe you have another one installed from another package. Note that in my case, I end up using their bundled script (which could also be improved btw...).

korken89 commented on 2016-01-19 13:32

Okey, checked this and it is empty at this point.

bchretien commented on 2016-01-19 13:10

@korken89: so if you check the main CMakeLists.txt:

find_package(Eigen 3 QUIET)
if(NOT Eigen_FOUND)
include(${PROJ_SOURCE_DIR}/config/FindEigen3.cmake)
set(Eigen_INCLUDE_DIR ${EIGEN3_INCLUDE_DIR})
endif()
include_directories(${Eigen_INCLUDE_DIR})

Here, you can add `MESSAGE("Eigen: ${Eigen_INCLUDE_DIR}")` to confirm the diagnostic. Right after, they do `SET(KDL_CFLAGS "${KDL_CFLAGS} -I${Eigen_INCLUDE_DIR}")`, so if the variable is unset/empty, you get your problem. Can you first check that?

Also, did you remove the build directory before re-running this? CMake does not always catch changes on the project/system, so it's always safer to do a clean cmake call to make sure it does not keep on using its (wrong) caches.

korken89 commented on 2016-01-19 13:03

Okey, I did remove that - but the same error persists.

The make says it finds eigen3 (and the path is correct, but the variable that the ROS FindEigen.cmake provides (Eigen_INCLUDE_DIRS) seems to not be included in the compile from what I can see in the CMakeCache.txt.

Any ideas?

I did the same test on a different machine that did not have the eigen parts installed, and it has the same error.

bchretien commented on 2016-01-19 12:48

@korken89: besides, ROS ships its own FindEigen.cmake. And if you take a look at it, you'll see that they use pkg_check_modules.

bchretien commented on 2016-01-19 12:42

@korken89: these files are automatically generated by CMake, so don't modify them manually. I think the problem is that eigen-cmake-git... That project does not make much sense actually. Eigen supports pkg-config, which is how people should check for Eigen. FYI, in CMake, all you need to do is `pkg_check_modules(EIGEN eigen3)`. That's it. So you should *really* remove that, and rebuild the packages. Since ROS tends to generate paths and store them in its own packaged CMake files, you may need to recompile previous ROS packages as well.