Re: [CMake] cpack and paths too long

2012-04-23 Thread David Cole
On Mon, Apr 23, 2012 at 8:38 AM, Andrea Crotti wrote:

> On 04/23/2012 01:32 PM, David Cole wrote:
>
>> You should just get used to using shorter paths on the embarrassing OS.
>>
>> This is an early warning sign for you that your end users will also
>> encounter these problems as they install your program on their systems in
>> "non-short" root paths...
>>
>> You can ignore it if you wish, but the fact remains that Windows STILL
>> has many components in it that rely on full path names of ALL files being
>> less than 260 characters.
>>
>> They do support longer file names, but there are still many legacy tools
>> where the limit exists.
>>
>>
>> HTH,
>> David
>>
>>
> I agree with you, unfortunately I'm not the person that has to use smaller
> paths, just writing the build system..
> And good point about the installed application, I think I can assume
> however that if the CPack works also
> the installed application should work, because it doesn't have the ~20
> chars needed for CPacking (but of course
> depends on where it will be installed).
>
> So well the only way is to make really sure there are no long paths around
> then :(
>


If Windows is your target system, then yes: you must make sure all your
paths are short enough.


Cheers,
David
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] cpack and paths too long

2012-04-23 Thread Andrea Crotti

On 04/23/2012 01:32 PM, David Cole wrote:

You should just get used to using shorter paths on the embarrassing OS.

This is an early warning sign for you that your end users will also 
encounter these problems as they install your program on their systems 
in "non-short" root paths...


You can ignore it if you wish, but the fact remains that Windows STILL 
has many components in it that rely on full path names of ALL files 
being less than 260 characters.


They do support longer file names, but there are still many legacy 
tools where the limit exists.



HTH,
David



I agree with you, unfortunately I'm not the person that has to use 
smaller paths, just writing the build system..
And good point about the installed application, I think I can assume 
however that if the CPack works also
the installed application should work, because it doesn't have the ~20 
chars needed for CPacking (but of course

depends on where it will be installed).

So well the only way is to make really sure there are no long paths 
around then :(

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cpack and paths too long

2012-04-23 Thread David Cole
You should just get used to using shorter paths on the embarrassing OS.

This is an early warning sign for you that your end users will also
encounter these problems as they install your program on their systems in
"non-short" root paths...

You can ignore it if you wish, but the fact remains that Windows STILL has
many components in it that rely on full path names of ALL files being less
than 260 characters.

They do support longer file names, but there are still many legacy tools
where the limit exists.


HTH,
David


On Mon, Apr 23, 2012 at 8:26 AM, Andrea Crotti wrote:

>  On 04/20/2012 12:36 PM, Eric Noulard wrote:
>
>  Nope, it would break backward compatibility, you can dig the ML
> for discussion about that "issue".
>
> My opinion is that building in-source is a bad habit that ought to be
> discouraged but the fact is,
> this is not currently easy to enforce 
> out-of-source:http://www.cmake.org/Bug/view.php?id=6672
>
>
>
> Ok the make problem was my mistake sorry..
>
> we haven't really solved the long path problem yet unfortunately, even
> building out of source we get some very long paths...
>
> Is there a way to shorten this generated path by CPack?
>
>C:/Temp/cmake_gen/_CPack_Packages/win32/NSIS*
> *
> Anyway the only solution I see for now is to check with a script the
> length of the paths, and abort before trying to
> build anything.
>
> Or the other possible solution is to run cpack from an OS which is not
> embarrassing, but not sure what version of CMake
> we have available and if the NSIS is working fine on that version..
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] cpack and paths too long

2012-04-23 Thread Andrea Crotti

On 04/20/2012 12:36 PM, Eric Noulard wrote:

Nope, it would break backward compatibility, you can dig the ML
for discussion about that "issue".

My opinion is that building in-source is a bad habit that ought to be
discouraged but the fact is,
this is not currently easy to enforce out-of-source:
http://www.cmake.org/Bug/view.php?id=6672




Ok the make problem was my mistake sorry..

we haven't really solved the long path problem yet unfortunately, even 
building out of source we get some very long paths...


Is there a way to shorten this generated path by CPack?

   C:/Temp/cmake_gen/_CPack_Packages/win32/NSIS*
