0
$\begingroup$

Rosanswers logo

mkdir -p bin

cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=rospack find osbuild/rostoolchain.cmake .. [rosbuild] Building package New [rosbuild] Cached build flags older than manifests; calling rospack to get flags

Failed to invoke /opt/ros/fuerte/bin/rospack cflags-only-I;--deps-only New CMake Error at /usr/lib/vtk-5.8/VTKTargets.cmake:16 (ADD_EXECUTABLE): Command add_executable() is not scriptable

Call Stack (most recent call first): /usr/lib/vtk-5.8/VTKConfig.cmake:231 (INCLUDE) /usr/share/cmake-2.8/Modules/FindVTK.cmake:73 (FIND_PACKAGE) /opt/ros/fuerte/stacks/perception_pcl/pcl/vtk_include.cmake:1 (find_package)

CMake Error at /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:129 (message):

Failed to invoke rospack to get compile flags for package 'New'.  Look
above for errors from rospack itself.  Aborting.  Please fix the broken
dependency!

Call Stack (most recent call first): /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:227 (rosbuild_invoke_rospack) CMakeLists.txt:12 (rosbuild_init)


I am facing this error to compile my packages. Can anybody help me. I am using Ubuntu 12.04. ROS fuerte.


Originally posted by Muhammad Atif on ROS Answers with karma: 3 on 2013-06-07

Post score: 5


Original comments

Comment by sai on 2013-06-07:
same issue here too

Comment by abencz on 2013-06-07:
Seeing the same as well when compiling husky_simulator in fuerte on 12.04. The same package on the same machine works fine in groovy.

Comment by yanma on 2013-06-07:
This is effecting gazebo plugins compilation as well, since gazebo seems depends on perception_pcl. Seem to be broken by a Ubuntu update this week.

Comment by sai on 2013-06-07:
thats true, after update, the package is not compiling, pls post the answer once you solve the issue

Comment by martimorta on 2013-06-10:
Same problem with laser_scan_matcher ...

Comment by brice rebsamen on 2013-06-11:
would be great if one of you could post a bug report on github and post the link to it here

Comment by martimorta on 2013-06-12:
somebody did @brice rebsamen https://github.com/ros-perception/perception_pcl/issues/18

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I am using fuerte on 12.04, and had the same problem. Here's my workaround and now I can rosmake my packages again! Since the error occurred at the perception_pcl stack, I overlaid it and recompiled the stack with the patch in my own workspace, thanks to this post

answers.ros.org/question/49447/error-with-pcl_ros-in-ros-fuerte/.

During the recompilation of the stack, it also bit me with another couple of errors, e.g., I had to softlink the GL header folder, and rebuild VTK with the -fPIC option (because I manually installed VTK previously with all default options).

Here are the steps, which are just a workaround and I hope a real solution is coming with a good ROS update.

  1. Copy the perception_pcl stack from /opt/ros/ to your workspace, and cd into it.
  2. rosws set pcl.
  3. rosws update pcl. (After this, resource your setup.bash file, and check if the new stack is in your $ROS_PACKAGE_PATH)
  4. Install the patch:

code.ros.org/trac/ros-pkg/attachment/ticket/5243/perception_pcl-1.0.1-vtk5.8.patch.

  1. Delete all build folders (found two in pcl/ and pcl/msg/, respectively).
  2. rosmake pcl (Don't forget to delete the ROS_NOBUILD dummy beforehand) (Here I was given a compiling error related to VTK. If you luckily don't have it, go straight to Step 9.)
  3. Re-do your VTK.
    1. cd into your VTK source folder.
    2. mkdir build and cd into it.
    3. cmake .. gave me a missing file error as "file STRINGS file "/usr/local/include/GL/glx.h" cannot be read".
    4. sudo ln -s /usr/include/GL /usr/local/include
    5. ccmake . to configure your VTK
    6. make CFLAGS=-fPIC
    7. sudo make install
  4. rosmake pcl.
  5. rosmake your_package.
  6. YEH!

Originally posted by Jiayi Liu with karma: 166 on 2013-06-09

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Muhammad Atif on 2013-06-09:
@Jiayi Liu.it did not work for me. i have installed ROS-fuerte by using apt-get. Steps I have followed are.I have confusion at 4th step and 5th step.I am new to Ubuntu and ROS might b i am doing mistakes. The output of 4th step is "patching file manifest.xml Hunk #1 FAILED at 31. 1 out of 1 hunk FA"

Comment by Jiayi Liu on 2013-06-10:
Hey @Muhammad Atif. By saying "install", I mean making changes to corresponding files, according to the diffs. Btw, how did you get that output?

Comment by Muhammad Atif on 2013-06-10:
@Jiayi Liu.Now I have done the same just change the files.One thing i want to tell you i installed ROS by "apt-get".I have copied the perception_pcl package from /opt/ros/fuerte/stacks to /home/atif/fuerte_workspace. i have my package is /home/atif/fuerte_workspace/sandbox I am doing rite ?

Comment by VicL on 2013-06-11:
Hi Jiayi, when i modified "cmake -P ${prefix}/vtk_include.cmake`" lflags="-L`cmake -P ${prefix}/vtk_library.cmake" to "cat ${prefix}/vtk_include_dirs.txt`" lflags="-L`cat ${prefix}/vtk_library_dirs.txt", this is what I got (next comment!)

Comment by VicL on 2013-06-11:
"cat: /opt/ros/fuerte/stacks/perception_pcl/pcl/vtk_include_dirs.txt: No such file or directory".

rosmake pcl didnt show any errors.

Should I have deleted the perception_pcl stack at /opt/ros/fuerte/stacks?

Bythe way, what do you mean by redo VTK? Where shld the source file be at?

Comment by VicL on 2013-06-11:
my package is in ~/fuerte_workspace/ btw!

Comment by sai on 2013-06-11:
The above answer worked when I installed a fresh copy of ubuntu 12.04 and fuerte and solved the issue

Comment by Alexandr Buyval on 2013-06-11:
Thank you. It work.

Comment by Jiayi Liu on 2013-06-12:
@Muhammad Atif. 1) As shown in ROS documentation, apt-get is the correct way to install ROS stack binaries, which downloads the stacks to your /opt path.

Comment by Jiayi Liu on 2013-06-12:
2) You are right. Make sure to run Step 2-3 to put the new pcl in the ROS PACK PATH. You can try "echo $ROS_PACKAGE_PATH" to check the new stack is shown.

Comment by Jiayi Liu on 2013-06-12:
Hi @VicL, 1) it seems that your overlay is not working as expected. Your rosbuild still finds perception_pcl in the /opt path instead of your workspace. Use rosws to setup the overlay, and use "echo $ROS_PACKAGE_PATH" to check the stack shows up in your workspace.

Comment by Jiayi Liu on 2013-06-12:
2) I won't suggest you do that. 3) Because long time ago I had a manual installation of VTK without creating a shared library (the -fPIC option), which caused a building error in Step 6. So if you were not messing with VTK from source code, you shouldn't worry about the entire Step 7.

Comment by jemalo on 2013-06-12:
Thanks a lot, it works for me (ROS fuerte + Ubuntu 12.04). But when I launch move_base, it cannot find the file libpcl-ros-tf.so. Then I've re-installed "ros-fuerte-perception-pcl" and move_base runs all right. I hope that someone can propose a better solution.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.