Opened 2 years ago

Closed 2 years ago

#12186 closed defect (fixed)

Subversion-1.12.0 is broken with SWIG-4.0.0

Reported by: Douglas R. Reno Owned by: Douglas R. Reno
Priority: normal Milestone: 9.0
Component: BOOK Version: SVN
Severity: normal Keywords:


This is here as a reminder that Subversion-1.12 continues to be broken with SWIG-4.0.0.

This seems to be due to SWIG4's removal of the "-classic" switch from the SWIG Python Bindings compiler, but also due to issues with the ruby compiler.

Arch had a fix, but they reverted to SWIG3 for Subversion it seems.

rm subversion/bindings/swig/proxy/*.swg #{perlrun,pyrun,python,rubydef,rubyhead,rubytracking,runtime,swigrun}.swg
sed -i 's/-classic/-nofastunpack/' build.conf
sed -i '1s|/usr/bin/env python$|/usr/bin/env python2|' */*/*.py */*/*/*.py */*/*/*/*.py

Change History (13)

comment:1 by Douglas R. Reno, 2 years ago

Type: enhancementdefect

Note that I still had SWIG3 installed, but I upgraded to SWIG4 to test GPGME.

I'll probably fix this if there aren't any objections (at least if this fix works, otherwise I'm leaving it alone for someone with more knowledge).

comment:2 by Douglas R. Reno, 2 years ago

  /usr/bin/python /sources/subversion-1.12.0/subversion-1.12.0/subversion/bindings/swig/python/tests/
Traceback (most recent call last):
  File "/sources/subversion-1.12.0/subversion-1.12.0/subversion/bindings/swig/python/tests/", line 22, in <module>
    import mergeinfo, core, client, delta, checksum, pool, fs, ra, wc, repository, \
  File "/sources/subversion-1.12.0/subversion-1.12.0/subversion/bindings/swig/python/tests/", line 22, in <module>
    from svn import core, repos, fs
  File "/sources/subversion-1.12.0/subversion-1.12.0/subversion/bindings/swig/python/svn/", line 26, in <module>
    from libsvn.core import *
  File "/sources/subversion-1.12.0/subversion-1.12.0/subversion/bindings/swig/python/libsvn/", line 13, in <module>
    from . import _core
ImportError: cannot import name _core
make: *** [Makefile:938: check-swig-py] Error 1

It now fails there. Going to back down to SWIG3 and resume.

comment:3 by Bruce Dubbs, 2 years ago

For our purposes. I don't think we need swig bindings for subversion. Let's just use


comment:4 by Douglas R. Reno, 2 years ago

I think we need it for Git

comment:5 by Pierre Labastie, 2 years ago

Only the perl bindings are needed for git. We could comment out python and ruby bindings for now. Well, if jhalfs moves to python, we may need python bindings... But I suspect that when the move is done, this issue will have been ironed out for a long time ;)

comment:6 by Bruce Dubbs, 2 years ago

Milestone: 8.59.0

Milestone renamed

comment:7 by Bruce Dubbs, 2 years ago

To build any swig bindings, we have to add --with-swig to configure.

The perl bindings built OK for me.
The ruby bindings build with:

sed -i '/define SWIG_CAST_NEW_MEMORY/a#define SWIG_POINTER_NO_NULL       0x4' \

That can be shortened to

sed -i '/define.*MEMORY/a#define SWIG_POINTER_NO_NULL 0x4' \

The python bindings build with:

sed -i 's/classic/nofastunpack/' build.conf

Note: I do not know how to test any of the above.

There is a bug filed for subversion:

Filed on May 31st, but no action.

comment:8 by Bruce Dubbs, 2 years ago

Owner: changed from blfs-book to Douglas R. Reno

comment:9 by Douglas R. Reno, 2 years ago

Status: newassigned

comment:10 by Douglas R. Reno, 2 years ago

It seems that the python test suite is still broken (make check-swig-py). If all of the others (including Ruby) pass, I'll commit it this afternoon and remove the documentation for the python test suite. I should probably test Mercurial as well though since it's one of the primary consumers of the python bindings.

It has issues importing "_core" in subversion/bindings/swig/python/libsvn/ - and it seems that is automatically regenerated because I've tried editing it and after running the test suite again, it gets put back.

There's still been very little activity upstream (less than 20 commits) since the last release, and almost all of them have to do with Windows.

comment:11 by Bruce Dubbs, 2 years ago

Please document that the python test suite is broken.

You comment about activity is unclear. Is that about swig or subversion?

comment:12 by Douglas R. Reno, 2 years ago

That's about subversion:

It looks like there will be a release on the 24th, but no fix for SWIG:

comment:13 by Douglas R. Reno, 2 years ago

Resolution: fixed
Status: assignedclosed

Fixed at r21844

Note: See TracTickets for help on using tickets.