[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] make check error with Mingw/MSYS

From: Matthew Collette
Subject: Re: [Help-gsl] make check error with Mingw/MSYS
Date: Tue, 26 Oct 2004 08:58:24 +0100 (BST)
User-agent: SquirrelMail/1.4.2

   I tried building up the file line-by-line with echo 1 2 1 >> filename
etc, but get the same make check error. I am guessing that the msys
system is preserving the UNIX-style end-of-lines even with echo, while
the the Mingw-produced executable is using the DOS style end-of-lines. 
I am worried that this might be true of other ways of file creation
from the command line. A bit more digging found a similar problem
porting a program to msys/Mingw, and suggested using the "tr" command
to remove the extra carriage return.  I tried this with good results,
the modified script uses one extra file(tr does not like to use the
same file for input and output).  The modified part of the script is:

echo 1 2 2.5 4 | ./gsl-histogram 1 5 4 > test.obs.1a.tmp

tr -d '\r' < test.obs.1a.tmp > test.obs.1.tmp
cmp test.exp.1.tmp test.obs.1.tmp
rm test.exp.1.tmp test.obs.1.tmp test.obs.1a.tmp

make check now works fine under MSYS, I checked the script as well under
Fedora Core 2/gcc 3.3.3 and it works there as well. I don't know about
other systems, so it may be best just to document this separately for
those that need to build under Windows.  I've attached the complete script
for others who might be building on the same system.

Best wishes,
Matthew Collette, Phd Student
MAST School Office, Armstrong Building
University of Newcastle
Newcastle upon Tyne
NE1 7RU, United Kingdom
Direct +44 (0)191 222 5534

Brian Gough said:
> Matthew Collette writes:
>  >   Thanks for your reply, it is exactly as you suggested.  I modified
> the
>  > script so that it does not remove temporary files when it completes and
>  > checked the results manually, they were the same.  With the histogram
>  > test forced to return true, make check runs through without any errors.
>  >
>  > I'd be happy to look at revising the gsl-histogram program to run
> without
>  > temporary files, similar to the other tests if you think this is
>  > worthwhile.
> Try changing the script to create the expected
> output file with echo or something that makes the line-endings
> correct.  I don't use cygwin myself (it always seems so slow) so I
> have never bothered to change it.
> --
> Brian Gough
> Network Theory Ltd,
> Publishing Free Software Manuals ---

Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]