The compiler error message describes the problem:
Could not find module `Control.Concurrent.STM' It is a member of the hidden package `stm-2.4.2'. Perhaps you need to add `stm' to the build-depends in your .cabal file.
So if you cabal unpack git-annex
, cd into the directory, edit the cabal file to add stm to the build-depends, and then run cabal install
from there, that should resolve the issue...