How to Install GIT on AIX

Git

After a grueling battle trying to compile GIT from source on an AIX (6.1) machine, I thought I would try to save you some trouble and outline clearly what I had to do.  Please note I initially followed this guide, which gave me a good base, but I had to throw in a few extra tweaks.

First off, you will need to get the following dependencies.  I was able to get most of them from the IBM Linux Toolbox here, and the rest I got from the great people at Perzl.org

Dependencies:

bison-1.875-3.aix5.1.ppc.rpm
coreutils-5.2.1-2.aix5.1.ppc.rpm
expect-5.45-1.aix5.1.ppc.rpm
flex-2.5.4a-6.aix4.3.ppc.rpm
gcc-4.2.0-3.aix6.1.ppc.rpm
gcc-cplusplus-4.2.0-3.aix6.1.ppc.rpm
gdbm-1.8.3-5.aix5.2.ppc.rpm
gettext-0.10.40-8.aix5.2.ppc.rpm
git-git-5bc2dc2
git-git-v1.7.10.2-569-g5bc2dc2.zip
libXft-2.2.0-1.aix5.1.ppc.rpm
libgcc-4.2.0-3.aix6.1.ppc.rpm
libstdcplusplus-4.2.0-3.aix5.3.ppc.rpm
libstdcplusplus-devel-4.2.0-3.aix6.1.ppc.rpm
make-3.80-1.aix5.1.ppc.rpm
popt-1.7-2.aix5.1.ppc.rpm
python-2.6.2-1.aix5.3.ppc.rpm
python-devel-2.6.2-1.aix5.3.ppc.rpm
readline-4.3-2.aix5.1.ppc.rpm
readline-devel-4.3-2.aix5.1.ppc.rpm
unzip-5.51-1.aix5.1.ppc.rpm
zlib-1.2.3-4.aix5.2.ppc.rpm
zlib-devel-1.2.3-4.aix5.2.ppc.rpm

My suggestion, just put them all in a folder and run “rpm -i -v *” in the directory.

Now that all dependencies are met (hopefully), we can go ahead and grab the GIT source from here.  I simply downloaded this, SCP-ed it to my machine and ran “unzip *.zip” on the file.

cd into the git directory and “vi Makefile” in order to change a few things in the make instructions.  Here are the changes I made:

CC = /opt/freeware/bin/gcc
AR = ar
RM = rm -f
DIFF = diff
TAR = /usr/bin/tar
FIND = find
INSTALL = /usr/linux/bin/install

Please don’t blindly follow these changes.  Change these values to the corresponding directory.  You can get this information by running “whereis” or “which” on each utility.

The final step is the command.  Since I don’t have X installed and don’t want any GUI options, I modified my install command to eleviate some of the extra dependencies that I didn’t want to install.

“gmake NO_CURL=1 NO_FNMATCH_CASEFOLD=1 NO_MSGFMT=1 NO_TCLTK=1 install prefix=/opt/freeware”

This turns off things like curl, fixes my issues with fnmatch and turns off tc.  It also installs GIT to /opt/freeware.

Hope you all enjoy and things go smoothly.  If not, post any problems or questions here.

4 comments to How to Install GIT on AIX

  • Gautam  says:

    Hello Admin,

    Where can i download these files git-git-5bc2dc2 and
    git-git-v1.7.10.2-569-g5bc2dc2.zip

    How come git-git-5bc2dc2 files does not have an extention

    Regards,
    Gautam.

  • Bruno  says:

    Hey man, if you can help me… i’m gettin the following output trying to install git…

    # gmake NO_CURL=1 NO_FNMATCH_CASEFOLD=1 NO_MSGFMT=1 NO_TCLTK=1 install prefix=/opt/freeware
    CC archive.o
    In file included from cache.h:8,
    from archive.c:1:
    gettext.h:17:22: warning: libintl.h: A file or directory in the path name does not exist.
    In file included from cache.h:8,
    from archive.c:1:
    gettext.h: In function ‘_’:
    gettext.h:54: warning: implicit declaration of function ‘gettext’
    gettext.h:54: warning: incompatible implicit declaration of built-in function ‘gettext’
    gettext.h: In function ‘Q_’:
    gettext.h:62: warning: implicit declaration of function ‘ngettext’
    gettext.h:62: warning: return makes pointer from integer without a cast
    Assembler:
    /tmp//ccweXjri.s: line 993: 1252-040 The specified expression is not valid.
    Make sure that all symbols are defined.
    Check the rules on symbols used in an arithmetic expression
    concerning relocation.
    gmake: *** [archive.o] Error 1

  • heek  says:

    Hello,

    Thanks for posting the steps for installing git.

    In the rpm file list there are two files git-git-5bc2dc2 and git-git-v1.7.10.2-569-g5bc2dc2.zip where can I download this.

    And why are these files in the rpm list.

  • Ruslan  says:

    Will this work for AIX on Power platform?

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>