Hello, I am seeing the following error when building devel/py-subversion-1.14.5 on FreeBSD 15.0 - the build error follows. A link to the full log is at the end of this comment. Is this a packaging issue or should I send it upstream? if [ "LD_LIBRARY_PATH" = "DYLD_LIBRARY_PATH" ]; then for d in /wrkdirs/usr/ports/devel/py-subversion/work-py314/subversion-1.14.5/subversion/bindings/swig/python/libsvn_swig_py /wrkdirs/usr/ports/devel/py-subversion/work-py314/subversion-1.14.5/subversion/bindings/swig/python/../../../libsvn_*; do if [ -n "$DYLD_LIBRARY_PATH" ]; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$d/.libs"; else LD_LIBRARY_PATH="$d/.libs"; fi; done; export LD_LIBRARY_PATH; fi; cd /wrkdirs/usr/ports/devel/py-subversion/work-py314/subversion-1.14.5/subversion/bindings/swig/python; /usr/local/bin/python3.14 /wrkdirs/usr/ports/devel/py-subversion/work-py314/subversion-1.14.5/subversion/bindings/swig/python/tests/run_all.py ..................F.........................s........................................................................F........................................... ====================================================================== FAIL: test_mergeinfo_leakage__incorrect_range_t_refcounts (mergeinfo.SubversionMergeinfoTestCase.test_mergeinfo_leakage__incorrect_range_t_refcounts) Ensure that the ref counts on svn_merge_range_t objects returned by ---------------------------------------------------------------------- Traceback (most recent call last): File "/wrkdirs/usr/ports/devel/py-subversion/work-py314/subversion-1.14.5/subversion/bindings/swig/python/tests/mergeinfo.py", line 147, in test_mergeinfo_leakage__incorrect_range_t_refcounts self.assertEqual(refcount, expected, ( ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ "Memory leak! Expected a ref count of %d for svn_merge_range_t " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "object, but got %d instead (path: %s, index: %d). Probable " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "cause: incorrect Py_INCREF/Py_DECREF usage in libsvn_swig_py/" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "swigutil_py.c." % (expected, refcount, path, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 3 != 4 : Memory leak! Expected a ref count of 4 for svn_merge_range_t object, but got 3 instead (path: b'/trunk', index: 0). Probable cause: incorrect Py_INCREF/Py_DECREF usage in libsvn_swig_py/swigutil_py.c. ====================================================================== FAIL: test_replay_batons_refcounts (repository.SubversionRepositoryTestCase.test_replay_batons_refcounts) Issue SVN-4917: check ref-count of batons created and used in callbacks ---------------------------------------------------------------------- Traceback (most recent call last): File "/wrkdirs/usr/ports/devel/py-subversion/work-py314/subversion-1.14.5/subversion/bindings/swig/python/tests/repository.py", line 438, in test_replay_batons_refcounts self.assertEqual(sys.getrefcount(e_ptr), 2, ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ "leak on editor baton after replay without errors") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 1 != 2 : leak on editor baton after replay without errors ---------------------------------------------------------------------- Ran 161 tests in 2.398s FAILED (failures=2, skipped=1) *** Error code 1 Stop. make: stopped making "swig-py check-swig-py" in /wrkdirs/usr/ports/devel/py-subversion/work-py314/subversion-1.14.5 *** Error code 1 Stop. make: stopped making "build" in /usr/ports/devel/py-subversion 1 - full log: https://services.unixathome.org/poudriere/data/150amd64-default-python314/2026-04-01_12h19m04s/logs/errors/py314-subversion-1.14.5.log
Maintainer informed via mail
I have contacted upstream: https://lists.apache.org/list.html?dev@subversion.apache.org
(In reply to Dan Langille from comment #2) That's not a useful URL. This might be: https://lists.apache.org/thread/qqjz51141vtmy73pzp4hcfrpnybt916n
(In reply to Dan Langille from comment #3) From upstream: Hi Dan, Thanks for your report. If I'm reading this correctly, this is a problem reported to us in July 2025, see [1]. There is a patch in the thread, tested on FreeBSD. It was committed to our trunk in r1926575 and r1927715. It was also backported to the 1.14.x branch in r1929147 however we have not made a new release of 1.14 since that time, however you could probably bring these patches to the FreeBSD port. These changes will also be included in the upcoming 1.15.0 release, you can get RC tarballs from [2]. Can you check if this solves your problem? Kind regards, Daniel Sahlberg [1] https://lists.apache.org/thread/tfo366jztyvj4vsnj4pl0lwcdhtvr116 [2] https://dist.apache.org/repos/dist/dev/subversion
Additional note: This is an issue on the test suite of swig python bindings, caused by change of the implementation of reference count in CPython 3.14, and not on the issue on swig python bindings itself.
If you need to get it building as a work around for now, you can simply exclude the check-swig-py from the build. patch your Makefile with this: @@ -28,7 +29,7 @@ --without-kwallet \ --with-apxs=no -ALL_TARGET= swig-py check-swig-py +ALL_TARGET= swig-py INSTALL_TARGET= install-swig-py .include <bsd.port.post.mk>
(In reply to Dean E. Weimer from comment #6) ...and then, if "TEST_TARGET= check-swig-py" is added instead, then we can check it separately. Or apply the changes on r1929147 in Subversion's 1.4.x branch (except STATUS file in branch root) into Subversion 1.4.5 tarball. Patch can be extracted using svn, e.g. $ svn diff -c r1929147 --patch-compatible https://svn.apache.org/repos/asf/subversion/branches/1.14.x | tail -n +17 > subversion-1.14.5-check-swig-py-py314-patch.txt
Created attachment 272493 [details] patch to fix testing with Python >= 3.14 and split test terget in devel/py-subversion This is an example patch to split test target in devel/py-subversion, and fix test with Python >= 3.14. To fix both for LTS and latest version of Subversion, a patch file is added both in devel/subversion and devel/subversion-lts.
Looking into this one now during Hackathon.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b8e6b2a99628582839f56de7301796fba0aa0326 commit b8e6b2a99628582839f56de7301796fba0aa0326 Author: FUTATSUKI Yasuhito <futatuki@yf.bsdclub.org> AuthorDate: 2026-07-04 17:26:23 +0000 Commit: Michael Osipov <michaelo@FreeBSD.org> CommitDate: 2026-09-06 14:07:05 +0000 devel/py-subversion: split test target, with fix tests in python >= 3.14 To fix both of latest and LTS, add a patch to fix the tests both in devel/subversion and devel/subversion-lts. PR: 294183 MFH: 2026Q3 devel/py-subversion/Makefile | 8 +- .../files/extra-patch-check-swig-py314 (new) | 231 +++++++++++++++++++++ .../files/extra-patch-check-swig-py314 (new) | 231 +++++++++++++++++++++ 3 files changed, 467 insertions(+), 3 deletions(-)
A commit in branch 2026Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f75ea77c8f500ffffdacb7977294a4f1c1e2adcd commit f75ea77c8f500ffffdacb7977294a4f1c1e2adcd Author: FUTATSUKI Yasuhito <futatuki@yf.bsdclub.org> AuthorDate: 2026-07-04 17:26:23 +0000 Commit: Michael Osipov <michaelo@FreeBSD.org> CommitDate: 2026-09-06 14:20:29 +0000 devel/py-subversion: split test target, with fix tests in python >= 3.14 To fix both of latest and LTS, add a patch to fix the tests both in devel/subversion and devel/subversion-lts. PR: 294183 MFH: 2026Q3 (cherry picked from commit b8e6b2a99628582839f56de7301796fba0aa0326) devel/py-subversion/Makefile | 8 +- .../files/extra-patch-check-swig-py314 (new) | 231 +++++++++++++++++++++ .../files/extra-patch-check-swig-py314 (new) | 231 +++++++++++++++++++++ 3 files changed, 467 insertions(+), 3 deletions(-)
Confirmed to work, thank you for your patch.