MantisBT - ITK
View Issue Details
0005991ITKpublic2007-11-01 11:392010-11-04 15:18
dan white 
Luis Ibanez 
normalblockalways
closedfixed 
 
 
backlog
0005991: DOS carriage returns ^M in CableSwig-ITK-3.4.0.zip - causes problem on OS X / unix
 if you are using CableSwig on unix / OS X systems,
there are DOS carriage return characters in some files of the
CableSwig-ITK-3.4.0.zip
package.

Hopefully these arent there in the .tar.gz package.

for instance cmake is tying to run a shell called sh^M
instead of sh

see below

this is dangerous because zip is the native archive format on OSX,
so OS X users might often get the .zip instead of the .tar.gz


private-white:Insight dan$ cmake .
WrapITK is an experimental system for wrapping ITK. It is tested on Linux, Mac OS and Solaris, but is known to have some problems on some Windows platforms.
running /bin/sh "/Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/config_cmake/gcc_platform.sh" "/Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/config_cmake/gcc_platform.cmake" "/usr/bin/cmake" 2>&1
/Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/config_cmake/gcc_platform.sh: /Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/config.guess: /bin/sh^M: bad interpreter: No such file or directory
/Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/config_cmake/gcc_platform.sh: /Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/config.sub: /bin/sh^M: bad interpreter: No such file or directory
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 3:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 5:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 10:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 15:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 20:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 28:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 42:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 153:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 176:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 212:
'Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 214: syntax error near unexpected token `in
'Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 214: `case $machine in
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 3:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 5:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 10:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 15:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 20:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 28:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 42:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 153:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 176:
: command not foundITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 212:
'Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 214: syntax error near unexpected token `in
'Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/gcc/config.gcc: line 214: `case $machine in
CMake Error: Cannot find source file "/Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/gcc/config/.c"

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx
CMake Error: CMake failed to properly look up cmSourceFile: /Users/dan/Desktop/ITK/Insight/Utilities/CableSwig/GCC/gcc/config//.c

No tags attached.
Issue History
2007-11-01 11:39dan whiteNew Issue
2008-01-23 10:51Luis IbanezNote Added: 0010228
2008-01-23 10:52Luis IbanezStatusnew => resolved
2008-01-23 10:52Luis IbanezResolutionopen => no change required
2008-01-23 10:52Luis IbanezAssigned To => Luis Ibanez
2008-01-23 10:52Luis IbanezNote Added: 0010229
2008-01-23 11:18dan whiteStatusresolved => feedback
2008-01-23 11:18dan whiteResolutionno change required => reopened
2008-01-23 11:18dan whiteNote Added: 0010234
2008-01-23 11:45Luis IbanezNote Added: 0010235
2008-01-23 15:20Sean McBrideNote Added: 0010248
2010-11-04 15:18Hans JohnsonSprint Status => backlog
2010-11-04 15:18Hans JohnsonNote Added: 0022850
2010-11-04 15:18Hans JohnsonStatusfeedback => closed
2010-11-04 15:18Hans JohnsonResolutionreopened => fixed

Notes
(0010228)
Luis Ibanez   
2008-01-23 10:51   
You shouldn't use the .zip file for Unix/Linux.
These files are intended for Windows.

The package that should be used for Unix/Linux is the .tar.gz.
(0010229)
Luis Ibanez   
2008-01-23 10:52   
ITK .zip files are not intended for Unix.
(0010234)
dan white   
2008-01-23 11:18   
On Mac OSX the default archive format in the Finder is tio make .zip files.
So many users are getting used to being able to use zip on OSX.
There is little sense in saying zip is only for windows,
and tar/gzip is only for unix.
Is there a reason why the contents of the zip and tar/gzip archives should be different once they are unpacked? I think not.
this caught me out on OSX and it took a while and some hacking and help from the lsit to figure out the problem.
There is not info on the download page that says th ezip of only for windows, and all other OSs should use the tar/gzip archive. One assumes that both archives contain exactly the same contents, and that they are not platform specific, which they should not be.... right?
(0010235)
Luis Ibanez   
2008-01-23 11:45   
Well, here is the issue:

When we package ITK we do the following:

a) checkout the CVS version in a windows system and zip it.

b) checkout the CVS version in a Linux system and tar.gz it

That's why the .zip package has DOS ends of line.

We could of course add a (c) where we checkout the code in
a Linux system, and zip it, or check it out in Mac and zip it.
but the we will have to explain Windows users why the zip file
has Unix ends-of-line... Which, again will come down to editing
our web page to say something like:

a) Package for Mac: ITK-Mac.zip
b) Package for Linux: ITK.tar.gz
c) Package for Windows: ITK-Windows.zip
d) Package for Sun: ITK.tar.gz (because Sun has a broken tar tool)

and so on...

On the long run this problem will be solved by using CPack and packaging
the release in a packaging method that is native for every platform.


In the meantime...here is the question:

Is there a way of creating a .zip file that will work fine both
in MacOS and in Windows ?

If so, we will be happy to follow that method.
(0010248)
Sean McBride   
2008-01-23 15:20   
Seems to me like the tar vs zip format really has nothing to do with it. There are apps for just about all OSes that deal with both these common formats. The real issue is the line endings of the source files. Maybe instead of:

InsightToolkit-3.4.0.tar.gz
InsightToolkit-3.4.0.zip

use:

InsightToolkit-3.4.0-UnixText.tar.gz
InsightToolkit-3.4.0-DOSText.zip

(Rant: pretty lame than in 2008 compilers/tools are still not line ending agnostic!)
(0022850)
Hans Johnson   
2010-11-04 15:18   
Assuming this has been fixed in subsequent versions of ITK.