Catkin_make fails from saved files

asked 2017-12-27 11:16:57 -0500

monabf gravatar image

updated 2017-12-27 12:46:20 -0500

Hi everyone!

My catkin workspace has been compiling fine for a few weeks, before upgrading and adding a plugin a few days ago I saved it on github. No idea what I did when adding this plugin, but the workspace did not build anymore (invoking catkin_make failed at 9%), so I thought I would simply go back to the saved version and add the source files that had changed since then one by one.

However catkin_make fails even using the saved build, devel and src folders on github, which I know compiled earlier. I have created a new workspace using this tutorial, everything works fine, but then when I replace the empty src folder with my saved one catkin_make fails (Invoking "make -j48 -l48" failed at 9%). Same if I also replace the devel folder with the saved version. I have tried using a clean terminal, have done source /opt/ros/kinetic/setup.bash before building the empty workspace for the first time and source devel/setup.bash after the first build. echo $ROS_PACKAGE_PATH returns /home/MBuisson-fenet/simulation/catkin_ws/src:/home/MBuisson-fenet/simulation_new_try/catkin_ws/src:/opt/ros/kinetic/share, which kind of confuses me since "simulation" is where I had catkin_make fail for the first time, and "simulation_new_try" is where I am trying to retrieve my saved workspace right now. I have updated and upgraded my computer.

I am using ROS Kinetic, Ubuntu 16.04 and Cmake 3.5.1.

I really don't know what to do anymore, so any help would be greatly appreciated! Many thanks!

End of the output of catkin_make:

[  9%] Performing build step for 'glog_src'
make[3]: warning: -jN forced in submake: disabling jobserver mode.
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -I/include -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-raw_logging.lo -MD -MP -MF src/.deps/libglog_la-raw_logging.Tpo -c src/raw_logging.cc  -fPIC -DPIC -o src/.libs/libglog_la-raw_logging.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -I/include -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-vlog_is_on.lo -MD -MP -MF src/.deps/libglog_la-vlog_is_on.Tpo -c src/vlog_is_on.cc  -fPIC -DPIC -o src/.libs/libglog_la-vlog_is_on.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -I/include -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-logging.lo -MD -MP -MF src/.deps/libglog_la-logging.Tpo -c src/logging.cc  -fPIC -DPIC -o src/.libs/libglog_la-logging.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -I/include -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-symbolize.lo -MD -MP -MF src/.deps/libglog_la-symbolize.Tpo -c src/symbolize.cc  -fPIC -DPIC -o src/.libs/libglog_la-symbolize.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -I/include -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-signalhandler.lo -MD -MP -MF src/.deps/libglog_la-signalhandler.Tpo -c src/signalhandler.cc  -fPIC -DPIC -o src/.libs/libglog_la-signalhandler.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -I/include -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare ...
(more)
edit retag flag offensive close merge delete

Comments

1

Versioning devel and build folders is not really worth it: they'll be regenerated next build anyway, and they are machine (and configuration) specific.

As to the issues youare having: 'fails' and 'did not build anymore' is too vague. We're going to need specifics: errors (copy-pasted) and ..

gvdhoorn gravatar image gvdhoorn  ( 2017-12-27 12:00:57 -0500 )edit

.. some info on how you setup your workspace and how you are trying to build it.

Please update your original question with that info (edit it using the edit link/button).

gvdhoorn gravatar image gvdhoorn  ( 2017-12-27 12:01:33 -0500 )edit

@gvdhoorn I added the output of catkin_make (the way I am trying to build it is just cd catkin_ws and then catkin_make) and my CMakeLists.txt. I hope that helps, let me know if you need anything else!

monabf gravatar image monabf  ( 2017-12-27 12:41:46 -0500 )edit

I set up my workspace by creating a new catkin workspace following the ROS tutorials. My src folder is pretty big with lots of different plugins, scripts etc, but those same source files used to compile when I saved them so I don't think they're the issue...

monabf gravatar image monabf  ( 2017-12-27 12:44:28 -0500 )edit

I only see a nr of warnings in the output you've copy-pasted, so I'm not sure why the build is failing at this point.

re: your CMakeLists.txt: that is the default, top-level one (ie, in your workspace root), not a CMakeLists.txt you wrote yourself (I hope, at least).

gvdhoorn gravatar image gvdhoorn  ( 2017-12-27 15:28:09 -0500 )edit

One of the more quicker ways of figuring out what is not working anymore is to selectively build (sub)sets of pkgs in your workspace. Using a binary search will typically quickly point to a particular (set of) package(s).

gvdhoorn gravatar image gvdhoorn  ( 2017-12-27 15:31:17 -0500 )edit

My problem exactly, I can't see when it fails. Sorry for the CMakeLists! It's the top level one provided by Ardupilot for the Gazebo simulations I'm using (if I'm not mistaken), I don't think I've written any myself for this project.

monabf gravatar image monabf  ( 2017-12-27 15:36:12 -0500 )edit

I'll try building it piece by piece and tell you how it goes. But it's so annoying to see that folders saved exactly the way they were compiling just aren't anymore...

monabf gravatar image monabf  ( 2017-12-27 15:37:55 -0500 )edit