*
Anyway the only solution I see for now is to check with a script the 
length of the paths, and abort before trying to

build anything.

Or the other possible solution is to run cpack from an OS which is not 
embarrassing, but not sure what version of CMake

we have available and if the NSIS is working fine on that version..
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] cpack and paths too long

2012-04-20 Thread Eric Noulard
2012/4/20 Andrea Crotti :
> On 04/19/2012 07:00 PM, Eric Noulard wrote:
>>
>> Compiler, Visual Studio something?
>> You run cpack from the command line or from within IDE/Makefile etc
>>
>
> No compilers used for this project (it's python) and I run from command
> line.
>
> Anyway it might be a good idea also in general so I tried to do it and it
> doesn't find a path,
> but the error is not quite clear, what path is it talking about (because all
> I see there exists)?
>
>
> c:/temp $ cmake -G "MSYS Makefiles"
> e:/git_projs/Minimum_Drag/xyz.application.minimum_drag
> -- PSI found in e:/git_projs/PSI_Hamburg
> -- workspace set to
> e:/git_projs/Minimum_Drag/xyz.application.minimum_drag/../..
> -- copying the runner file with the right substitutions
> -- running: c:/python25/python.exe
>  -p;e:/git_projs/Minimum_Drag/xyz.application.minimum_drag;-w;e:/git_projs/Minimum_Drag/xyz.application.minimum_drag/../..
> -- writing the list of dependencies to egg_list.txt
> -- Configuring done
> -- Generating done
> -- Build files have been written to: C:/temp
> c:/temp $ make xyz.application.minimum_drag_install
> The system cannot find the path specified.
> epd-make: *** [cmake_check_build_system] Error 1
> c:/temp $ make xyz.application.minimum_drag_install VERBOSE=1
> "/c/buildprograms/programs/CMake 2.8/bin/cmake.exe"
> -H/e/git_projs/Minimum_Drag/xyz.application.minimum_drag -B/C/temp
> --check-build-system CMakeFiles/Makefile.cmake 0
> The system cannot find the path specified.
> epd-make: *** [cmake_check_build_system] Error 1

This looks as if it is a **make** error not a CMake one.
Are you able build a simplistic project on this machine?
(try one with which only does install(FILES somefile.txt DESTINATION .) ...)

Is "xyz.application.minimum_drag_install" a custom target of yours?

I did find trace of similar error here
http://www.redantigua.com/msys-win.html

in that case it seems that a bad mix of "make" command from
MSYS or mingw32 or unxutil was the culprit.

is the "epd-make" the one that comes with your MSYS install ?

> PS. And in general I think it's a bit confusing the fact that I need to
> remove manually the CMakeCache
> from the source directory when I run out of tree..
> Couldn't CMake just discard that path when building out of tree?

Nope, it would break backward compatibility, you can dig the ML
for discussion about that "issue".

My opinion is that building in-source is a bad habit that ought to be
discouraged but the fact is,
this is not currently easy to enforce out-of-source:
http://www.cmake.org/Bug/view.php?id=6672

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cpack and paths too long

2012-04-20 Thread Andrea Crotti

On 04/19/2012 07:00 PM, Eric Noulard wrote:

Compiler, Visual Studio something?
You run cpack from the command line or from within IDE/Makefile etc



No compilers used for this project (it's python) and I run from command 
line.


Anyway it might be a good idea also in general so I tried to do it and 
it doesn't find a path,
but the error is not quite clear, what path is it talking about (because 
all I see there exists)?



c:/temp $ cmake -G "MSYS Makefiles" 
e:/git_projs/Minimum_Drag/xyz.application.minimum_drag

-- PSI found in e:/git_projs/PSI_Hamburg
-- workspace set to 
e:/git_projs/Minimum_Drag/xyz.application.minimum_drag/../..

-- copying the runner file with the right substitutions
-- running: c:/python25/python.exe  
-p;e:/git_projs/Minimum_Drag/xyz.application.minimum_drag;-w;e:/git_projs/Minimum_Drag/xyz.application.minimum_drag/../..

-- writing the list of dependencies to egg_list.txt
-- Configuring done
-- Generating done
-- Build files have been written to: C:/temp
c:/temp $ make xyz.application.minimum_drag_install
The system cannot find the path specified.
epd-make: *** [cmake_check_build_system] Error 1
c:/temp $ make xyz.application.minimum_drag_install VERBOSE=1
"/c/buildprograms/programs/CMake 2.8/bin/cmake.exe" 
-H/e/git_projs/Minimum_Drag/xyz.application.minimum_drag -B/C/temp 
--check-build-system CMakeFiles/Makefile.cmake 0

The system cannot find the path specified.
epd-make: *** [cmake_check_build_system] Error 1

PS. And in general I think it's a bit confusing the fact that I need to 
remove manually the CMakeCache

from the source directory when I run out of tree..
Couldn't CMake just discard that path when building out of tree?

Thanks,
Andrea
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cpack and paths too long

2012-04-19 Thread Eric Noulard
2012/4/19 Andrea Crotti :
> On 04/19/2012 04:13 PM, Eric Noulard wrote:
>>
>> Could you build out-of-source in a small path?
>> like
>>
>> small/path/build
>> when your source would be in
>> long/path/source
>>
>> cpack should only work with file in the build tree.
>>
>> this is a workaround but it may work.
>>
>> By the way:
>>   Which version of CMake/CPack are you using?
>>   With which platforms/compiler combination(s) are your working?
>>
>
> I suppose I could yes, I could copy the things I need to c:\tmp maybe and
> use it like this,

You shouldn't need to copy anything I just suggested to use
a build tree **separate** from the source tree.
i.e. out-of-source build cf:
http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees

that way the file used by CPack would be on  a shorter path.

> not a great solution but if it's the only way to go...

just a temporary workaround in order to know if it works this way
(**WITHOUT MOVING the source**) ?

> Running:
> cmake 2.8.7
> cpack 2.8.7
> on windows 7

Compiler, Visual Studio something?
You run cpack from the command line or from within IDE/Makefile etc

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cpack and paths too long

2012-04-19 Thread Andrea Crotti

On 04/19/2012 04:13 PM, Eric Noulard wrote:

Could you build out-of-source in a small path?
like

small/path/build
when your source would be in
long/path/source

cpack should only work with file in the build tree.

this is a workaround but it may work.

By the way:
   Which version of CMake/CPack are you using?
   With which platforms/compiler combination(s) are your working?



I suppose I could yes, I could copy the things I need to c:\tmp maybe 
and use it like this,

not a great solution but if it's the only way to go...
Running:
cmake 2.8.7
cpack 2.8.7
on windows 7

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cpack and paths too long

2012-04-19 Thread Eric Noulard
2012/4/19 Andrea Crotti :
> We are trying to make cmake work with our projects, and all the targets work
> fine.
>
> The problem is that on some projects cpack -G NSIS fails because when it
> tries to copy
> files around it generates paths too long.
>
> I found that CMake is able to handle these situations in theory with a
> checksum of the path,
> but it seems that it's not doing it in this case.
>
> The structure is the following, where long/path/cmakelist.txt includes
> the other/long/cmakelist.txt file, and all it's needed for the
> installer is in long/path/result_to_install.
>
> - long/path/cmakelist.txt
> - long/path/result_to_install/
> - other/long/path/cmakelist.txt
>
> Any suggestions?

Could you build out-of-source in a small path?
like

small/path/build
when your source would be in
long/path/source

cpack should only work with file in the build tree.

this is a workaround but it may work.

By the way:
  Which version of CMake/CPack are you using?
  With which platforms/compiler combination(s) are your working?

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] cpack and paths too long

2012-04-19 Thread Andrea Crotti
We are trying to make cmake work with our projects, and all the targets 
work fine.


The problem is that on some projects cpack -G NSIS fails because when it 
tries to copy

files around it generates paths too long.

I found that CMake is able to handle these situations in theory with a 
checksum of the path,

but it seems that it's not doing it in this case.

The structure is the following, where long/path/cmakelist.txt includes
the other/long/cmakelist.txt file, and all it's needed for the
installer is in long/path/result_to_install.

- long/path/cmakelist.txt
- long/path/result_to_install/
- other/long/path/cmakelist.txt

Any suggestions?
Thanks,
Andrea
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake