diffutils for windows 64-bit

Needed to diff large (> 1GB) text files as part of a toolset, but DiffUtils provided by gnuwin32 is 32-bit only :( Of course I tried, but expectedly, it failed to diff the large files. Next solution: compile a native 64-bit version of diff. (Why is there no gnuwin64?) Anyway, I chose to compile on a x86_64 linux machine because I happen to have such a test machine around.

apt-get install mingw-w64
wget http://ftp.gnu.org/gnu/diffutils/diffutils-3.3.tar.xz
tar xJf diffutils-3.3.tar.xz
cd diffutils-3.3
# get diffutils-3.3-mingw64.patch and place it here
patch -p1 -i diffutils-3.3-mingw64.patch
./configure --host=x86_64-w64-mingw32 --prefix=/tmp/diffutils-3.3-mingw64
make && make install

Now, the goods are in /tmp/diffutils-3.3-mingw64/bin. Enjoy!

The file diffutils-3.3-mingw64.patch can be found under Resources. I would have gladly pasted the file here if not for the non-printable character found in the original source. If anyone knows the settings for diff to generate pure printable patch file do drop a comment below, thanks!

Further interesting read: MinGW 64 how-to

 

About these ads

One thought on “diffutils for windows 64-bit

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s