[Insight-developers] Fwd: Change in ITK[master]: COMP: root of source and binary dir of ITK should not be too...
David Cole
david.cole at kitware.com
Thu Jun 23 15:25:47 EDT 2011
On Thu, Jun 23, 2011 at 2:59 PM, Casey Goodlett
<casey.goodlett at kitware.com>wrote:
>
> On Thu, Jun 23, 2011 at 2:13 PM, David Cole <david.cole at kitware.com>wrote:
>
>> This gerrit change proposes to limit the path length of both the source
>> and binary trees on Windows builds of ITK. Before we accept this change, is
>> there anybody who has a reason why this would be a problem for them?
>>
>> I think it's a reasonable compromise given the length of the depth of the
>> tree, and the problems that ensue. (When using certain versions of CMake and
>> certain versions of Visual Studio, relative path names combined with the
>> absolute path of the build tree, combine to exceed the 250-something
>> character file name limit in some of the underlying Windows tools used...)
>>
>> Raise objections now, if any, or forever hold your peace. :-)
>>
>>
>>
> I have some projects using ITK via superbuild that are working now under
> ITK 3.20 that would no longer compile with this change.
>
> In general I would prefer not to have a hard limit, but if the limit is
> necessary, is 50 characters the largest possible limit? Is the largest path
> length in ITK 200 characters? I am able to build with a longer than 50
> character path now using ITK 3.20.
>
>
It is just over 50 characters (51 or 52? Alex, do you have an exact number?)
when some builds start to have a build error.
Perhaps we should add an "if(NOT ITK_NO_PATH_LENGTH_CHECKS)" so that
individuals who know they can safely build with a longer path can still use
one?
The reason for the problem is when running a command like this one:
(in current
directory C:/full/path/to/binary/tree/deeply/nested/third/party/utility/source/files)
cl (or any tool)
../../../../../../../../../source/tree/deeply/nested/third/party/utility/source/files/ReallyReallyUnnecessarilyLongFileName.c
What's happening is that deep down in the Windows cmd execution layer, in
order to pass the file name to the tool, it's appending the cd value with
the argument value, and coming up with:
C:/full/path/to/binary/tree/deeply/nested/third/party/utility/source/files/../../../../../../../../../source/tree/deeply/nested/third/party/utility/source/files/ReallyReallyUnnecessarilyLongFileName.c
Once *that* string exceeds 255, you're out of luck and start getting "file
or directory does not exist" errors.
So, yes. Around 50 is the actual limit as of right now. If we get longer
directory or file names within the ITK source tree later on, then this limit
will shrink.
HTH,
David
Thanks
>
> --
> Casey B. Goodlett, Ph.D.
> R&D Engineer
> Kitware, Inc. - North Carolina Office
> http://www.kitware.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110623/eb1a269b/attachment.htm>
More information about the Insight-developers
mailing list