Ask Your Question
0

make_libraries.py Permission Denied Error

asked 2015-06-11 12:49:37 -0600

JSanta gravatar image

updated 2015-06-24 16:44:53 -0600

Hi,

I recently tried to install rosserial_arduino using this tutorial: http://wiki.ros.org/rosserial_arduino... 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/rosser... 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 ...
(more)
edit retag flag offensive close merge delete

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.

JSanta gravatar imageJSanta ( 2015-06-24 16:47:12 -0600 )edit
1

Just for testing, add a CATKIN_IGNORE file to the agitr pkg. That should allow catkin_make to continue. Do a touch /home/imehrslab/catkin_ws/src/agitr/CATKIN_IGNORE, then rerun catkin_make. This will (most likely) not fix your permission error, but will remove one error from the process.

gvdhoorn gravatar imagegvdhoorn ( 2015-06-25 02:24:50 -0600 )edit

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.

gvdhoorn gravatar imagegvdhoorn ( 2015-06-25 02:26:08 -0600 )edit

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.

JSanta gravatar imageJSanta ( 2015-06-25 12:37:31 -0600 )edit

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.

JSanta gravatar imageJSanta ( 2015-06-25 12:40:19 -0600 )edit
1

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. The catkin_make error is something different. I suspect that something changed for roscpp in Hydro, so your Groovy build fails due to that.

gvdhoorn gravatar imagegvdhoorn ( 2015-06-25 13:15:37 -0600 )edit

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.

JSanta gravatar imageJSanta ( 2015-06-25 13:58:37 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-11 14:46:36 -0600

crazymumu gravatar image

Are you install rosserial from Binaries or Source

edit flag offensive delete link more

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.

JSanta gravatar imageJSanta ( 2015-06-11 15:30:13 -0600 )edit

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: 2015-06-11 12:49:37 -0600

Seen: 887 times

Last updated: Jun 24 '15