# Problem installing openni_camera (pcl) and openni_tracker (kdl) on Archlinux

$uname -a Linux samurai 2.6.39-ARCH #1 SMP PREEMPT Mon Jun 27 21:26:22 CEST 2011 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.6.1/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --disable-multilib --disable-libstdcxx-pch --enable-checking=release
gcc version 4.6.1 (GCC)

\$ rosmake openni_camera

[ rosmake ] Last 40 linesl: 77.9 sec ]                                                    [ 1 Active 49/52 Complete ]
{-------------------------------------------------------------------------------
from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/point_types.h:40,
from /usr/local/opt/ros/perception_pcl/pcl/src/pcl/sample_consensus/sac_model_circle.cpp:39:
/usr/local/opt/ros/geometry/eigen/include/Eigen/src/Core/products/Parallelizer.h: In function ‘void Eigen::internal::manage_multi_threading(Eigen::Action, int*)’:
/usr/local/opt/ros/geometry/eigen/include/Eigen/src/Core/products/Parallelizer.h:33:14: warning: variable ‘m_maxThreads’ set but not used [-Wunused-but-set-variable]
In file included from /usr/local/opt/ros/geometry/eigen/include/Eigen/Core:328:0,
from /usr/local/opt/ros/geometry/eigen/include/Eigen/StdVector:29,
from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/pcl_base.h:41,
from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/sample_consensus/sac_model.h:45,
from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/sample_consensus/sac_model_cylinder.h:41,
from /usr/local/opt/ros/perception_pcl/pcl/src/pcl/sample_consensus/sac_model_cylinder.cpp:38:
/usr/local/opt/ros/geometry/eigen/include/Eigen/src/Core/products/Parallelizer.h: In function ‘void Eigen::internal::manage_multi_threading(Eigen::Action, int*)’:
/usr/local/opt/ros/geometry/eigen/include/Eigen/src/Core/products/Parallelizer.h:33:14: warning: variable ‘m_maxThreads’ set but not used [-Wunused-but-set-variable]
In file included from /usr/local/opt/ros/geometry/eigen/include/Eigen/src/StlSupport/StdVector.h:29:0,
from /usr/local/opt/ros/geometry/eigen/include/Eigen/StdVector:38,
from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/pcl_base.h:41,
from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/sample_consensus/sac_model.h:45,
from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/sample_consensus/sac_model_cylinder.h:41,
from /usr/local/opt/ros/perception_pcl/pcl/src/pcl/sample_consensus/sac_model_cylinder.cpp:38:
/usr/local/opt/ros/geometry/eigen/include/Eigen/src/StlSupport/details.h: At global scope:
**/usr/local/opt/ros/geometry/eigen/include/Eigen/src/StlSupport/details.h:41:13: error: ‘ptrdiff_t’ does not name a type**
[ 30%] Building CXX object CMakeFiles/pcl_sample_consensus.dir/src/pcl/sample_consensus/sac_model_normal_parallel_plane.o
In file included from /usr/local/opt/ros/geometry/eigen/include/Eigen/Core:328:0,
from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/point_types.h:40,
from /usr/local/opt/ros/perception_pcl/pcl/src/pcl/sample_consensus/sac_model_normal_parallel_plane.cpp:38:
/usr/local/opt/ros ...
edit retag close merge delete

Sort by » oldest newest most voted

Regarding one of the compilation errors above:

pcl compilation error

Patch and ticket submitted to https://code.ros.org/trac/ros-pkg/ticket/5054

pcl_ros also had problems with gcc 4.6.

In the end, I had to specify the compiler as gcc-4.5 and g++-4.5, by adding

set (CMAKE_C_COMPILER gcc-4.5)
set (CMAKE_CXX_COMPILER g++4.5)


after the rosbuild directives in CMakeLists.txt for pcl_ros.

As for kdl, the patches are already applied, but the Makefile is trying to apply the patch again. The fix is to remove the patching line in the Makefile of the kdl package.

more

Samurai is not a commonly used distro to run ROS, there will likely be several problems getting things to compile.

For pcl your error is: /usr/local/opt/ros/geometry/eigen/include/Eigen/src/StlSupport/details.h:41:13: error: ‘ptrdiff_t’ does not name a type

Likely you're missing a system dependency which defines this type. For more help with the kdl problems we will need things like what version you are installing and how you installed it.

more

"samurai" is actually just the name of my computer. I am using Archlinux with linux kernal 2.6.39.

I am using the diamondback ROS release with the latest update by rosinstall.

For the error involving the pcl package, I had googled that error, though without success. I checked the manifest.xml of pcl. The only independent system dependency is libqhull, which I have installed. And all the other ROS package dependencies (cminpack, eigen, flann) have all been built. Some people have a similar error while compiling another C++ library, and it appeared to be an issue with compiling directives...

Which version of gcc does ROS recommend? I can't seem to find this information anywhere. How can you use another gcc version, if you have it installed?

As for kdl, the manifest description reads

This package contains a recent version of the Kinematics and Dynamics Library (KDL), distributed by the Orocos Project. For stability reasons, this package is currently locked to revision 31715 of April 26 2010 (C-turtle) and revision 30401 of August 8 2009 (Boxturtle), but this revision will be updated on a regular basis to the latest available KDL trunk. This ROS package does not intend to modify KDL in any way, it simply provides a convenient way to download and compile the library, because KDL is not available from an OS package manager. However, this package might contain some temporary patches to KDL while they are being applied upstream, or while a permanent fix for a problem is being discussed by the KDL community.

What I can't figure out is why the 4 patches to kdl failed, as described in my original post. Is it system specific?

more