Index | Thread | Search

From:
Laurent Cheylus <foxy@free.fr>
Subject:
Re: [update] textproc/tree-sitter 0.26.7
To:
Edd Barrett <edd@theunixzoo.co.uk>
Cc:
ports <ports@openbsd.org>, jca@openbsd.org
Date:
Wed, 1 Apr 2026 18:19:02 +0200

Download raw body.

Thread
Hi Edd,

----- Mail original -----
> 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?

I confirm, I have the same patch (pulled from FreeBSD emacs port) to build emacs with tree-sitter 0.26.

Attached, a new diff for tree-sitter 0.26.8 (release yesterday).
Build OK for neovim 0.12.0 and emacs + your patch with it.

regards, Laurent



Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/tree-sitter/Makefile,v
diff -u -p -r1.18 Makefile
--- Makefile	23 Feb 2026 09:47:35 -0000	1.18
+++ Makefile	1 Apr 2026 10:16:33 -0000
@@ -5,12 +5,9 @@ COMMENT =	parser generator tool and incr
 
 GH_ACCOUNT =		tree-sitter
 GH_PROJECT =		tree-sitter
-# NOTE: neovim-0.11.* only builds with tree-sitter-0.25.x, so only update
-# tree-sitter at the same time as a neovim-0.12.x update (once released).
-# https://github.com/neovim/neovim/issues/36914
-GH_TAGNAME =		v0.25.10
+GH_TAGNAME =		v0.26.8
 
-SHARED_LIBS +=		tree-sitter	5.0 # 0.25.3
+SHARED_LIBS +=		tree-sitter	6.0 # 0.26.8
 
 CATEGORIES =		textproc
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/textproc/tree-sitter/distinfo,v
diff -u -p -r1.10 distinfo
--- distinfo	23 Feb 2026 09:47:35 -0000	1.10
+++ distinfo	1 Apr 2026 10:16:33 -0000
@@ -1,2 +1,2 @@
-SHA256 (tree-sitter-0.25.10.tar.gz) = rVBAU3U3ASsW724SEKVyuSfHzcK5nR7ojUSn3Nw/9Ew=
-SIZE (tree-sitter-0.25.10.tar.gz) = 864648
+SHA256 (tree-sitter-0.26.8.tar.gz) = 5oJrdTPsOohaulmDd6bSC1pjIf89t2lo6WDCNS06UHc=
+SIZE (tree-sitter-0.26.8.tar.gz) = 908286
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/textproc/tree-sitter/patches/patch-Makefile,v
diff -u -p -r1.5 patch-Makefile
--- patches/patch-Makefile	15 Apr 2025 18:45:51 -0000	1.5
+++ patches/patch-Makefile	1 Apr 2026 10:16:33 -0000
@@ -5,41 +5,41 @@ pkg-config file.
 Index: Makefile
 --- Makefile.orig
 +++ Makefile
-@@ -7,7 +7,7 @@ DESCRIPTION := An incremental parsing system for progr
+@@ -3,7 +3,7 @@ DESCRIPTION := An incremental parsing system for progr
  HOMEPAGE_URL := https://tree-sitter.github.io/tree-sitter/
-
+ 
  # install directory layout
 -PREFIX ?= /usr/local
 +PREFIX ?= ${LOCALBASE}
  INCLUDEDIR ?= $(PREFIX)/include
  LIBDIR ?= $(PREFIX)/lib
- PCLIBDIR ?= $(LIBDIR)/pkgconfig
-@@ -43,8 +43,8 @@ ifneq ($(findstring darwin,$(shell $(CC) -dumpmachine)
+ BINDIR ?= $(PREFIX)/bin
+@@ -45,8 +45,8 @@ else ifneq ($(findstring mingw32,$(MACHINE)),)
  else
  	SOEXT = so
  	SOEXTVER_MAJOR = $(SOEXT).$(SONAME_MAJOR)
 -	SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR)
 -	LINKSHARED += -shared -Wl,-soname,libtree-sitter.$(SOEXTVER)
-+	SOEXTVER = so.${LIBtree-sitter_VERSION}
++	SOEXTVER = $(SOEXT).${LIBtree-sitter_VERSION}
 +	LINKSHARED += -shared
- endif
  ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),)
  	PCLIBDIR := $(PREFIX)/libdata/pkgconfig
-@@ -67,7 +67,7 @@ tree-sitter.pc: lib/tree-sitter.pc.in
+ endif
+@@ -73,7 +73,7 @@ tree-sitter.pc: lib/tree-sitter.pc.in
  		-e 's|@CMAKE_INSTALL_INCLUDEDIR@|$(INCLUDEDIR:$(PREFIX)/%=%)|' \
  		-e 's|@PROJECT_DESCRIPTION@|$(DESCRIPTION)|' \
  		-e 's|@PROJECT_HOMEPAGE_URL@|$(HOMEPAGE_URL)|' \
 -		-e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|' $< > $@
 +		-e 's|@CMAKE_INSTALL_PREFIX@|$(LOCALBASE)|' $< > $@
-
- clean:
- 	$(RM) $(OBJ) tree-sitter.pc libtree-sitter.a libtree-sitter.$(SOEXT)
-@@ -78,8 +78,6 @@ install: all
- 	install -m644 tree-sitter.pc '$(DESTDIR)$(PCLIBDIR)'/tree-sitter.pc
- 	install -m644 libtree-sitter.a '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a
+ 
+ shared: libtree-sitter.$(SOEXT)
+ 
+@@ -93,8 +93,6 @@ ifneq ($(findstring mingw32,$(MACHINE)),)
+ 	install -m755 libtree-sitter.dll.a '$(DESTDIR)$(LIBDIR)'/libtree-sitter.dll.a
+ else
  	install -m755 libtree-sitter.$(SOEXT) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER)
--	ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER_MAJOR)
--	ln -sf libtree-sitter.$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXT)
-
+-	cd '$(DESTDIR)$(LIBDIR)' && ln -sf libtree-sitter.$(SOEXTVER) libtree-sitter.$(SOEXTVER_MAJOR)
+-	cd '$(DESTDIR)$(LIBDIR)' && ln -sf libtree-sitter.$(SOEXTVER_MAJOR) libtree-sitter.$(SOEXT)
+ endif
+ 
  uninstall:
- 	$(RM) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a \