You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Run Subversion server on OS X Server

Hi,


Since Mountain Lion Apple has decided to remove svn with apache modules all together. I haven't been able to configure subversion running on https as I did in Lion Server. I tried compile and install subversion from source (subversion.apache.org) but apache won't start properly.


Has anybody got any luck with that?


Thanks

Mac mini Server (Mid 2011), OS X Server

Posted on Aug 5, 2012 11:00 PM

Reply
26 replies

Aug 5, 2012 11:32 PM in response to tcpudp

The following approach seems to be successful:


1) Download and extract the SVN sources:


subversion-1.6.18.tar.bz2

subversion-deps-1.6.18.tar.bz2


2) Configure SVN with the following command (from within the subversion-1.6.18 directory the two above files where extracted into - I used /usr/local/src/subversion-1.6.18/ You will have to adjust the command to reflect the location you are using)

./configure --with-apr=/usr/local/src/subversion-1.6.18/apr --with-apr-util=/usr/local/src/subversion-1.6.18/apr-util

3) Compile SVN:

make

4) Copy the two module sources into apache's directory:

sudo cp subversion/mod_authz_svn/.libs/mod_authz_svn.so /usr/libexec/apache2/

sudo cp subversion/mod_dav_svn/.libs/mod_dav_svn.so /usr/libexec/apache2/

5) Compile and install APR & APR-UTIL

cd apr;sudo make install;cd ../apr-util;sudo make install



AndreasUser uploaded file

Aug 5, 2012 11:57 PM in response to Andreas Amann

Hi Andreas,


Thanks for the quick reply.


I have tried to follow your instructions step by step, but when I try to do


./configure --with-apr=/usr/local/src/subversion-1.6.18/apr --with-apr-util=/usr/local/src/subversion-1.6.18/apr-util


It stops here:

Configure: Apache Portable Runtime (APR) library configuration

checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.



Is there anything I am missing?


Thanks

Mark



bash-3.2# pwd

/usr/local/src/subversion-1.6.18

bash-3.2# ./configure --with-apr=/usr/local/src/subversion-1.6.18/apr --with-apr-util=/usr/local/src/subversion-1.6.18/apr-util

configure: Configuring Subversion 1.6.18

configure: creating config.nice

checking for gcc... gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking for g++... g++

checking whether we are using the GNU C++ compiler... yes

checking whether g++ accepts -g... yes

checking how to run the C preprocessor... gcc -E

checking for a sed that does not truncate output... /usr/bin/sed

checking build system type... i386-apple-darwin12.0.0

checking host system type... i386-apple-darwin12.0.0

checking target system type... i386-apple-darwin12.0.0

checking for grep that handles long lines and -e... /usr/bin/grep

checking for egrep... /usr/bin/grep -E

checking whether ln -s works... yes

checking for a BSD-compatible install... /usr/bin/install -c

configure: Apache Portable Runtime (APR) library configuration

checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.

bash-3.2# ls

BUGS autogen.sh get-deps.sh

CHANGES build neon

COMMITTERS build-outputs.mk notes

COPYING build.conf packages

HACKING config.log serf

INSTALL config.nice sqlite-amalgamation

Makefile.in configure subversion

README configure.ac tools

TRANSLATING contrib win-tests.py

aclocal.m4 doc www

apr gen-make.opts zlib

apr-util gen-make.py


Aug 7, 2012 2:35 PM in response to tcpudp

Just in case it still doesn't work for you - I uploaded the compiled modules to my server and you can grab them from there (I obviously don't take any responsibility if this doesn't work for you…)


http://andreasamann.com/files/ML_Server/mod_authz_svn.so

http://andreasamann.com/files/ML_Server/mod_dav_svn.so


Most likely you will have to adjust the permissions on those files after installing them into /usr/libexec/apache2



AndreasUser uploaded file

Aug 8, 2012 12:32 PM in response to tcpudp

