make_libraries.py Permission Denied Error
Hi,
I recently tried to install rosserialarduino using this tutorial: http://wiki.ros.org/rosserialarduino/Tutorials/Arduino%20IDE%20Setup but when I run the command:
rosrun rosserial_arduino make_libraries.py .
Edit: for your ease of reading, here is the error I get:
Exporting to .
Traceback (most recent call last):
File "/opt/ros/groovy/share/rosserial_arduino/make_libraries.py", line 88, in <module>
rosserial_client_copy_files(rospack, rosserial_arduino_dir+"/src/ros_lib/")
File "/opt/ros/groovy/lib/python2.7/dist-packages/rosserial_client/make_library.py", line 580, in rosserial_client_copy_files
shutil.copy(mydir+"/src/ros_lib/"+f, path+f)
File "/usr/lib/python2.7/shutil.py", line 117, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/opt/ros/groovy/share/rosserial_arduino/src/ros_lib/duration.cpp'
This is the exact error shown here: https://github.com/ros-drivers/rosserial/issues/39 That issue was closed, but it appears I've broken it again. I tried both using both options in step 3.1 in the above tutorial, but when I got to the catkin_make command, I got more errors:
imehrslab@imehrslab-OptiPlex-9010:~/catkin_ws$ catkin_make
Base path: /home/imehrslab/catkin_ws
Source space: /home/imehrslab/catkin_ws/src
Build space: /home/imehrslab/catkin_ws/build
Devel space: /home/imehrslab/catkin_ws/devel
Install space: /home/imehrslab/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/imehrslab/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/imehrslab/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/imehrslab/catkin_rnr/devel;/opt/ros/groovy
-- This workspace overlays: /home/imehrslab/catkin_rnr/devel;/opt/ros/groovy
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/imehrslab/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.89
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 10 packages in topological order:
-- ~~ - rosserial (metapackage)
-- ~~ - rosserial_arduino
-- ~~ - rosserial_client
-- ~~ - rosserial_msgs
-- ~~ - rosserial_python
-- ~~ - rosserial_xbee
-- ~~ - agitr
-- ~~ - rosserial_embeddedlinux
-- ~~ - rosserial_windows
-- ~~ - rosserial_server
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin metapackage: 'rosserial'
-- ==> add_subdirectory(rosserial/rosserial)
-- +++ processing catkin package: 'rosserial_arduino'
-- ==> add_subdirectory(rosserial/rosserial_arduino)
-- Using these message generators: gencpp;genlisp;genpy
-- rosserial_arduino: 1 messages, 1 services
-- +++ processing catkin package: 'rosserial_client'
-- ==> add_subdirectory(rosserial/rosserial_client)
-- +++ processing catkin package: 'rosserial_msgs'
-- ==> add_subdirectory(rosserial/rosserial_msgs)
-- Using these message generators: gencpp;genlisp;genpy
-- rosserial_msgs: 2 messages, 3 services
-- +++ processing catkin package: 'rosserial_python'
-- ==> add_subdirectory(rosserial/rosserial_python)
-- +++ processing catkin package: 'rosserial_xbee'
-- ==> add_subdirectory(rosserial/rosserial_xbee)
-- +++ processing catkin package: 'agitr'
-- ==> add_subdirectory(agitr)
CMake Error at /opt/ros/groovy/share/roscpp/cmake/roscppConfig.cmake:141 (message):
Project 'agitr' tried to find library 'pthread'. The library is neither a
target nor built/installed properly. Did you compile project 'roscpp'? Did
you find_package() it before the subdirectory containing its code is
included?
Call Stack (most recent call first):
/opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake:75 (find_package)
agitr/CMakeLists.txt:7 (find_package)
-- Configuring incomplete, errors occurred!
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
I can open up an example file in Arduino, but when I try to compile, it gives me this:
In file included from /opt/ros/groovy/include/ros/node_handle.h:31:0,
from /home/imehrslab/sketchbook/libraries/ros_lib/ros.h:38,
from HelloWorld.cpp:6:
/opt/ros/groovy/include/ros/forwards.h:31:18: fatal error: string: No such file or directory
compilation terminated.
I am running Groovy. I'm sort of inexperienced in ROS, so I shared as many errors as I could. I'm pretty sure they all stem from the same problem, but maybe one will shed some light on it. Thanks for the help!
Asked by JSanta on 2015-06-11 12:49:37 UTC
Answers
Are you install rosserial from Binaries
or Source
Asked by crazymumu on 2015-06-11 14:46:36 UTC
Comments
I tried both. The large chunk of code above is what happens when I try to use the source. Either way, I get the same errors from the make_libraries.py command.
Asked by JSanta on 2015-06-11 15:30:13 UTC
Comments
Something else strange is that the file that seems to be denying me permission (duration.cpp) doesn't exist in the directory in which it is listed in the error.
Asked by JSanta on 2015-06-24 16:47:12 UTC
Just for testing, add a
CATKIN_IGNORE
file to theagitr
pkg. That should allowcatkin_make
to continue. Do atouch /home/imehrslab/catkin_ws/src/agitr/CATKIN_IGNORE
, then reruncatkin_make
. This will (most likely) not fix your permission error, but will remove one error from the process.Asked by gvdhoorn on 2015-06-25 02:24:50 UTC
Also: any particular reason to be running Groovy? That ROS release has been EOL for a long time now, so it could be you're missing (a lot of) fixes and improvements that have been released into the newer releases.
Asked by gvdhoorn on 2015-06-25 02:26:08 UTC
Thanks for the reply. I did add the ignore, but the error is almost identical, it just says 'rosserial_server' instead of 'agitr' and the file under the call stack is slightly different. It also doesn't have the
make: *** [cmake_check_build_system] Error 1
line.Asked by JSanta on 2015-06-25 12:37:31 UTC
Do you know what could fix the permissions problem? I don't know why I wouldn't have permission to run anything. In response to your second question, I'm sort of forced to run on Groovy, since the robot I'm trying to operate has to use Groovy. A newer version of the robot isn't out yet.
Asked by JSanta on 2015-06-25 12:40:19 UTC
It's not running that is the issue, it's writing files. You cannot create files in the
/opt/ros/groovy/share/rosserial_arduino/src/ros_lib
dir. Thecatkin_make
error is something different. I suspect that something changed forroscpp
in Hydro, so your Groovy build fails due to that.Asked by gvdhoorn on 2015-06-25 13:15:37 UTC
I see. So how would I get that permission? Is it something to do with admin rights, or something in the files themselves I'm trying to install? I really only tried the catkin_make method because the binaries didn't work, so if it messes up due to Groovy, I guess I can't get around that.
Asked by JSanta on 2015-06-25 13:58:37 UTC