Updating to SVN 1.8 for Mac OSX 10.8

Updated and based off http://jason.pureconcepts.net/2012/10/updating-svn-mac-os-x/

Note: To compile and install SVN 1.8 you need Xcode with the Command Line Tools installed.  This has been tested with SVN 1.8.0 on Mac OSX 10.8 with XCode 4.6.3.

Download the SVN Source

cd ~/Downloads/
curl -o subversion-1.8.0.tar.gz http://archive.apache.org/dist/subversion/subversion-1.8.0.tar.gz
tar -xvf subversion-1.8.0.tar.gz

Build and Install SVN

The default SVN install on Mac OS X uses neon, however the new 1.8 version of SVN only supports serf.

First, create a symlink to your toolchain:

sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain

Then do:

cd ~/Downloads/subversion-1.8.0
sh get-deps.sh serf
cd serf/
sudo make install
cd ..
./configure --prefix=/usr/local --with-serf=/usr/local/serf
sudo make install

Almost done…

To use the SVN version you just installed, you need to update your PATH.

Add or edit the following line in your ~/.bash_profile:
export PATH=/usr/local/bin:$PATH

Your system should now report using SVN 1.8.0
svn --version

31 thoughts on “Updating to SVN 1.8 for Mac OSX 10.8

  1. Wow ! I didn’t realize that the new XCode version came with SVN 1.8. I always used Homebrew to install subversion so that I could get SVN 1.7 instead of 1.6. Thanks for the tip !

  2. Thanks for this tutorial Sam, it worked for me (although I experienced some random issues driving me to install serf via Homebrew rather than compiling it from the scratch)! 🙂

  3. I have the problem when run ./configure
    Mac 10.9

    gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
    configure:3030: $? = 0
    configure:3019: gcc -V >&5
    llvm-gcc-4.2: argument to `-V’ is missing
    configure:3030: $? = 1
    configure:3019: gcc -qversion >&5
    i686-apple-darwin11-llvm-gcc-4.2: no input files
    configure:3030: $? = 1
    configure:3050: checking whether the C compiler works
    configure:3072: gcc conftest.c >&5
    ld: library not found for -lcrt1.10.6.o
    collect2: ld returned 1 exit status
    configure:3076: $? = 1
    configure:3114: result: no
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME “subversion”
    | #define PACKAGE_TARNAME “subversion”
    | #define PACKAGE_VERSION “1.8.1”
    | #define PACKAGE_STRING “subversion 1.8.1”
    | #define PACKAGE_BUGREPORT “http://subversion.apache.org/”
    | #define PACKAGE_URL “”
    | /* end confdefs.h. */
    | int
    | main ()
    | {
    | ;
    | return 0;
    | }
    configure:3119: error: in `/Users/kimmin/Downloads/svn/subversion-1.8.1′:
    configure:3121: error: C compiler cannot create executables
    See `config.log’ for more details

  4. In OSX 10.9 (Mavericks) you need to run following since they’ve changed toolchaing path

    cd /Applications/Xcode.app/Contents/Developer/Toolchains
    sudo ln -s XcodeDefault.xctoolchain OSX10.9.xctoolchain

  5. HI Great Tutorial I am getting the following on In OSX 10.9 (Mavericks)
    An appropriate version of serf could not be found, so libsvn_ra_serf
    will not be built. If you want to build libsvn_ra_serf, please
    install serf 1.2.1 or newer.

    configure: error: Serf was explicitly enabled but an appropriate version was not found.

    how do i do this?

  6. On OSX 10.9 I get the error when run ./configure in ../serf/ :
    checking whether we are cross compiling… configure: error: in `/Users/admin/Install/SVN/subversion-1.8.4/serf’:
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `–host’.

    Btw, I have created the toolchain symlink for 10.9.
    What I’m missing?

  7. I think the native svn should still be installed, but you’ll need to explicitly state the path to the binary. You can do a “which svn” before installing this version of svn to find the original location.

  8. I tried this, everything was successful except when did an edit to the .bash_profile file.

    from this

    PATH=${PATH}:/usr/local/sbin; export PATH

    to this

    #PATH=${PATH}:/usr/local/sbin; export PATH
    PATH=${PATH}:/usr/local/sbin; export PATH=/usr/local/bin:$PATH

    I did an svn –version and it still uses the old one.


  9. nope. i thought it’s automatic. reloaded it and the SVN is now new. Thanks for that.

    Won’t this conflict with my brew installations since I changed the $PATH?

  10. In relation to building on 10.9, a potential source of grief is that Apple in its infinite wisdom has decided not to include the command line tools into the most recent versions of Xcode. Rather, they have to be downloaded separately from the Apple website. Otherwise, you’ll run into the ‘configure: error: cannot run C compiled programs. If you meant to cross compile, use `–host’.’ – problem

    See http://stackoverflow.com/questions/9329243/xcode-4-4-and-later-install-command-line-tools for more detail, but here’s the short summary:

    “With Xcode 5.0.1 and Mavericks 10.9 the command line tool is no longer available through Xcode. Instead they must be downloaded from the Apple Developer Tools site: https://developer.apple.com/downloads/index.action. This requires signing in with a developer account.”

  11. This works perfectly on 10.9. Thank you!

    For OS X 10.9 (Mavericks) – you can use the same commands but one small change:

    sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain

  12. Thanks for that – great walkthru.

    Needed to update the toolchain link for OS X 10.9.2

    sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain

    Might be useful to remind people that commands are a single line.

  13. Hi, I’m trying to upgrade my svn. I’m using Mac OSX 10.9, and serf is looking for the c compiler (CC) at :

    configure:3377: checking for gcc
    configure:3404: result: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/cc
    configure:3633: checking for C compiler version
    configure:3642: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/cc –version >&5
    ./configure: line 3644: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/cc: No such file or directory

    But I don’t have Xcode, I use the Command Line Tools instead. So, is there any way to tell serf where to look for the compiler at the right place ? Any help would be appreciate. Thanks!

  14. I download 1.8.10 , whose serf lib is need scons to build (not normal ./configure ). The scons download link in the serf’s README is expired, however you can find it’s home page from the link. Download it and untar, it is ready to use (no compile and installation required).

    In the serf path , just run scons.py and sudo scons.py install


    in my computer , I have to give the serf lib path to svn’s configure:

    ./configure –with-serf=/usr/local

  15. Thanks, this is the only tutorial that worked for me. It’s so annoying to have to go through all this just to update svn client on Mac though.

  16. Hi, I just downloaded svn v1.8.11 and I also have problem with updating. I use this instruction:
    Since there is no configure file in serf catalog, then how can I install/build serf using scons? Can somebody help with providing instruction step by step what to download (for eg. scons v2.3.4) and how to use it, commands, execute in what path, etc. I’m newbie so any help will be much appreciated.

  17. Ok, I got it! I managed to do successful update by doing what’s next:

    1) Open your terminal, and change user for root by typing:
    sudo -s
    2) Create a symbolic link to your Xcode toolchain:
    ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain

    Download SVN 1.8 sources:
    cd ~/Downloads/
    curl -o subversion-1.8.11.tar.gz http://archive.apache.org/dist/subversion/subversion-1.8.9.tar.gz
    tar -xvf subversion-1.8.11.tar.gz

    Compile SVN 1.8 from sources:
    cd ~/Downloads/subversion-1.8.11
    sh get-deps.sh serf
    cd serf/

    and now…

    next steps You can find here:

    but… what I did was to:
    Install scons (http://stackoverflow.com/questions/1207702/how-to-install-scons-on-mac-os-x)
    as comment said use sudo be fore python otherwise there will be some permission issue.

    After this get back to serf and run command: “scons”
    This will build serf.

    Next step is to get back to svn root so:
    cd ..
    ./configure –prefix=/usr/local –with-serf=/usr/local
    make install

    Your system should now report using SVN 1.8.11

    svn –version

    Works for me! Hope it will work for U2 🙂

Leave a Reply