On Wed, Feb 16, 2011 at 02:43:19PM +0100, Peter Pommelich wrote:
> Hi everybody,
> 
> I need a subversion installation with swig and python bindings. I tried for 
> two day now to get this up. But I get ever time the same error message (see 
> bottom of this email).
> 
> But first some environment information. All sources have to be build and 
> installed in user's directory.
> 
> uname -a
> >>SunOS 5.10 Generic_144488-01 sun4v sparc SUNW,T5240
> subversion: 1.6.15
> swig: 1.3.36
> python: 2.6.6
> openssl-0.9.8q
> 
> python, openssl and swig compiled with gcc-4.4.0
> 
> ~/opt/swig-1.3.36/bin/swig -version: 
> >> SWIG Version 1.3.36
> >>
> >> Compiled with g++ [sparc-sun-solaris2.10]
> 
> ~/opt/python-2.6.6/bin/python -V
> >> Python 2.6.6
>  
> ~/opt/openssl-0.9.8q/bin/openssl version
> >> OpenSSL 0.9.8q 2 Dec 2010
> --------- 
> Now to the point. Every command is executed from within subversion's source 
> root directory (in this case '~/building/buildSVN/subversion-1.6.15'). Please 
> note that I replaced the user's home dir by '<HOME_DIR>' because it's quite a 
> long path.
> 
> Subversion is configured with:
> ./configure PYTHON=<HOME_DIR>/opt/python-2.6.6/bin/python 
> --with-swig=<HOME_DIR>/opt/swig-1.3.36/bin/swig 
> --prefix=<HOME_DIR>/opt/svn-1.6.15 --with-ssl 
> --with-openssl=<HOME_DIR>/opt/openssl-0.9.8q 
> --with-libs=<HOME_DIR>/opt/openssl-0.9.8q 
> -> No error
> 
> ~/opt/make-3.81/bin/make -j7 local-all
> -> No error
> 
> ~/opt/make-3.81/bin/make install
> -> No error
> 
> make swig-py
> -> no error
> 
> make check-swig-py
> ->cd 
> <HOME_DIR>/building/buildSVN/subversion-1.6.15/subversion/bindings/swig/python;
>  \
>   <HOME_DIR>/opt/python-2.6.6/bin/python 
> <HOME_DIR>/building/buildSVN/subversion-1.6.15/subversion/bindings/swig/python/tests/run_all.py
> Traceback (most recent call last):
>   File 
> "<HOME_DIR>/building/buildSVN/subversion-1.6.15/subversion/bindings/swig/python/tests/run_all.py",
>  line 2, in <module>
>     import mergeinfo, core, client, delta, pool, ra, wc, repository, auth, \
>   File 
> "<HOME_DIR>/building/buildSVN/subversion-1.6.15/subversion/bindings/swig/python/tests/mergeinfo.py",
>  line 14, in <module>
>     from svn import core, repos, fs
>   File 
> "<HOME_DIR>/building/buildSVN/subversion-1.6.15/subversion/bindings/swig/python/svn/core.py",
>  line 19, in <module>
>     from libsvn.core import *
>   File 
> "<HOME_DIR>/building/buildSVN/subversion-1.6.15/subversion/bindings/swig/python/libsvn/core.py",
>  line 7, in <module>
>     import _core
> ImportError: No module named _core
> *** Error code 1
> make: Fatal error: Command failed for target `check-swig-py'

This usually happens because python cannot dlopen() the shared libraries
needed by the SVN bindings. You are seeing this because you've installed
the svn libs into a non-standard search path (e.g. if you had used
--prefix=/usr/local it would likely just work because the libs would
be found in /usr/local/lib).

Just like you need to add ~/opt/*/bin directories to your PATH to run
the executables you've installed, you need to add all directories
containing libraries that will be dynamically loaded at runtime
to LD_LIBRARY_PATH.

Something like this:
 export LD_LIBRARY_PATH=<HOME_DIR>/opt/svn-1.6.15/lib

You may need even more entries in this list if those libs depend
on other libraries that aren't in the standard search path either.

Reply via email to