Re: amber-developers: Re: PMEMD 10 patch 2

From: David A. Case <>
Date: Fri, 3 Oct 2008 12:11:09 -0400

On Fri, Oct 03, 2008, Gustavo Seabra wrote:
> Weird... it works just fine for me. What's your 'diff' version? I'm
> using Cygwin 1.5.25-15, and:
> $ diff -v
> diff (GNU diffutils) 2.8.7
> $ patch -v
> patch 2.5.8

I have the same versions. And (in spite of Bob's comments) it is quite
unusual for something like this to fail on cygwin. So there may be something
about my setup that is inconsistent.

Here is my test, looks like yours(?):

gibbs% echo "abcdef" > test_file
gibbs% diff -Naur /dev/null test_file > patch1
gibbs% cat patch1
--- /dev/null 2006-11-30 19:00:00.000000000 -0500
+++ test_file 2008-10-03 11:48:59.281250000 -0400
.. -0,0 +1 ..
gibbs% rm test_file
rm: remove regular file `test_file'? y
gibbs% patch -N < patch1
can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
|--- /dev/null 2006-11-30 19:00:00.000000000 -0500
|+++ test_file 2008-10-03 11:48:59.281250000 -0400
File to patch:

If I do a "touch test_file" right before patch, so that it is a zero-length
file, then the patch command works. So, the "can't find file to patch"
statement is indeed referring to "test_file" and not to "/dev/null".

Note also: if test_file does not exist, and I type "patch testfile < patch1",
things work.

This may all be clear once I figure it out, but right now it is not so clear.

Received on Sun Oct 05 2008 - 05:07:40 PDT
Custom Search