Ask Your Question
0

**ERROR building Eclipse project!** with "make eclipse-project"

asked 2012-08-20 23:54:23 -0600

sacrif gravatar image

updated 2014-01-28 17:13:24 -0600

ngrennan gravatar image

Hi,

I am currently trying to create eclipse projects for my cpp nodes in ros fuerte according to this guidelines. Unfortunately the error "ERROR building Eclipse project!" occurs (the whole output is in the quote at the end of this post) if I move to the package directory (via roscd) and type "make eclipse-project" . After that the directory does not contain eclipse project files. The only new file in the package folder is named "cmake_install.cmake". Do you have any suggestions what might have gone wrong?

Thanks & Regards scr

user@computer:~/path/my_package$ make eclipse-project 
mv Makefile Makefile.ros
if ! (cmake -G"Eclipse CDT4 - Unix Makefiles" -Wno-dev . && rm Makefile && rm CMakeCache.txt && rm -rf CMakeFiles); then mv Makefile.ros Makefile && echo "**ERROR building Eclipse project!**" && false; fi
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonInterp: /usr/bin/python2.7 
[rosbuild] Building package my_package
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
[rosbuild] Including /opt/ros/fuerte/share/roslisp/rosbuild/roslisp.cmake
[rosbuild] Including /opt/ros/fuerte/share/rospy/rosbuild/rospy.cmake
[rosbuild] Including /opt/ros/fuerte/share/roscpp/rosbuild/roscpp.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /path/my_package
mv Makefile.ros Makefile
mv .project .project-cmake
awk -f /opt/ros/fuerte/share/ros/core/mk/eclipse.awk .project-cmake > .project
rm .project-cmake
python /opt/ros/fuerte/share/ros/core/mk/make_pydev_project.py
Creating pydev project for package 'my_package'
Writing .pydevproject, adding 27 modules

EDIT1: I am using ros fuerte - edited in text above.

EDIT2: I tried to set back the cmake.mk to the electric version by exchanging the following line from the fuerte file:

if ! (cmake -G"Eclipse CDT4 - Unix Makefiles" -Wno-dev . && rm Makefile && rm CMakeCache.txt && rm -rf CMakeFiles); then mv Makefile.ros Makefile && echo "**ERROR building Eclipse project!**" && false; fi

with the following lines of the electric file:

cmake -G"Eclipse CDT4 - Unix Makefiles" -Wno-dev .
rm Makefile
rm CMakeCache.txt
rm -rf CMakeFiles

Unfortunately, the eclipse project files are still not build.

edit retag flag offensive close merge delete

Comments

I just wrote a very simple test and it worked for me in ROS Electric. All I did was "roscreate-pkg test" and inside the package folder "make eclipse-project". The project was created successfully. I have used this feature in my own projects as well. Could this be a problem in Fuerte?

georgebrindeiro gravatar imagegeorgebrindeiro ( 2012-08-21 02:17:18 -0600 )edit

Thanks for the replies. Yes I am using ros fuerte (just edited that)! I will try changing the makefile and report back.

sacrif gravatar imagesacrif ( 2012-08-21 03:07:11 -0600 )edit

I just tried to modify the make file as stated in EDIT2 of the main post. As a result the error message did of course not occur. However, the project files still do not occur in the package folder. Do you have any other ideas what could be wrong?

sacrif gravatar imagesacrif ( 2012-08-21 03:29:42 -0600 )edit

Not really... I suggest looking into the repository for rosbuild and checking out the revision history, perhaps: https://code.ros.org/svn/ros/stacks/ros/trunk/core/rosbuild

georgebrindeiro gravatar imagegeorgebrindeiro ( 2012-08-21 03:56:12 -0600 )edit

Otherwise, I suggest trying the downgrade to Electric in a virtual machine to test this feature: apparently there was a major update in the build system, and it might actually be broken in Fuerte.

georgebrindeiro gravatar imagegeorgebrindeiro ( 2012-08-21 03:59:22 -0600 )edit

This is the commit log for that change, made by Gerkey himself: https://code.ros.org/gf/project/ros/mailman/?action=ListThreads&mailman_id=3&_forum_action=MessageReply&message_id=88464

What programming language are you working with? Have you installed Eclipse CDT?

georgebrindeiro gravatar imagegeorgebrindeiro ( 2012-08-21 04:21:26 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-08-21 02:24:03 -0600

Check out the first statement called by make eclipse-project. It is different from what I see in ROS Electric and is exactly what is getting you that error message. I don't know why it changed, but here is the difference.

ROS Electric (works)

mv Makefile Makefile.ros
cmake -G"Eclipse CDT4 - Unix Makefiles" -Wno-dev .

Your version (Fuerte?)

mv Makefile Makefile.ros
if ! (cmake -G"Eclipse CDT4 - Unix Makefiles" -Wno-dev . && rm Makefile && rm CMakeCache.txt && rm -rf CMakeFiles); then mv Makefile.ros Makefile && echo "**ERROR building Eclipse project!**" && false; fi

I just Googled the return value of rm and it seems like it usually returns 0 (as most Linux programs that run successfully anyway), so it makes sense that the condition will evaluate to that error. I would try switching this statement in the Makefile and see what happens.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2012-08-20 23:54:23 -0600

Seen: 1,347 times

Last updated: Aug 21 '12