hsnuhayato / rtm-ros-robotics

Automatically exported from code.google.com/p/rtm-ros-robotics
0 stars 0 forks source link

Error "catkin_package() include dir 'include' is neither an absolute directory nor exists relative to" #162

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With r5075 catkin_make fails:

    $ catkin_make
    :
    -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    -- +++ processing catkin package: 'openrtm_aist'
    -- ==> add_subdirectory(openrtm_common/openrtm_aist_core/openrtm_aist)
    You have called ADD_LIBRARY for library RTC without any source files. This typically indicates a problem with your CMakeLists.txt file
    You have called ADD_LIBRARY for library coil without any source files. This typically indicates a problem with your CMakeLists.txt file
    -- checking for module 'omniORB4'
    --   found omniORB4, version 4.1.6
    -- checking for module 'omniDynamic4'
    --   found omniDynamic4, version 4.1.6
    CMake Error at /opt/ros/hydro/share/catkin/cmake/catkin_package.cmake:335 (message):
      catkin_package() include dir 'include' is neither an absolute directory nor
      exists relative to
      '/home/n130s/data/Dropbox/ROS/hydro_precise/catkinws/src/openrtm_common/openrtm_aist_core/openrtm_aist'
    Call Stack (most recent call first):
      /opt/ros/hydro/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
      openrtm_common/openrtm_aist_core/openrtm_aist/catkin.cmake:80 (catkin_package)
      openrtm_common/openrtm_aist_core/openrtm_aist/CMakeLists.txt:2 (include)

    -- Configuring incomplete, errors occurred!
    Invoking "cmake" failed

I've attemted to move related packages (openrtm_aist, openrtm_aist_python) to 
the following different locations and ran catkin_make, but the error message is 
the same:

- %CATKIN_SRC%/openrtm_common/openrtm_aist_core (default)
- %CATKIN_SRC%/openrtm_common
- %CATKIN_SRC%/

Original issue reported on code.google.com by gm130s on 15 Aug 2013 at 10:51

GoogleCodeExporter commented 9 years ago
This should be fixed in r5977,

Original comment by kei.ok...@gmail.com on 16 Aug 2013 at 12:26

GoogleCodeExporter commented 9 years ago
Unfortunately r5077 doesn't seem to fix this.
In fact with tag openrtm_common-3.1.5 (probably the one made in r5071) the same 
error occurs.

Original comment by gm130s on 16 Aug 2013 at 12:49

GoogleCodeExporter commented 9 years ago
r5079 bypasses the issue, but then occurs with hrpsys too, which was able to be 
worked around by r5081. Closing until this becomes an issue again.

    running install_egg_info
    Writing /home/n130s/data/Dropbox/ROS/hydro_precise/catkinws/src/openrtm_common/openrtm_aist_core/openrtm_aist_python/lib/python2.7/site-packages/OpenRTM_aist_Python-1.1.0-py2.7.egg-info
    touch installed
    -- +++ processing catkin package: 'openhrp3'
    -- ==> add_subdirectory(openrtm_common/openhrp3)
    -- +++ processing catkin package: 'hrpsys'
    -- ==> add_subdirectory(openrtm_common/hrpsys)
    CMake Error at /opt/ros/hydro/share/catkin/cmake/catkin_package.cmake:335 (message):
      catkin_package() include dir 'include' is neither an absolute directory nor
      exists relative to
      '/home/n130s/data/Dropbox/ROS/hydro_precise/catkinws/src/openrtm_common/hrpsys'
    Call Stack (most recent call first):
      /opt/ros/hydro/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
      openrtm_common/hrpsys/catkin.cmake:78 (catkin_package)
      openrtm_common/hrpsys/CMakeLists.txt:2 (include)

    -- Configuring incomplete, errors occurred!
    Invoking "cmake" failed

Original comment by gm130s on 16 Aug 2013 at 1:54

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r5082.

Original comment by kei.ok...@gmail.com on 16 Aug 2013 at 2:48

GoogleCodeExporter commented 9 years ago
The problems was execute_process(COMMAND a COMMAND b) is interpreted as `a|b` 
and 

execute_process(COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} make -f Makefile.openrtm_aist installed COMMAND cmake -E copy_directory ${PROJECT_SOURCE_DIR}/bin ${CATKIN_DEVEL_PREFIX}/lib/${PROJECT_NAME}/bin # force copy under devel for catkin_package

does not work as I expected, so change to

execute_process(COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} make -f Makefile.openrtm_aist) execute_process(COMMAND cmake -E copy_directory ${PROJECT_SOURCE_DIR}/bin ${CATKIN_DEVEL_PREFIX}/lib/${PROJECT_NAME}/bin)

Original comment by kei.ok...@gmail.com on 16 Aug 2013 at 2:56

GoogleCodeExporter commented 9 years ago
note:
there are two way to invoke make -f Makefile.hogehoge, one is to use 
execute_process and other is to use add_custom_command, 
execute_process is called when cmake parsed catkin.cmake, where as 
add_custom_command is called when cmake runs make command.
If you need to use other package's path (i.e openrtm_aist_PREFIX) you need to 
use add_custom_command (as far as I understand...)
In addition to this, execute_process could not run command as PATH=hogehoge 
cmake, where as add_custom_command is able to run such command.

Therefor, currently, openrtm_aist uses execute_command, and other package 
(openhrp3, hrpsys) uses add_custom_command to use add_custom_command. 
openrtm_aist can use add_custom_command but using execute_process for 
openhrp3/hrpsys may difficult.

Original comment by kei.ok...@gmail.com on 16 Aug 2013 at 4:19