I installed CollabNetSubversion-client-1.6.17-1.x86_64.rpm, which installs httpd v2.2.19

# /opt/CollabNet_Edge/csvn/bin/httpd -v
Server version: Apache/2.2.19 (Unix)

I installed Trac-0.12.2.tar.gz.

On the Apache httpd that comes with RHEL5, which is running v2.2.3

# apachectl -v
Server version: Apache/2.2.3

I installed mod_wsgi, since that is what the trac website recommended.

python.conf settings for the 2.2.3 httpd:

Alias /trac/chrome/common /var/trac/htdocs/common
Alias /trac/chrome/site /var/trac/htdocs/site
<Directory "/var/trac/htdocs">
   Order allow,deny
   Allow from all
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias /trac /var/trac/cgi-bin/trac.wsgi
<Directory /var/trac/cgi-bin>
  WSGIApplicationGroup %{GLOBAL}
  Order deny,allow
  Allow from all
<LocationMatch "/trac/[^/]+/login">
  AuthType Digest
  AuthName "trac"
  AuthDigestDomain /trac
  AuthUserFile /etc/httpd/trac.htpasswd
  Require valid-user

I setup a trac project and configured it to point to an existing SVN repository.

The first error reported in trac.log was:

ImportError: No module named svn

http://trac.edgewall.org/wiki/TracSubversion#Troubleshooting has the answer, so I added symbolic links to the bindings that are in the CollabNet area:

cd /usr/lib64/python2.4/site-packages
ln -s /opt/CollabNet_Edge/csvn/lib/svn-python/libsvn .
ln -s /opt/CollabNet_Edge/csvn/lib/svn-python/svn .

Next error in trac.log (thanks for reading this far -- this is the real problem):

Trac[svn_fs] INFO: Failed to load Subversion bindings
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/versioncontrol/svn_fs.py", line 267, in    __init__
  File "build/bdist.linux-x86_64/egg/trac/versioncontrol/svn_fs.py", line 68, in _import_svn
  File "/opt/CollabNet_Edge/csvn/lib/svn-python/svn/fs.py", line 19, in ?
     from libsvn.fs import *
  File "/opt/CollabNet_Edge/csvn/lib/svn-python/libsvn/fs.py", line 7, in ?
     import _fs
ImportError: /usr/lib64/python2.4/site-packages/libsvn/../../../lib/libsvn_subr-1.so.0:
  undefined symbol: apr_memcache_add_server

I found this page that speaks of the same problem: http://subversion.open.collab.net/ds/viewMessage.do?dsForumId=3&dsMessageId=313639

The advice given: "you probably need to use our Apache server or update yours to 2.2.11" (i.e., 2.2.19 to match the one in the CollabNet package). Well, the CollabNet-bundled httpd server doesn't have mod_wsgi installed, and I'm not sure how I could build such and add it to their server -- so I don't like that option. I'd rather not update our main httpd from 2.2.3 to 2.2.19 -- but is this really my only other option?

BTW, I tried downloading SVN 1.6.17 and building and installing swig-py -- to build the bindings, hoping to use them with the 2.2.3 httpd and trac. However, I'm not sure this is safe/correct... SVN is tied to the 2.2.19 httpd, somehow, right? Anyway, I couldn't get that to work either. Any advice appreciated.

UPDATE: Following Graham's suggestion, I compiled a 2.2.19 httpd server (to replace the RH5 2.2.3 httpd) and now everything is working. My first attempt with the 2.2.19 httpd failed. I had to configure httpd with option --with-included-apr, then everything worked.

  • Can you please phrase this as a question? – Kvisle Oct 19 '11 at 19:42
  • Sure, good point. The real question is how can I get trac to run on the RHEL5 httpd when CollabNet SVN is running on its own separate httpd, with a different version of httpd. – Mark Rajcok Oct 19 '11 at 20:15

The binaries you are using were built against a newer Apache version and specifically a newer version of the APR libraries than your Apache 2.2.3 installation you are using. There is no way around the problem except for upgrading to Apache version which uses a new enough APR library.

  • Thanks Graham. I started down this road near the end of the work day earlier today, but it is good to hear that I'm finally going down the right road now. – Mark Rajcok Oct 20 '11 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.