Installing git on Mac OS 10.4

It’s supposed to be impossible to install git on Mac OS 10.4.  Supposedly this is due to some dependency issues with asciidoc and expat[1] that Apple fixed in 10.5.  But I needed it to work, so I figured out a way!  Here’s how:

  • first update asciidoc and expat[1]
  • run make

If make fails with errors like:

/usr/bin/ld: warning /opt/local/lib/libz.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning /sw/lib/libiconv.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning /sw/lib/libcrypto.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning /sw/lib/libiconv.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning /sw/lib/libcrypto.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning /sw/lib/libexpat.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)

(This is apparently a MacPorts problem[2])

Proceed to stash all those wayward libraries in temporary folders like so (same for /sw/lib):

  • cd /opt/local/lib
  • mkdir git_doesnt_install
  • mv libz.dylib libiconv.dylib llibcrypto.dylib git_doesnt_install

Continue to make.  Now git should be installed!

Move all the libraries back to where they were:

  • mv /opt/local/lib/git_doesnt_install/* /opt/local/lib

And git away!  I’m now running 1.6.3 which is the current release version, and it works totally smoothly.

[1] git dependency updates on mac os 10.4

[2] macports library clashes

Advertisements

Comments Off on Installing git on Mac OS 10.4

Filed under Uncategorized

Comments are closed.