Because it doesn't pull dependency app-emacs/libegit2 when enabling flag libgit. After manually installing dep, it compiles & runs fine.
This is currently fixed in the tree.