librviz_tutorial fails to build with catkin_make_isolated

asked 2019-06-05 18:48:32 -0500

mgeppert gravatar image

updated 2019-06-06 02:46:01 -0500

gvdhoorn gravatar image

I am new to ROS. I just installed ubuntu 18.04 just for ROS and setup the environment (I am using zsh). Note: I had to add my home path to the ROS_PACKAGE_PATH by hand. I saw that it was included in one of the steps and it only had the ROS_ROOT (minus the ros dir) in it. Have no idea if it maters or not. Didn't seem to fix this issue.

Running the "catkin_make_isolated" (in ~/Project/ros_catkin_ws), I fail at the following point:

    [100%] Built target librviz_sip
    <== Finished processing package [229 of 237]: 'rviz'

    ==> Processing catkin package: 'librviz_tutorial'
    ==> Building with env: '/home/mgeppert/Project/ros_catkin_ws/devel_isolated/rviz/env.sh'
    Makefile exists, skipping explicit cmake invocation...
    ==> make cmake_check_build_system in '/home/mgeppert/Project/ros_catkin_ws/build_isolated/librviz_tutorial'
    ==> make -j1 -l1 in '/home/mgeppert/Project/ros_catkin_ws/build_isolated/librviz_tutorial'
    [ 20%] Automatic MOC for target myviz
    [ 20%] Built target myviz_autogen
    [ 40%] Building CXX object CMakeFiles/myviz.dir/src/myviz.cpp.o
    In file included from /home/mgeppert/Project/ros_catkin_ws/src/visualization_tutorials/librviz_tutorial/src/myviz.cpp:36:0:
    /home/mgeppert/Project/ros_catkin_ws/src/rviz/src/rviz/visualization_manager.h:41:10: fatal error: rviz/rviz_export.h: No such file or directory
     #include "rviz/rviz_export.h"
              ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    CMakeFiles/myviz.dir/build.make:62: recipe for target 'CMakeFiles/myviz.dir/src/myviz.cpp.o' failed
    make[2]: *** [CMakeFiles/myviz.dir/src/myviz.cpp.o] Error 1
    CMakeFiles/Makefile2:835: recipe for target 'CMakeFiles/myviz.dir/all' failed
    make[1]: *** [CMakeFiles/myviz.dir/all] Error 2
    Makefile:140: recipe for target 'all' failed
    make: *** [all] Error 2
    <== Failed to process package 'librviz_tutorial': 
  Command '['/home/mgeppert/Project/ros_catkin_ws/devel_isolated/rviz/env.sh', 'make', '-j1', '-l1']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/mgeppert/Project/ros_catkin_ws/build_isolated/librviz_tutorial && /home/mgeppert/Project/ros_catkin_ws/devel_isolated/rviz/env.sh make -j1 -l1

Command failed, exiting.

Environment:

ROS_DISTRO=melodic  
ROS_ETC_DIR=/opt/ros/melodic/etc/ros  
ROS_PACKAGE_PATH=/home/mgeppert/Project/ros_catkin_ws/src:/opt/ros/melodic/share  
ROS_PYTHON_VERSION=2  
ROS_VERSION=1  
ROS_ROOT=/opt/ros/melodic/share/ros  
ROS_MASTER_URI=http://localhost:11311  
ROSLISP_PACKAGE_DIRECTORIES=
edit retag flag offensive close merge delete

Comments

Note: I had to add my home path to the ROS_PACKAGE_PATH by hand.

please don't do that. It should not be necessary.

Also:

Finished processing package [229 of 237]: 'rviz'

can you clarify why you seem to be building everything from source?

gvdhoorn gravatar image gvdhoorn  ( 2019-06-06 02:45:44 -0500 )edit