CC jca@, maintainer of emacs,
On Tue, Mar 31, 2026 at 12:15:50PM +0100, Edd Barrett wrote:
> Did you check that emacs (the ony other consumer of this afaics) builds?
Yeah, this breaks emacs:
```
>>> referenced by treesit.c:749
>>> treesit.o:(treesit_load_language)
>>> referenced by treesit.c:820
>>> treesit.o:(Ftreesit_language_abi_version)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
```
There's no new emacs release that fixes it, but below is a patch that makes it
build.
(I've only build tested emacs and checked it at least starts. I know nothing
about emacs!)
OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/editors/emacs/Makefile,v
diff -u -p -r1.127 Makefile
--- Makefile 1 Nov 2025 11:16:41 -0000 1.127
+++ Makefile 1 Apr 2026 15:48:46 -0000
@@ -2,7 +2,7 @@ COMMENT= GNU editor: extensible, custom
VERSION= 30.2
DISTNAME= emacs-${VERSION}
-REVISION= 0
+REVISION= 1
CATEGORIES= editors
Index: patches/patch-src_treesit_c
===================================================================
RCS file: patches/patch-src_treesit_c
diff -N patches/patch-src_treesit_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_treesit_c 1 Apr 2026 15:43:50 -0000
@@ -0,0 +1,96 @@
+Fix linkage with treesitter-0.26.
+
+https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-emacs/006-tree-sitter-0.26.patch
+
+Index: src/treesit.c
+--- src/treesit.c.orig
++++ src/treesit.c
+@@ -34,7 +34,11 @@ along with GNU Emacs. If not, see <https://www.gnu.or
+ # include "w32common.h"
+
+ /* In alphabetical order. */
++#if TREE_SITTER_LANGUAGE_VERSION >= 15
++#undef ts_language_abi_version
++#else
+ #undef ts_language_version
++
No comments:
Post a Comment