You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Peter Pommelich <Pe...@web.de> on 2011/02/16 14:43:19 UTC

Subversion 1.6.15, swig 1.3.36, python 2.6.6 - make check-swig-py fails

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'

Here I thought 'Whatever, just go ahead and install it'. So I did a '~/opt/make-3.81/bin/make install-swig-py:
-> no error

But if I execute: python -c "from svn import *"
->Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<HOME_DIR>/opt/svn-1.6.15/lib/svn-python/svn/core.py", line 19, in <module>
    from libsvn.core import *
  File "<HOME_DIR>/opt/svn-1.6.15/lib/svn-python/libsvn/core.py", line 7, in <module>
    import _core
ImportError: No module named _core

The same error messages appear if I use swig-2.0.1 instead of 1.3.36. Subversion's configure seems to find the correct swig and python version:
---snip
...
configure:23288: checking for <HOME_DIR>/opt/python-2.6.6/bin/python
configure:23318: result: <HOME_DIR>/opt/python-2.6.6/bin/python
configure:23607: checking for JDK
configure:23638: WARNING: no JNI header files found.
configure:23646: result: no
configure:23722: checking for perl
configure:23740: found /usr/bin/perl
configure:23753: result: /usr/bin/perl
configure:23764: checking for ruby
configure:23795: result: none
configure:24936: checking swig version
configure:24952: result: 1.3.36
configure:24978: Configuring python swig binding
configure:24981: checking for Python includes
configure:24990: result: -I<HOME_DIR>/opt/python-2.6.6/include/python2.6
configure:24999: checking for compiling Python extensions
configure:25008: result: gcc -fPIC
configure:25012: checking for linking Python extensions
configure:25021: result: gcc -shared
configure:25025: checking for linking Python libraries
configure:25034: result:
configure:25040: checking for apr_int64_t Python/C API format string
configure:25088: result: L
configure:25102: checking perl version
configure:25105: result: 5008004
configure:26019: checking for ctypesgen.py
configure:26050: result: none
configure:26419: creating ./config.status
...
---snap

In the file ~/building/buildSVN/subversion-1.6.15/subversion/bindings/swig/INSTAL I noticed a part ('Step 2') which says:
...
If Subversion's ./configure finds a SWIG that it's happy with, then
it will build special glue libraries to link svn to the swig bindings:
    libsvn_swig_py.so (for Python)
    libsvn_swig_perl.so (for Perl)
...
I do not find the mentioned file 'libsvn_swig_py.so' somewhere in '~/building/buildSVN/subversion-1.6.15/'. And the file '_core.so' is not available in '~/opt/svn-1.6.15/lib/svn-python/libsvn/'

ls -al ~/opt/svn-1.6.15/lib/svn-python/libsvn/*.so
>>  <HOME_DIR>/opt/svn-1.6.15/lib/svn-python/libsvn/*.so: No such file or directory

Any help is highly appreciated.

Thanks a lot.
Pete
___________________________________________________________
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar

Re: Subversion 1.6.15, swig 1.3.36, python 2.6.6 - make check-swig-py fails

Posted by Peter Pommelich <Pe...@web.de>.
Hi,

sorry for that late reply, but I was kind of busy the last days.

Finally with your help I was able to get the solution which indeed had something to do with shared/no shared libraries thing.

So, thanks again!

Kind regards,
Pete
-----Ursprüngliche Nachricht-----
Von: "Peter Pommelich" &lt;PetePomm@web.de&gt;
Gesendet: 16-Feb-2011 17:59:42
An: "Stefan Sperling" &lt;stsp@elego.de&gt;
Betreff: Re: Subversion 1.6.15, swig 1.3.36, python 2.6.6 - make check-swig-py fails

>Hi,
>
>sorry, I did not read this email before I sent my own reply.
>
>Thanks for that, I'll give it a try asap.
>
>Kind regards,
>Pete
>
>-----Ursprüngliche Nachricht-----
>Von: "Stefan Sperling" &lt;stsp@elego.de&gt;
>Gesendet: 16.02.2011 15:44:59
>An: "Peter Pommelich" &lt;PetePomm@web.de&gt;
>Betreff: Re: Subversion 1.6.15, swig 1.3.36, python 2.6.6 - make check-swig-py fails
>
>>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.
>___________________________________________________________
>Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
>Toolbar eingebaut! http://produkte.web.de/go/toolbar
___________________________________________________________
WEB.DE DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt mit 
gratis Handy-Flat! http://produkte.web.de/go/DSL_Doppel_Flatrate/2

Re: Subversion 1.6.15, swig 1.3.36, python 2.6.6 - make check-swig-py fails

Posted by Peter Pommelich <Pe...@web.de>.
Hi,

sorry, I did not read this email before I sent my own reply.

Thanks for that, I'll give it a try asap.

Kind regards,
Pete

-----Ursprüngliche Nachricht-----
Von: "Stefan Sperling" &lt;stsp@elego.de&gt;
Gesendet: 16.02.2011 15:44:59
An: "Peter Pommelich" &lt;PetePomm@web.de&gt;
Betreff: Re: Subversion 1.6.15, swig 1.3.36, python 2.6.6 - make check-swig-py fails

>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.
___________________________________________________________
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar

Re: Subversion 1.6.15, swig 1.3.36, python 2.6.6 - make check-swig-py fails

Posted by Stefan Sperling <st...@elego.de>.
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.