Opened 5 years ago
Closed 5 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: | |
Cc: |
Description
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 build-outputs.mk sed -i '1s|/usr/bin/env python$|/usr/bin/env python2|' */*/*.py */*/*/*.py */*/*/*/*.py
Change History (13)
comment:1 by , 5 years ago
Type: | enhancement → defect |
---|
comment:2 by , 5 years ago
/usr/bin/python /sources/subversion-1.12.0/subversion-1.12.0/subversion/bindings/swig/python/tests/run_all.py Traceback (most recent call last): File "/sources/subversion-1.12.0/subversion-1.12.0/subversion/bindings/swig/python/tests/run_all.py", 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/mergeinfo.py", 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/core.py", line 26, in <module> from libsvn.core import * File "/sources/subversion-1.12.0/subversion-1.12.0/subversion/bindings/swig/python/libsvn/core.py", 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 , 5 years ago
For our purposes. I don't think we need swig bindings for subversion. Let's just use
--with_swig=no
comment:5 by , 5 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:7 by , 5 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' \ subversion/bindings/swig/proxy/swigrun.swg
That can be shortened to
sed -i '/define.*MEMORY/a#define SWIG_POINTER_NO_NULL 0x4' \ subversion/bindings/swig/proxy/swigrun.swg
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:
https://issues.apache.org/jira/browse/SVN-4818
Filed on May 31st, but no action.
comment:8 by , 5 years ago
Owner: | changed from | to
---|
comment:9 by , 5 years ago
Status: | new → assigned |
---|
comment:10 by , 5 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/core.py - 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 , 5 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 , 5 years ago
That's about subversion:
https://github.com/apache/subversion/commits/trunk
It looks like there will be a release on the 24th, but no fix for SWIG:
https://github.com/apache/subversion/commit/8b9d30e9885ee2b30024b5ddb33cd40edae9acc6
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).