I'm getting the same error here. I've got a brand new OS X Mountain Lion Server install with the latest version of Xcode and command line tools installed.


Searches on Google suggest that this is something to do with no having APR installed. Do you possibly already have something else installed on your system that the rest of us are missing?

Aug 8, 2012 12:36 PM in response to Andreas Amann

I also tried downloading and installing your pre-built version of the .so libraries. When I install them into Apache and test the config I get the following error:


Cannot load /usr/libexec/apache2/mod_dav_svn.so into server: dlopen(/usr/libexec/apache2/mod_dav_svn.so, 10): Library not loaded: /usr/local/apr/lib/libaprutil-1.0.dylib\n Referenced from: /usr/libexec/apache2/mod_dav_svn.so\n Reason: Incompatible library version: mod_dav_svn.so requires version 5.0.0 or later, but libaprutil-1.0.dylib provides version 4.0.0

Aug 8, 2012 1:29 PM in response to Andreas Amann

Thanks very much Andreas! I was going to ask you the same thing..🙂


However I am having the same problem when the mods are referenced:



bash-3.2# apachectl -M

httpd: Syntax error on line 500 of /private/etc/apache2/httpd.conf: Syntax error on line 1 of /private/etc/apache2/other/svn.conf: Cannot load /usr/libexec/apache2/mod_dav_svn.so into server: dlopen(/usr/libexec/apache2/mod_dav_svn.so, 10): Library not loaded: /usr/local/lib/libsvn_repos-1.0.dylib\n Referenced from: /usr/libexec/apache2/mod_dav_svn.so\n Reason: image not found



Could you give us a tar of your /usr/local if possible?


Thanks again!

Aug 8, 2012 1:30 PM in response to esrthysrdyxdrtvgdr

Hmmm - I do indeed have libapr and libapr-util in /usr/local/apr/lib/ - based on the date it seems that they were installed when I was messing around trying to get the svn modules to work…

Try "sudo make install" from both the apr and apr-util subdirectories of the subversion source tree and then re-configure subversion with the above command to see whether that works…



AndreasUser uploaded file

Aug 8, 2012 3:32 PM in response to Andreas Amann

Still giving out the same error here mate.


If I copy the content of *.dylib from /usr/local/apr2/lib to /usr/lib it seems to pass the version check, but asking something about ldap. Maybe we are missing some module again?

bash-3.2# apachectl -M

dyld: Symbol not found: _apr_ldap_get_option

Referenced from: /usr/sbin/httpd

Expected in: /usr/lib/libaprutil-1.0.dylib

in /usr/sbin/httpd

/usr/sbin/apachectl: line 90: 91486 Trace/BPT trap: 5 $HTTPD $ARGV


Thanks!

Aug 14, 2012 1:56 PM in response to Andreas Amann

Upgraded to Mountain Lion Server, my SVN server is now broken. Anyone got this working yet with detailed steps that actually hold up to someone else trying it? I've tried the above from Andres without success and he seems to stop answering anyone so I'm guessing no one else was able to make it work. If there is anyone out there some detailed steps would be nice since a lot of us aren't super duper users. Especially if it requires compiling from scratch something steps with everything that must be typed would be helpful for the rest of us just trying to get back working what Apple decided to break with this update. --Thanks -- Jim

Aug 14, 2012 2:24 PM in response to commandsoft

Jim,


I'm not stopping to answer - the last message in this thread before your posting was mine… 😉


I looked through the subversion INSTALL document again and it seems that my configure command was wrong - if you use the "deps" package and want to build against the included apr/apr-util, you are not supposed to supply the "--with-apr" and "--with-apr-util" parameters. It seems as if step 2) in the original posting should be replaced with

./configure

instead.


The problem is that I can't really test this on a stock system any more so trouble-shooting for me is somewhat difficult… 😊



AndreasUser uploaded file

Run Subversion server on OS X Server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.