[Trac] Problem with svn-python bindings when run from apache
Dima Diall
dimadiall at gmail.com
Sun Jun 5 10:34:57 CDT 2005
Hello list:
I am having a somewhat stupid (and probably very trivial to solve)
problem... I had to install Trac on a Solaris 8 host where I don't
have root access. As many required packages where missing (everything
except apache), I built them (quite a lot of work on non GNU-based
systems, let me say :-) and installed in a directory where I have
write permission, say under '/long/path/sw'.
The wiki and most of Trac is working fine, just two modules (that I've
found so far) where I guess the svn-python bindings are needed --
timeline and code browser -- bail out with an "internal error":
Traceback (most recent call last):
File "/long/path/sw/lib/python2.2/site-packages/trac/core.py", line
531, in cgi_start
real_cgi_start()
File "/long/path/sw/lib/python2.2/site-packages/trac/core.py", line
526, in real_cgi_start
dispatch_request(path_info, args, req, env)
File "/long/path/sw/lib/python2.2/site-packages/trac/core.py", line
439, in dispatch_request
module = module_factory(args, env, database, req)
File "/long/path/sw/lib/python2.2/site-packages/trac/core.py", line
172, in module_factory
import sync
File "/long/path/sw/lib/python2.2/site-packages/trac/sync.py", line 22, in ?
from svn import core, fs, delta, repos
File "/long/path/sw/lib/svn-python/svn/core.py", line 19, in ?
from libsvn.core import *
File "/long/path/sw/lib/svn-python/libsvn/core.py", line 5, in ?
import _core
ImportError: ld.so.1: /long/path/sw/httpd/cgi-bin/trac.cgi: fatal:
relocation error: file /long/path/sw/lib/libsvn_subr-1.so.0: symbol
apr_file_mtime_set: referenced symbol not found
When I run svnlook.py to test the swig python bindings everything
seems to work fine... I have even tried to run it from a wrapper cgi
script under apache and it fails with the same kind of error
("ImportError: ld.so.1: ...").
So, I figure this should be linked to a difference in the environment
between bash and httpd. For everything to work from this software
directory of mine I defined some extra variables and am passing them
to apache (via PassEnv in httpd.conf).
PATH=/long/path/sw/bin:$PATH
LD_LIBRARY_PATH=/long/path/sw/lib:$LD_LIBRARY_PATH
PYTHONPATH=/long/path/sw/lib/python2.2/site-packages
I am pretty sure that there is a small detail escaping to my attention
and this is should quite easy to solve. I battled with this ordeal the
best part of the day and hope that someone can shed a bit of light.
Here are the software versions I am using (the first two were already
installed in /opt by the sysadmin):
- apache 2.0.46 (pre-installed)
- python 2.2.1 (pre-installed)
- subversion 1.2.0
- swig 1.3.24 (also supported per subversion/bindings/swig/INSTALL)
- pysqlite 1.1.6
- sqlite 3.2.1
- clearsilver 0.9.14
- trac 0.8.2
Thank you very much in advance!!
--
/dima [http://www.cs.ucl.ac.uk/students/d.diall/]
PS: By the way, great piece of software to help manage development
projects... Keep up the great work, Edgeware!
More information about the Trac
mailing list