[ros-users] In dynamic_reconfigure: an error (OSX)

Blaise Gassend blaise at willowgarage.com
Tue Nov 9 21:02:43 UTC 2010


This looks like a reasonable approach. Can you ticket me to make this change?

On Tue, Nov 9, 2010 at 12:04 PM, Nicholas Butko <nbutko at ucsd.edu> wrote:
> Blaise,
>
> This patch works for me. You may want to put additional checks in there, for example making sure that the path being added is not a directory.
>
> --Nick
>
> Index: gendeps
> ===================================================================
> --- gendeps     (revision 31915)
> +++ gendeps     (working copy)
> @@ -73,6 +73,9 @@
>     if not m in start_modules:
>       try:
>         file = inspect.getsourcefile(end_modules[m])
> +        if not os.path.exists(file):
> +          while not os.path.exists(file):
> +            file = os.path.dirname(file)
>         if type(file) == str:
>           print >> stdout, file
>       except Exception, e:
>
>
>
>
>
>
>
> On Nov 9, 2010, at 11:01 AM, Blaise Gassend wrote:
>
>> Nick,
>>
>> This indeed has nothing to do with the problem Deepak was mentioning.
>> Those fixes have been released, and should be included in the code you
>> are building.
>>
>> It looks like dynamic_reconfigure's dependency generator is returning
>> /Library/Python/2.6/site-packages/PyYAML-3.09-py2.6-macosx-10.6-universal.egg/yaml/representer.py
>> as a dependency, but that file apparently does not exist.
>>
>> Could you send the output of:
>> roscd dynamic_reconfigure
>> rosrun dynamic_reconfigure gendeps cfg/Test.cfg
>>
>> Could you also sed the output of
>> ls /Library/Python/2.6/site-packages/PyYAML-3.09-py2.6-macosx-10.6-universal.egg/yaml
>>
>> I am guessing that you may have the .pyc file, but not the .py file,
>> but python is still returning the name of the .py file that the pyc
>> was created from. The following patch (completely untested) may fix
>> the problem. Let me know if it does and I'll deploy it.
>>
>> Blaise
>>
>> --- cmake/gendeps       2010-10-06 22:04:35.000000000 -0700
>> +++ /u/blaise/temp/gendeps      2010-11-09 11:00:13.000000000 -0800
>> @@ -73,6 +73,8 @@
>>     if not m in start_modules:
>>       try:
>>         file = inspect.getsourcefile(end_modules[m])
>> +        if not type(file) == str or not os.path.exists(file):
>> +          file = inspect.getfile(end_modules[m])
>>         if type(file) == str:
>>           print >> stdout, file
>>       except Exception, e:
>>
>> On Tue, Nov 9, 2010 at 10:28 AM, Nicholas Butko <nbutko at ucsd.edu> wrote:
>>> Trying to build hokuyo_node on OSX, I get an error that I traced back to dynamic_reconfigure.
>>>
>>> Somehow cmake is generating spurious python dependencies (see below). The problem is that a binary .egg file is identified as a dependency, but it is treaded like a folder. So the .egg file exists, but is not a folder, and when make tries to look into the folder that doesn't exist, it can't find the file. But the .egg file works just fine, as shown below (import works just fine in Python).
>>>
>>> I'm not sure how to debug this, and I'm not sure how it can be fixed. Does anyone with more experience with Python and CMake have any ideas?
>>>
>>> --Nick
>>>
>>>
>>>
>>>
>>> 0-1e-c2-b9-c8-99:dynamic_reconfigure nick$ make
>>> mkdir -p bin
>>> cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake  ..
>>> [rosbuild] Building package dynamic_reconfigure
>>> [rosbuild] Including /Users/nick/ros/ros/core/roscpp/cmake/roscpp.cmake
>>> [rosbuild] Including /Users/nick/ros/ros/core/roslisp/cmake/roslisp.cmake
>>> [rosbuild] Including /Users/nick/ros/ros/core/rospy/cmake/rospy.cmake
>>> [rosbuild] Including /Users/nick/ros/other/ros_experimental/rosjava/cmake/rosjava.cmake
>>> -- Java version 1.6.0.22 configured successfully!
>>> [rosbuild] Including /Users/nick/ros/other/ros_experimental/rosoct/cmake/rosoct.cmake
>>> MSG: gencfg_cpp on:Test.cfg
>>> -- Configuring done
>>> -- Generating done
>>> -- Build files have been written to: /Users/nick/ros/stacks/driver_common/dynamic_reconfigure/build
>>> cd build && make
>>> make[3]: *** No rule to make target `/Library/Python/2.6/site-packages/PyYAML-3.09-py2.6-macosx-10.6-universal.egg/yaml/representer.py', needed by `../cfg/cpp/dynamic_reconfigure/TestConfig.h'.  Stop.
>>> make[2]: *** [CMakeFiles/ROSBUILD_gencfg_cpp.dir/all] Error 2
>>> make[1]: *** [all] Error 2
>>> make: *** [all] Error 2
>>>
>>> 0-1e-c2-b9-c8-99:dynamic_reconfigure nick$ echo $PYTHONPATH
>>> /Users/nick/ros/ros/core/roslib/src::/usr/local/lib/python2.6/site-packages
>>> 0-1e-c2-b9-c8-99:dynamic_reconfigure nick$ python
>>> Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
>>> [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>> from yaml import representer
>>>>>> quit()
>>>
>>> _______________________________________________
>>> ros-users mailing list
>>> ros-users at code.ros.org
>>> https://code.ros.org/mailman/listinfo/ros-users
>>>
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>



More information about the ros-users mailing list