Running into build issues again

I am getting into build issues repeatedly due to VM issues. Can you help me with steps to fix this?

Steps to reproduce:
cd /home/user/catkin_ws
rm -rf build/ devel/
source /home/user/.catkin_ws_python3/dnn_venv/bin/activate
source /home/user/.catkin_ws_python3/devel/setup.bash
catkin_make

Scanning dependencies of target geometry_msgs_generate_messages_nodejs
[ 0%] Built target geometry_msgs_generate_messages_nodejs
Scanning dependencies of target std_msgs_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_nodejs
Scanning dependencies of target my_randomgazebomanager_pkg_generate_messages_lisp
[ 14%] Generating Lisp code from my_randomgazebomanager_pkg/FetchMove.srv
Traceback (most recent call last):
File “/opt/ros/kinetic/lib/python2.7/dist-packages/genlisp/genlisp_main.py”, line 73, in genmain
retcode = generate_srv(options.package, args[1:], options.outdir, search_path)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/genlisp/generate.py”, line 733, in generate_srv
generate_srv_from_spec(msg_context, spec, search_path, out_dir, pkg, f)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/genlisp/generate.py”, line 835, in generate_srv_from_spec
load_srv_from_file(msg_context, ‘%s/%s%s’%(srv_path, srv, ext), ‘%s/%s’%(package, srv))
File “/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/msg_loader.py”, line 485, in load_srv_from_file
text = f.read()
File “/home/user/.catkin_ws_python3/dnn_venv/lib/python3.5/encodings/ascii.py”, line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xa2 in position 37: ordinal not in range(128)
ERROR: ‘ascii’ codec can’t decode byte 0xa2 in position 37: ordinal not in range(128)
my_randomgazebomanager_pkg/CMakeFiles/my_randomgazebomanager_pkg_generate_messages_lisp.dir/build.make:65: recipe for target ‘/home/user/catkin_ws/devel/share/common-lisp/ros/my_randomgazebomanager_pkg/srv/FetchMove.lisp’ failed
make[2]: *** [/home/user/catkin_ws/devel/share/common-lisp/ros/my_randomgazebomanager_pkg/srv/FetchMove.lisp]Error 3
CMakeFiles/Makefile2:2543: recipe for target ‘my_randomgazebomanager_pkg/CMakeFiles/my_randomgazebomanager_pkg_generate_messages_lisp.dir/all’ failed
make[1]: *** [my_randomgazebomanager_pkg/CMakeFiles/my_randomgazebomanager_pkg_generate_messages_lisp.dir/all] Error 2
Makefile:138: recipe for target ‘all’ failed
make: *** [all] Error 2
Invoking “make -j2 -l2” failed
(dnn_venv) user:~/catkin_ws$

Thanks

got it fixed by rebuilding the workspace

1 Like

Hi Shreyas I can see on your question that you were already rebuilding the workspace (since you were deleting the build and devel directories. Hence, your solution should have worked on the first place.

Can you explain a little bit which extra steps did you take to make it work. It may help other users.

@rtellez,
One clean way was to build another workspace and rebuild the current one from scratch.

I also did try few hacky way. My build was failing on gazebo plugin of other environment. I tried to find the files that were missing. replaced or added them to the repo. This fixed most of the errors. Later some part of my python script in my current build had to be updated correcting typos. This helped in resolving it.