Sean Santry

Building Git 1.5.4 on Mac OS X 10.5 Leopard

Wincent Colaiuta has some good, basic instructions for getting Git version 1.5.3.x built and installed on Mac OS X Leopard.

For Git 1.5.4, building git-gui will fail when it tries to build some localization files. The message I got during make prefix=/usr/local all was

    GITGUI_VERSION = 0.9.2
    * new locations or Tcl/Tk interpreter
    GEN git-gui
    INDEX lib/
    MSGFMT    po/de.msg 371 translated.
    MSGFMT    po/fr.msg 371 translated.
    MSGFMT    po/hu.msg 371 translated.
    MSGFMT    po/it.msg 370 translated, 1 untranslated.
    MSGFMT    po/ja.msg 371 translated.
    MSGFMT    po/ru.msg 367 translated, 4 untranslated.
    MSGFMT    po/sv.msg 371 translated.
    MSGFMT po/zh_cn.msg 53 translated, 57 fuzzy, 253 untranslated.
    SUBDIR gitk-git
    GEN gitk-wish
Generating catalog po/de.msg
msgfmt --statistics --tcl po/de.po -l de -d po/
make[1]: msgfmt: Command not found
make[1]: *** [po/de.msg] Error 127
make: *** [all] Error 2

This is because Leopard doesn’t come with the GNU gettext utilities. While I imagine one could build and install gettext, there’s an easier fix. Just set the NO_MSGFMT environment variable to yes and the Git build scripts will use a simple (well, according to the source, “really stupid”) program that does the necessary work in place of gettext’s msgfmt tool.

So, just tack NO_MSGFMT=yes in front of your build and you’re all set.

NO_MSGFMT=yes make prefix=/usr/local all