Search code examples
perlgit-svnmacos

GIT-SVN Issue on Mac


I am in the process of getting git-svn working on my Mac. I am currently on Lion (but I had similar results when testing on Snow Leopard. I seem to be one of the few people having this issue. This is different from the issue I see that some people had with just including SVN/Core.pm.

Below is an attempt to do a git svn clone on a vanille repository (obviously the host and directory details have been changed for posting):

Macbook-Pro:git david$ git svn clone https://somesite.com/SVN/someRepo/
Initialized empty Git repository in /Projects/git/MyWorkspace/.git/
Can't load '/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle' for module SVN::_Core: dlopen(/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle, 1): Library not loaded: /usr/lib/libsvn_client-1.0.dylib
Referenced from: /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle
Reason: image not found at /System/Library/Perl/5.12/darwin-thread-multi-2level/DynaLoader.pm line 204.    
at /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/SVN/Base.pm line 59
BEGIN failed--compilation aborted at /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/SVN/Core.pm line 5.
Compilation failed in require at /Developer/usr/libexec/git-core/git-svn line 58.

Solution

  • In my case, simply installing git via Macports solved my problem. I believe this problem was probably caused by older installs (maybe the Mac OS X Git Installer). If you are in this scenario, first install Macports:

    http://www.macports.org/install.php

    Then, once Macports is installed (with the correct version for your OS), then run:

    sudo port install git-core +svn
    

    After this, I just had to use the git at the new location installed by Macports:

    /opt/local/bin/git
    

    I modified my PATH variable so that this was the git used by default.