Article: How to Create a Statically Linked Version of git Binaries

As I’ve mentioned before, we use CVS at my job. I use Git for personal projects, and I wanted to install a copy on our build server at work. I have root access to that box, but I prefer to contain my changes to my user when possible. I know that building statically linked binaries is frowned upon, but I didn’t see much of an alternative in my case, at least in the short term. Anyway, here are the instructions I followed:

How to Create a Statically Linked Version of git Binaries:
http://java.dzone.com/articles/how-create-statically-linked.

We run Red Hat Enterprise Linux at work, so I build the git binaries using a CentOS Vagrant image. I had to install the following additional modules:

  • asciidoc
  • gettext
  • glibc
  • zlib
  • zlib-devel
  • zlib-static
  • perl-ExtUtils-MakeMaker