willowgarage/catkin — Issue #42: recursive soft links
Author: ethanrublee
Created: 2012-01-05 16:16:19+00:00
State: open

circular symlinks in build
7 messages
Brian Gerkey	Wed, Jan 4, 2012 at 5:39 PM
To: Troy Straszheim , Morten Kjærgaard , Ethan Rublee
Cc: Ken Conley
hi guys,

I'm seeing circular symlinks in build after running cmake, e.g.:

$ ls -l /wg/stor1a/gerkey/code/catkin/src/build/lib/rosservice
lrwxrwxrwx 1 gerkey wgusers 74 2012-01-04 17:35
/wg/stor1a/gerkey/code/catkin/src/build/lib/rosservice ->
/wg/stor1a/gerkey/code/catkin/src/ros_comm/tools/rosservice/src/rosservice

There seems to be one such link for each build/lib/. And
there's one in src:

$ ls -l /wg/stor1a/gerkey/code/catkin/src/catkin/python/catkin
total 4
lrwxrwxrwx 1 gerkey wgusers 54 2012-01-04 17:35 catkin ->
/wg/stor1a/gerkey/code/catkin/src/catkin/python/catkin
-rw-r--r-- 1 gerkey wgusers 563 2012-01-02 13:13 __init__.py
drwxr-xr-x 2 gerkey wgusers 56 2012-01-02 13:13 sphinx

They seem to get regenerated during cmake. Any ideas?

brian.
Ken Conley	Wed, Jan 4, 2012 at 5:41 PM
To: Brian Gerkey
Cc: Troy Straszheim , Morten Kjærgaard , Ethan Rublee
I also saw this in genmsg: genmsg/src/genmsg/genmsg/genmsg

Forgot about it (shelved it and was going to look back at it), thanks
for the reminder

- Ken
[Quoted text hidden]
Brian Gerkey	Wed, Jan 4, 2012 at 5:44 PM
To: Ken Conley
Cc: Troy Straszheim , Morten Kjærgaard , Ethan Rublee
I've seen it for the last couple of hours; am bringing it up now
because it's dramatically slowing down test runs, due to rospack
having to recurse until some boost::filesystem max-symlink limit is
hit (repeatedly).

brian.
[Quoted text hidden]
--
http://brian.gerkey.org
Ken Conley	Wed, Jan 4, 2012 at 9:04 PM
To: Brian Gerkey
Cc: Troy Straszheim , Morten Kjærgaard , Ethan Rublee
Another example:

Traceback (most recent call last):
File "/usr/lib/python2.6/unittest.py", line 279, in run
testMethod()
File "/usr/local/lib/python2.6/dist-packages/nose/loader.py", line
390, in loadTestsFromName
addr.filename, addr.module)
File "/usr/local/lib/python2.6/dist-packages/nose/importer.py", line
39, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/local/lib/python2.6/dist-packages/nose/importer.py", line
86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/test/test_roslaunch_child.py",
line 40, in
import roslaunch.child
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/__init__.py",
line 43, in
from . import param_dump as roslaunch_param_dump
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/param_dump.py",
line 40, in
import roslaunch.config
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/__init__.py",
line 43, in
from . import param_dump as roslaunch_param_dump
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/param_dump.py",
line 40, in
import roslaunch.config
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/__init__.py",
line 43, in
from . import param_dump as roslaunch_param_dump
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/param_dump.py",
line 40, in
import roslaunch.config
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/__init__.py",
line 43, in
from . import param_dump as roslaunch_param_dump
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/param_dump.py",
line 40, in
import roslaunch.config
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/__init__.py",
line 43, in
from . import param_dump as roslaunch_param_dump
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/param_dump.py",
line 40, in
import roslaunch.config
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/__init__.py",
line 43, in
from . import param_dump as roslaunch_param_dump
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/param_dump.py",
line 40, in
import roslaunch.config
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/__init__.py",
line 43, in
from . import param_dump as roslaunch_param_dump
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/param_dump.py",
line 40, in
import roslaunch.config
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/__init__.py",
line 43, in
from . import param_dump as roslaunch_param_dump
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/param_dump.py",
line 40, in
import roslaunch.config
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/__init__.py",
line 43, in
from . import param_dump as roslaunch_param_dump
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/param_dump.py",
line 40, in
import roslaunch.config
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/__init__.py",
line 43, in
from . import param_dump as roslaunch_param_dump
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/param_dump.py",
line 40, in
import roslaunch.config
File "/u/kwc/fuerte/src/ros_comm/tools/roslaunch/src/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/roslaunch/__init__.py",
line 43, in
[Quoted text hidden]
Ethan Rublee	Thu, Jan 5, 2012 at 7:43 AM
To: Ken Conley
Cc: Brian Gerkey , Troy Straszheim , Morten Kjærgaard
Looking into this:

~/catkin$ git grep "ln"
cmake/enable_python.cmake: execute_process(COMMAND /bin/ln -sf
cmake/enable_python.cmake: execute_process(COMMAND /bin/ln -sf
...
[Quoted text hidden]
Ethan Rublee	Thu, Jan 5, 2012 at 7:55 AM
To: Ken Conley
Cc: Brian Gerkey , Troy Straszheim , Morten Kjærgaard
Its one of those lines in enable_python that is the culprit. Commented them out and there is no soft link.

Digging deeper.
[Quoted text hidden]
Ethan Rublee	Thu, Jan 5, 2012 at 7:58 AM
To: Ken Conley
Cc: Brian Gerkey , Troy Straszheim , Morten Kjærgaard
diff --git a/cmake/enable_python.cmake b/cmake/enable_python.cmake
index 858111e..2bcb260 100644
--- a/cmake/enable_python.cmake
+++ b/cmake/enable_python.cmake
@@ -68,8 +68,8 @@ function(catkin_export_python)

foreach(pkg ${${pkg_name}_PACKAGES})
get_filename_component(name ${pkg} NAME)
- execute_process(COMMAND /bin/ln -sf
- ${CMAKE_CURRENT_SOURCE_DIR}/${pkg} ${CMAKE_BINARY_DIR}/lib/${name})
+ #execute_process(COMMAND /bin/ln -sf
+ # ${CMAKE_CURRENT_SOURCE_DIR}/${pkg} ${CMAKE_BINARY_DIR}/lib/${name})
endforeach()

foreach(script ${${pkg_name}_SCRIPTS})

The offending line. Still need to dig a bit more as to why this causes a recursive link.
[Quoted text hidden]