1. Problem explained
I need to run the merge
tool (part of the GNU RCS project - Revision Control System) on Windows 10. These are the requirements:
- STEP 1: The executable
merge.exe
must run in a native Windows cmd terminal. - STEP 2: The
PATH
env variable should not be modified. - STEP 3: The executable can be located in any arbitrary folder (of course, it's okay to put a bunch of dll's next to it if required).
It would lead us too far to explain why these requirements are so important. Please, just take them "as-is".
2. First trial: running the msys executable
I installed MSYS2 in C:/msys64
and found the executable at this location: C:/msys64/usr/bin/merge.exe
. So time to try STEP1 ~ STEP3.
STEP 1
I can get it to work in a native Windows terminal if I add C:/msys64/usr/bin/
to the PATH
env variable:
C:/Users/Kristof>merge.exe a.txt b.txt c.txt
huray!
STEP 2
Unfortunately, things go wrong when I don't modify the PATH
env variable and invoke merge.exe
by its full path instead:
C:/Users/Kristof>"C:/msys64/usr/bin/merge.exe" a.txt b.txt c.txt
/usr/bin/diff3: subsidiary program 'diff' not found
I don't get why this error appears. After all, the executables diff3.exe
and diff.exe
are both sitting next to merge.exe
. Why can't they be found?
STEP 3
Well, STEP3 is obviously useless if I can't get the previous step to work first.
3. Other trials
3.1 Purdue binaries
You can find binaries for RCS here: https://www.cs.purdue.edu/homes/trinkle/RCShome/
I downloaded rcs57pc1.zip (1.2MB) from that website. Unfortunately, every attempt to run merge.exe
fails with the following error message:
diff3.exe: subsidiary program failed
I tried the solutions offered on this StackOverflow post, but they won't work either:
RCS on Windows - rcsmerge always fails
3.2 ezwinports
I downloaded rcs-5.7-1.zip from: https://sourceforge.net/projects/ezwinports/files/
When running its merge.exe
file, I get the following error:
diff3.exe: Unknown signal 0xEEEEEEEE
merge aborted
Indeed, I could not see a diff3.exe
tool in the unzipped folder. So I copied diff3.exe
and diff.exe
from my MSYS installation (found at C:/msys64/usr/bin/
) into the unzipped rcs-5.7-1
folder. No success. Same error message.
3.3 GnuWin32
The GnuWin32 project is known for its many Linux-to-Windows conversions of popular tools. I downloaded GnuWin32 (http://gnuwin32.sourceforge.net/) and did a full installation into C:/gnuwin32/
. I searched through my C:/gnuwin32/
folder but cannot find a merge.exe
tool anywhere. This is very weird, because the GNU RCS project is explicitely mentioned as a package from the GnuWin32 project here: