osx - Subversion broken on OS X, recent Google/Stack answers Not Fixing It - Can't Even Reinstall

06
2014-04
  • Mark Bennett

    (I think this is the correct board to post on, also considered StackOverflow but this isn't really coding, and serverFault but seemed lower level OS items)

    After several hours trying to add matplotlib to Python, via various XCode and MacPorts adventures, I now find that Subversion is broken. Ideas I've found online don't seem to fix it, and even reinstalling hasn't fixed it.

    Problem:

    The command:

    svn -version
    

    Produces this:

    Error:
    dyld: Library not loaded: @rpath/usr/lib/libneon.27.dylib
      Referenced from: /usr/bin/svn
      Reason: Incompatible library version: svn requires version 30.0.0 or later, but libneon.27.dylib provides version 29.0.0
    Trace/BPT trap: 5
    

    One other symptom:

    Python is in an odd state. --version says 2.7.2. But now, if I try to import matplotlib, I get the OS X "python ended unexpectedly"

    I don't understand the connection between python and subversion; the svn error is a higher priority to fix!

    System:

    Mac OS X Mountain Lion, up to date, Java 7. XCode and Macports info below

    Background / What I've Tried So Far:

    I've found 3 svn executable, all give the same error:

    • /usr/bin/svn
    • /opt/subversion/bin/svn
    • /Applications/Xcode.app/Contents/Developer/usr/bin/svn

    Updated MacPorts OK

    sudo port selfupdate
    sudo port upgrade outdated
    

    At one point tried switching to MacPorts' svn, completed ok, but result gives same error

    sudo port install subversion
    

    Checked that XCode is up to date (App Store reports 4.6.3 and up to date, though About Xcode says 3.2.6)

    Reinstalled XCode command line tools. Now no longer under XCode Preferences, instead you download from the developer site. Got the version for 4.6.1 March 2013 (seemed to be latest), and installed OK.

    I've thought about going after the neon stuff, but don't know much about it, and worried I might hose my system further.

    Update:

    The reason I didn't see Download Command Line tools in XCode preferences was because I was running the wrong copy of XCode. OLD XCode lives under /Developer, new XCode from the App Store lives under /Applications

    Running the newer XCode under /Apps, I did update the command line tools, but I'm still having same error as before (library load error, etc, described at top of this post)

  • Answers
  • Mark Bennett

    SVN was still working on another Mac, which I hadn't messed with python/macports yet, and then also on the "bad" mac if I ran as root.

    Doing which svn on the good mac showed /opt/subversion/bin/svn, and svn --version gave 1.6.15 (r1038135) Nov 29, 2010 from CollabNet.

    Long story short, I found two ways to get it working:

    Method 1:

    • Path with /opt/subversion/bin/svn executable first (actually /opt/subversion/bin), and
    • DYLD_LIBRARY_PATH=/opt/subversion/lib:/usr/lib

    Method 2:

    • Path with /usr/bin/svn first, and
    • DYLD_LIBRARY_PATH NOT set

    A few other notes:

    • I thought I had tried /opt/subversion/bin/svn before and it hadn't worked, but I was testing by renaming things and somehow the test must have been incorrect
    • I had thought to check LD_LIBRARY_PATH, but didn't think of DYLD...
    • Haven't revisited original python problem yet

  • Related Question

    osx - Install Python Gtk using Mac Ports
  • brianegge

    I'm attempting to install the Gimp using Mac Ports on OSX 10.5. The Gimp won't build because it requires Python 2.5 gtk. I'm getting the following error when installing Python GTK:

    $ sudo port install py25-gtk
    Password:
    --->  Computing dependencies for py25-gtk
    --->  Staging py25-setuptools into destroot
    Error: Target org.macports.destroot returned: shell command " cd     "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-setuptools/work/setuptools-0.6c11" && /opt/local/bin/python2.5 setup.py --no-user-cfg install --prefix=/opt/local --root=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-setuptools/work/destroot " returned error 1
    Command output: sh: line 0: cd:     /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-setuptools/work/setuptools-0.6c11: No such file or directory
    
    Error: The following dependencies failed to build: py25-cairo py25-numpy py25-nose py25-setuptools
    Error: Status 1 encountered during processing.
    

    I'm thinking this might be related to the fact that I also have Python 2.6 installed, which I needed to do to get mercurial+svn working.


  • Related Answers
  • fideli

    Your problem may be similar to this one on the MacPorts trac site. The conclusion was that it was a corrupt Python 2.5 installation and removing and reinstalling python2.5 and all py25- ports solved the problem.

    Also, the macports-users mailing list is much more active than MacPorts-related posts here at superuser.com and your problem may be better solved there (or already solved, search first).