Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catkin_make failure #31

Open
CRalli1 opened this issue Jan 20, 2021 · 5 comments
Open

catkin_make failure #31

CRalli1 opened this issue Jan 20, 2021 · 5 comments

Comments

@CRalli1
Copy link

CRalli1 commented Jan 20, 2021

Hi I am trying to install your repo on Ubuntu 20.04 with ROS Noetic and catkin_make is failing. It seems to be to do with also having the common_msgs package in the src folder. Several of the errors shown below come up relating to the different message types in common_msgs.

CMake Error at /home/charlie/catkin_ws/build/common_msgs/sensor_msgs/cmake/sensor_msgs-genmsg.cmake:343 (add_custom_target):
add_custom_target cannot create target "sensor_msgs_generate_messages_cpp"
because another target with the same name already exists. The existing
target is a custom target created in source directory
"/home/charlie/catkin_ws/src/ti_mmwave_rospkg". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
/opt/ros/noetic/share/genmsg/cmake/genmsg-extras.cmake:307 (include)
common_msgs/sensor_msgs/CMakeLists.txt:46 (generate_messages)

However, if i remove common_msgs from the folder I get this error:

CMake Error at /home/charlie/catkin_ws/devel/share/sensor_msgs/cmake/sensor_msgsConfig.cmake:113 (message):
Project 'sensor_msgs' specifies
'/home/charlie/catkin_ws/src/common_msgs/sensor_msgs/include' as an include
dir, which is not found. It does neither exist as an absolute directory
nor in
'/home/charlie/catkin_ws/src/common_msgs/sensor_msgs//home/charlie/catkin_ws/src/common_msgs/sensor_msgs/include'.
Check the website 'http://ros.org/wiki/sensor_msgs' for information and
consider reporting the problem.
Call Stack (most recent call first):
/opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
ti_mmwave_rospkg/CMakeLists.txt:10 (find_package)

I was wondering if there is a workaround or if my setup is wrong.
Looks like the repo will be really useful when it works!
Cheers,
Charlie

@johnnyfox87
Copy link

Try to enable C++14 support in your cmake file:
add_definitions(-std=c++14)
It worked for me.

@CRalli1
Copy link
Author

CRalli1 commented Jan 21, 2021

Thanks for your help. Is that at the top of .../src/ti_mmwave_rospkg/CMakeLists.txt? I just tried adding it where it says add_definitions(-std=c++11) and I'm still getting the same error. :'(

@johnnyfox87
Copy link

Yes that's what I did, but apparently I had a different issue. At least I can tell you that it is running for me on Ubuntu 20.04 with ROS Noetic.

@CRalli1
Copy link
Author

CRalli1 commented Jan 22, 2021

Thanks for your help. That's good to know

@senguptaa
Copy link
Member

Is this issue resolved? Please mark this as closed if the problem no longer persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants