Ask Your Question
0

Message-generation package not found

asked 2018-07-17 00:02:23 -0600

arennuit gravatar image

updated 2018-07-17 00:02:42 -0600

Hi all,

Since a few days I have had the following error mesage:

CMake Warning at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by
  "message_generation" with any of the following names:

    message_generationConfig.cmake
    message_generation-config.cmake

  Add the installation prefix of "message_generation" to CMAKE_PREFIX_PATH or
  set "message_generation_DIR" to a directory containing one of the above
  files.  If "message_generation" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  le_painters_companion/lc_control/CMakeLists.txt:22 (find_package)


-- Could not find the required component 'message_generation'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "message_generation" with any of the following names:

    message_generationConfig.cmake
    message_generation-config.cmake

  Add the installation prefix of "message_generation" to CMAKE_PREFIX_PATH or
  set "message_generation_DIR" to a directory containing one of the above
  files.  If "message_generation" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  le_painters_companion/lc_control/CMakeLists.txt:22 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/arennuit/DevRoot/src/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/arennuit/DevRoot/src/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

I am sure the ros-indigo-message-generation and ros-indigo-message-runtime are installed.

Any idea of what is going on?

Kind regards,

Antoine.

edit retag flag offensive close merge delete

Comments

Can you roscd into those packages? $roscd message_generation brings you to your ros install? Even if you are sure the packages are installed it might help if you reinstall them.

Reamees gravatar image Reamees  ( 2018-07-17 01:28:12 -0600 )edit

Can you find it with:

rospack find message_generation

?

pavel92 gravatar image pavel92  ( 2018-07-17 02:04:42 -0600 )edit

The problem was totally unlinked to ROS, sorry.

arennuit gravatar image arennuit  ( 2018-07-23 01:52:59 -0600 )edit

Hey! I am stuck with the same error, can you elaborate on what you did to solve this? Thanks in advance!

H.Ruthrash gravatar image H.Ruthrash  ( 2019-05-19 10:59:49 -0600 )edit

@arennuit: could you perhaps post an answer which describes what the actual cause was of your problem? Even if it doesn't contain the fix it would already be better than leaving it as a comment.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-29 02:45:11 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
-2

answered 2020-04-28 20:54:21 -0600

Haoming gravatar image

Hi, I get this problem, And fix it. Please attention this point WORD: CMAKE_PREFIX_PATH

now run:

sudo vi  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake

line 67:

set(paths " ")
foreach(path ${CMAKE_PREFIX_PATH})
  if(IS_DIRECTORY ${path}/share/${component}/cmake)
    list(APPEND paths ${path}/share/${component}/cmake)
  endif()
endforeach()

Please add one line:

 set(paths " ")
 message("Fix The fucking bug: ${CMAKE_PREFIX_PATH}")
 foreach(path ${CMAKE_PREFIX_PATH})
  if(IS_DIRECTORY ${path}/share/${component}/cmake)
    list(APPEND paths ${path}/share/${component}/cmake)
  endif()
endforeach()

You will find the ${CMAKE_PREFIX_PATH} is empty or don't has the /opt/ros/kinetic

So, PLEASE ADD ONE LINE IN YOUR PROJECT CMakeLists.txt

set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/opt/ros/kinetic")
edit flag offensive delete link more

Comments

I don't often downvote an answer, but in this case I did.

For two reasons:

  1. message("Fix The fucking bug: ${CMAKE_PREFIX_PATH}")
  2. you should not edit files in /opt/ros. If fixes are needed, propose them upstream. Do not edit files in system locations, as those will be overwritten the next time the package gets updated

Finally: it is very likely the problem described by the OP was also a configuration or setup issue on the side of the OP (ie: his machine or workflow). Notice also the comment posted by @arennuit:

The problem was totally unlinked to ROS, sorry.

Also: manually changing CMAKE_PREFIX_PATH, especially in the file you are doing it, should not and is not needed.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-29 02:43:25 -0600 )edit

Thank for your suggestion

I also agree your word, The system file shound not be edited. And I just for output the debug information. I git checkout the /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake you just need to add set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/opt/ros/kinetic") in yourself project CMakeLists..txt

However, almost people just want to make their project work.

Before the offical solution of the problem, I think it work.

Haoming gravatar image Haoming  ( 2020-04-29 05:27:18 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-07-17 00:02:23 -0600

Seen: 1,385 times

Last updated: Apr 28