Skip to content

emacs/emacs-mac: Fix tree-sitter build issue#32095

Merged
amake merged 3 commits intomacports:masterfrom
shuxiao9058:fix-tree-sitter
Apr 7, 2026
Merged

emacs/emacs-mac: Fix tree-sitter build issue#32095
amake merged 3 commits intomacports:masterfrom
shuxiao9058:fix-tree-sitter

Conversation

@shuxiao9058
Copy link
Copy Markdown
Contributor

@shuxiao9058 shuxiao9058 commented Apr 7, 2026

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 26.4 25E246 arm64
Xcode 26.4 17E192

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL in commit message?
  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

build details:

# port -v rev-upgrade
--->  Scanning binaries for linking errors
Could not open /opt/local/lib/libtree-sitter.0.25.dylib: Error opening or reading file (referenced from /opt/local/bin/emacs-30.2)
--->  Found 1 broken file, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: emacs @30.2+nativecomp+treesitter

And recompiling emacs doesn’t work:

treesit.c:749:21: error: use of undeclared identifier 'ts_language_version'; did you mean 'ts_language_abi_version'?
  749 |                             make_fixnum (ts_language_version (lang)));
      |                                          ^~~~~~~~~~~~~~~~~~~
      |                                          ts_language_abi_version
/opt/local/include/tree_sitter/api.h:1268:10: note: 'ts_language_abi_version' declared here
 1268 | uint32_t ts_language_abi_version(const TSLanguage *self);
      |          ^
/usr/bin/clang -std=gnu23 -c -isystem/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk -Demacs  -I. -I. -I../lib -I../lib         -I/opt/local/include/libxml2 -I/opt/local/include/gcc15                -MMD -MF deps/lastfile.d -MP    -I/opt/local/include/p11-kit-1              -Wno-pointer-sign -Wno-string-plus-int -Wno-unknown-attributes -Wno-unknown-pragmas -Wno-initializer-overrides -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-deprecated-declarations -pipe -Os -Wno-attributes -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk -arch arm64  lastfile.c
treesit.c:820:27: error: use of undeclared identifier 'ts_language_version'; did you mean 'ts_language_abi_version'?
  820 |       uint32_t version =  ts_language_version (ts_language);
      |                           ^~~~~~~~~~~~~~~~~~~
      |                           ts_language_abi_version
/opt/local/include/tree_sitter/api.h:1268:10: note: 'ts_language_abi_version' declared here
 1268 | uint32_t ts_language_abi_version(const TSLanguage *self);
      |          ^
2 errors generated.
make[2]: *** [treesit.o] Error 1

@macportsbot
Copy link
Copy Markdown

Notifying maintainers:
@amake for port emacs-mac-app.
@drkp for port emacs.

@macportsbot macportsbot added type: bugfix maintainer: open Affects an openmaintainer port labels Apr 7, 2026
@amake
Copy link
Copy Markdown
Contributor

amake commented Apr 7, 2026

emacs{,-app}-devel has a fix for this issue since October 2025 (emacs-mirror/emacs@d587ce8) so we can just bump this. I've pushed some additional changes to this effect.

@amake amake merged commit 7cdf9f5 into macports:master Apr 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer: open Affects an openmaintainer port type: bugfix

Development

Successfully merging this pull request may close these issues.

4 participants