You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jarkko Hyvärinen <ja...@hotmail.com> on 2020/04/11 18:14:19 UTC

CentOS 8 Python bindings - opensource.wandisco.com

Hi

I have installed Subversion 1.10.6 and python bindings (subversion-python) to CentOS 8 server from opensource.wandisco.com repo. My goal is to get Trac and Subversion working with CentOS 8.

After installation I encoutered two problems with python bindings:


  1.  If I run ----> ’python2 -c "from svn import core"’
     *   then ’ImportError: No module named _core’ raises
  2.  If I specify PYTHONHOME and PYTHONPATH ----> ’PYTHONHOME=/usr PYTHONPATH=/usr/lib64/python2.7/site-packages/libsvn/ python2 -c "from svn import core"’
     *   then ’ImportError: /usr/lib64/libsvn_swig_py-1.so.0: undefined symbol: PyUnicode_FromFormat’ raises

                                                               i.      It seems that our CentOS 8 server has ’PyUnicodeUCS4_FromFormat’ instead of ’PyUnicode_FromFormat’

Is there currently any workaround to this without building Subversion from source code?

CentOS Linux release 8.1.1911
Python 2.7.16
svn, version 1.10.6 (r1863367), compiled Jan 16 2020, 12:37:21 on x86_64-redhat-linux-gnu

BR,

Jarkko Hyvärinen


Re: Re: CentOS 8 Python bindings - opensource.wandisco.com

Posted by Yasuhito FUTATSUKI <fu...@yf.bsdclub.org>.
Hi,

On 2020/04/13 4:04, Mark Phippard wrote:
> On Sun, Apr 12, 2020 at 1:10 PM Nico Kadel-Garcia <nk...@gmail.com> wrote:
> 
>> On Sat, Apr 11, 2020 at 3:21 PM Jarkko Hyvärinen
>> <ja...@hotmail.com> wrote:
>>>
>>> Hi
>>>
>>>
>>>
>>> I have installed Subversion 1.10.6 and python bindings
>> (subversion-python) to CentOS 8 server from opensource.wandisco.com repo.
>> My goal is to get Trac and Subversion working with CentOS 8.
>>>
>>>
>>>
>>> After installation I encoutered two problems with python bindings:
>>>
>>>
>>>
>>> If I run ----> ’python2 -c "from svn import core"’
>>>
>>> then ’ImportError: No module named _core’ raises
>>>
>>> If I specify PYTHONHOME and PYTHONPATH ----> ’PYTHONHOME=/usr
>> PYTHONPATH=/usr/lib64/python2.7/site-packages/libsvn/ python2 -c "from svn
>> import core"’
>>>
>>> then ’ImportError: /usr/lib64/libsvn_swig_py-1.so.0: undefined symbol:
>> PyUnicode_FromFormat’ raises
>>>
>>>                                                                i.
>> It seems that our CentOS 8 server has ’PyUnicodeUCS4_FromFormat’ instead of
>> ’PyUnicode_FromFormat’

If libsvn_swig_py-1.so.0 requires symbol PyUnicode_FromFormat, it is built
without Py_USING_UNICODE in pyconfig.h, for Python 2.7. On the other hand,
if Python library has PyUnicodeUCS4_FromFormat, it is built with
Py_UNSING_UNICODE defined and Py_UNICODE_SIZE >= 4.

That is to say, that Python bindings modules are broken.

>>>
>>> Is there currently any workaround to this without building Subversion
>> from source cod

I think there are no workaround without building Python bindings from
source code, except to contact with the packager of that package.

>>
>> Use python 3.
>>
>>
> The bindings do not support Python 3, so that is not an option.  The
> upcoming Subversion 1.14 LTS release will add support for Python 3 but
> until then once has no choice but use Python 2 if they are using the
> bindings.

Even if we use Subversion 1.14 LTS, we can't use Python 3 bindings
without modifying existing application programs, mainly str/bytes
distinction.

> 
> Aside from that ... unfortunately I have no help to offer on the original
> problem.
> 

Cheers,
-- 
Yasuhito FUTATSUKI <fu...@yf.bsdclub.org>

Re: CentOS 8 Python bindings - opensource.wandisco.com

Posted by Mark Phippard <ma...@gmail.com>.
On Sun, Apr 12, 2020 at 1:10 PM Nico Kadel-Garcia <nk...@gmail.com> wrote:

> On Sat, Apr 11, 2020 at 3:21 PM Jarkko Hyvärinen
> <ja...@hotmail.com> wrote:
> >
> > Hi
> >
> >
> >
> > I have installed Subversion 1.10.6 and python bindings
> (subversion-python) to CentOS 8 server from opensource.wandisco.com repo.
> My goal is to get Trac and Subversion working with CentOS 8.
> >
> >
> >
> > After installation I encoutered two problems with python bindings:
> >
> >
> >
> > If I run ----> ’python2 -c "from svn import core"’
> >
> > then ’ImportError: No module named _core’ raises
> >
> > If I specify PYTHONHOME and PYTHONPATH ----> ’PYTHONHOME=/usr
> PYTHONPATH=/usr/lib64/python2.7/site-packages/libsvn/ python2 -c "from svn
> import core"’
> >
> > then ’ImportError: /usr/lib64/libsvn_swig_py-1.so.0: undefined symbol:
> PyUnicode_FromFormat’ raises
> >
> >                                                                i.
> It seems that our CentOS 8 server has ’PyUnicodeUCS4_FromFormat’ instead of
> ’PyUnicode_FromFormat’
> >
> >
> >
> > Is there currently any workaround to this without building Subversion
> from source cod
>
> Use python 3.
>
>
The bindings do not support Python 3, so that is not an option.  The
upcoming Subversion 1.14 LTS release will add support for Python 3 but
until then once has no choice but use Python 2 if they are using the
bindings.

Aside from that ... unfortunately I have no help to offer on the original
problem.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

Re: CentOS 8 Python bindings - opensource.wandisco.com

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Sat, Apr 11, 2020 at 3:21 PM Jarkko Hyvärinen
<ja...@hotmail.com> wrote:
>
> Hi
>
>
>
> I have installed Subversion 1.10.6 and python bindings (subversion-python) to CentOS 8 server from opensource.wandisco.com repo. My goal is to get Trac and Subversion working with CentOS 8.
>
>
>
> After installation I encoutered two problems with python bindings:
>
>
>
> If I run ----> ’python2 -c "from svn import core"’
>
> then ’ImportError: No module named _core’ raises
>
> If I specify PYTHONHOME and PYTHONPATH ----> ’PYTHONHOME=/usr PYTHONPATH=/usr/lib64/python2.7/site-packages/libsvn/ python2 -c "from svn import core"’
>
> then ’ImportError: /usr/lib64/libsvn_swig_py-1.so.0: undefined symbol: PyUnicode_FromFormat’ raises
>
>                                                                i.      It seems that our CentOS 8 server has ’PyUnicodeUCS4_FromFormat’ instead of ’PyUnicode_FromFormat’
>
>
>
> Is there currently any workaround to this without building Subversion from source cod

Use python 3. Python 2 was partially, and poorly, abandoned for RHEL
8 and it's being phased out of RHEL 7 painfully and slowly. Take  good
look at the Fedora SRPM's if you wnt to backport to RHEL 8. It's
tricky business. I used to publish the rpmforge RPMs for Subversion,
and backporting got *paindul* due to various library dependencies
which notably exceeded those of the OS.