ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

catkin_make_isolated does not create env.sh

asked 2016-04-11 12:54:29 -0500

heppner gravatar image

Heyho,

I am trying to release a package containing a custom library for which we also use our custom build environment (which does add some convenient macros just as catkin would do). As it is all CMAKE I created a "wrapper" catkin package which will handle catkin dependencies and provide stuff like the package.xml (see https://github.com/fzi-forschungszent... ).

This works really well as long as I use catkin_make to build my workspace. All sources get build and installed correctly and subsequent projects can list this as dependency and so on. When I tried to release it however jenkins failed during presumably trying to execute the code? Here is the output:

[ 82%] Built target test_icl_core_config
[ 83%] Built target test_icl_core_logging
[ 91%] Built target ts_icl_core
[ 93%] Built target ts_icl_core_config
[100%] Built target ts_icl_core_thread
Install the project...
-- Install configuration: "Debug"
-- Installing: /tmp/catkin_workspace/install_isolated/share/tinyxml/tinyxml-config.cmake
-- Installing: /tmp/catkin_workspace/install_isolated/lib/libtinyxml.so
< many many more lines of installing...>
-- Removed runtime path from "/tmp/catkin_workspace/install_isolated/bin/ts_icl_core"
-- Installing: /tmp/catkin_workspace/install_isolated/bin/ts_icl_core_config
-- Removed runtime path from "/tmp/catkin_workspace/install_isolated/bin/ts_icl_core_config"
-- Installing: /tmp/catkin_workspace/install_isolated/bin/ts_icl_core_thread
-- Removed runtime path from "/tmp/catkin_workspace/install_isolated/bin/ts_icl_core_thread"
Unhandled exception of type 'RuntimeError':
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/catkin/builder.py", line 965, in build_workspace_isolated
    number=index + 1, of=len(ordered_packages)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/catkin/builder.py", line 670, in build_package
    "'\n  This sometimes occurs when a non-catkin package is "
RuntimeError: No env.sh file generated at: '/tmp/catkin_workspace/install_isolated/env.sh'
  This sometimes occurs when a non-catkin package is interpreted as a catkin package.
  This can also occur when the cmake cache is stale, try --force-cmake.
<== Failed to process package 'fzi_icl_core': 
  No env.sh file generated at: '/tmp/catkin_workspace/install_isolated/env.sh'
  This sometimes occurs when a non-catkin package is interpreted as a catkin package.
  This can also occur when the cmake cache is stale, try --force-cmake.
Command failed, exiting.
# END SUBSECTION
Build step 'Execute shell' marked build as failure
[WARNINGS]Skipping publisher since build result is FAILURE

Full output can be found here ( http://build.ros.org/job/Idev__fzi_ic... ). I get the same error when I build the package locally with the command

catkin_make_isolated

The suggested --force-cmake does not change anything in this regard.

So I see two solutions, both of which I have no idea how to implement:

  1. Don't execute catkin_make_isolated (on the buildfarm)
  2. Ensure that the env.sh file is correctly created

I guess that I have mixed something without declaring it correctly or something like that but I can not find specific documentation about this (other than the REP for catkin_make_isolated http://www.ros.org/reps/rep-0134.html which does not seem to answer my problem) . Can somebody give me any pointers as to what I am missing?

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-04-11 13:17:27 -0500

Dirk Thomas gravatar image

updated 2016-04-11 13:18:17 -0500

Since your CMake code does not call catkin_package() anywhere it is not really a catkin package. Hence the message:

This sometimes occurs when a non-catkin package is interpreted as a catkin package.

You might want to read REP 136. It might be sufficient if you declare the correct build type in your package manifest:

<export>
  <build_type>cmake</build_type>
</export>
edit flag offensive delete link more

Comments

The Problem with setting the build type to plain cmake I experienced was that I could not use it within a catkin workspace. I would always have to build it with the catkin_make_isolated command which I did not want. But when I use the build Type as you suggested the isolated build works. Thanks

heppner gravatar image heppner  ( 2016-04-11 13:40:27 -0500 )edit
0

answered 2018-06-12 07:18:59 -0500

Just remove the

if(NOT CATKIN_ENABLE_TESTING)

return()

endif()

from the CMakeLists.txt file and it would work like a normal catkin_make file. Then you can smoothly run catkin_make_isolated.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-04-11 12:54:29 -0500

Seen: 2,368 times

Last updated: Jun 12 '18