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/
./configure
make
sudo make install
cd ..
./configure --prefix=/usr/local --with-serf=/usr/local/serf
make
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

22 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.

    HELP!

  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.

Leave a Reply