git-annex.app

For easy installation, Jimmy Tang builds a standalone git-annex.app of the git-annex assistant.

using Brew

sudo brew update
sudo brew install haskell-platform git ossp-uuid md5sha1sum coreutils pcre libgsasl gnutls libidn libgsasl pkg-config
cabal update
cabal install git-annex --bindir=$HOME/bin

using MacPorts

Install the Haskell Platform from http://hackage.haskell.org/platform/mac.html. The version provided by Macports is too old to work with current versions of git-annex. Then execute

sudo port install git-core ossp-uuid md5sha1sum coreutils pcre

sudo ln -s /opt/local/include/pcre.h  /usr/include/pcre.h # This is hack that allows pcre-light to find pcre

sudo cabal update
cabal install git-annex --bindir=$HOME/bin

PATH setup

Do not forget to add to your PATH variable your ~/bin folder. In your .bashrc, for example:

PATH=$HOME/bin:/usr/bin/local:$PATH

See also:

I've moved some outdated comments about installing on OSX to old comments. And also moved away some comments that helped build the instructions above.

Comment by http://joeyh.name/ Tue Jul 24 15:09:29 2012

I tried installing with cabal and homebrew on Mountain Lion. After cabal install git-annex I get:

Linking dist/build/git-annex/git-annex ...
Installing executable(s) in /Users/dfc/.cabal/bin
setup: standalone/macos/git-annex.app/Contents/Info.plist: does not exist
cabal: Error: some packages failed to install:
git-annex-3.20121001 failed during the final install step. The exception was:
ExitFailure 1

There is no directory named macos inside of standalone:

jumbo:git-annex-3.20121001 dfc$ ls -l standalone/
total 112
-rw-r--r--+ 1 dfc  staff  55614 Oct  6 10:40 licences.gz
drwxr-xr-x+ 6 dfc  staff    204 Oct  6 10:40 linux
drwxr-xr-x+ 3 dfc  staff    102 Oct  6 10:40 osx
@Douglas, I've fixed that in git. FWIW, the program is installed before that point. Actually, I am leaning toward not having cabal install that plist file at all.
Comment by http://joeyh.name/ Sat Oct 6 21:05:45 2012

[ 98 of 248] Compiling Utility.DiskFree ( Utility/DiskFree.hs, dist/build/git-annex/git-annex-tmp/Utility/DiskFree.o ) [ 99 of 248] Compiling Utility.Url ( Utility/Url.hs, dist/build/git-annex/git-annex-tmp/Utility/Url.o )

Utility/Url.hs:111:88: Couldn't match expected type Maybe URI' with actual typeURI' In the second argument of fromMaybe', namely (newURI relativeTo u)' In the expression: fromMaybe newURI (newURI relativeTo u) In an equation for newURI_abs': newURI_abs = fromMaybe newURI (newURIrelativeTo` u) cabal: Error: some packages failed to install: git-annex-3.20121009 failed during the building phase. The exception was: ExitFailure 1

@Сергей, I've fixeed that in git.
Comment by http://joeyh.name/ Wed Oct 10 15:34:23 2012

I'm getting an error from gpg when I try to set up a repository on a remote server with encrypted rsync. Looks like libncurses in /usr/lib is 32 bit:

Dyld Error Message:
  Library not loaded: /opt/local/lib/libncurses.5.dylib
  Referenced from: /Applications/git-annex.app/Contents/MacOS/opt/local/lib/libreadline.6.2.dylib
  Reason: no suitable image found.  Did find:
  /usr/lib/libncurses.5.dylib: mach-o, but wrong architecture
  /usr/lib/libncurses.5.dylib: mach-o, but wrong architecture

I tried running the git-annex.app on my Core Duo Macbook pro, and it does not run at all. I get an error on my system.log

Nov 3 12:13:26 Bret-Mac [0x0-0x15015].com.branchable.git-annex[155]: /Applications/git-annex.app/Contents/MacOS/runshell: line 52: /Applications/git-annex.app/Contents/MacOS/bin/git-annex: Bad CPU type in executable Nov 3 12:13:26 Bret-Mac com.apple.launchd.peruser.501[92] ([0x0-0x15015].com.branchable.git-annex[155]): Exited with exit code: 1

It works on my 64 bit machine, and this has become quite the problem for a while now, where people with newer macs dont compile back for a 32bit machine.

Is there any hope for a pre-compiled binary that works on a 32 bit machine?

I've been updating my haskell platform install recently, i used to try and get the builder to spit out 32/64bit binaries, but recently it's just become too messy, I've just migrated to a full 64bit build system. I'm afraid I won't be able to provide 32bit builds any more.
Comments on this page are closed.