[CMake] 'cmake -E copy_directory' fails

Kelly (KT) Thompson kt at transpireinc.com
Fri Sep 25 19:55:42 EDT 2009


On Fri, Sep 25, 2009 at 12:06 PM, Eric Noulard <eric.noulard at gmail.com>wrote:

2009/9/25 Kelly (KT) Thompson <kt at transpireinc.com>:
> > Hi,
> >
> > I am having intermittent trouble executing
> >
> > $ cmake -E copy_directory /full/path/to/large/directory /new/path
> >
> > Originally, the copy_directory was failing deep in my build system
> > (add_custom_command), but the failure is repeatable from the command line
> > (exactly as shown above).  The failure message is always the same:
> >
> > $ Error copying directory from "/full/path/to/large/directory" to
> > "/new/path".
> >
> > Does anyone have any thoughts on how to determine the actual cause of the
> > failure.
>
> May be you can try to strace the execution in order to see where it fails?
>

Great idea.  (Now why didn't I think of that?!?)

Strace found the problem.  There was an invalid symbolic link buried deep in
my directory structure that was failing with ENOENT (No such file or
directory).

I guess cp blindly copies the symlink w/o checking for the existence of the
target.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090925/993c18c7/attachment.htm>


More information about the CMake mailing list