GNU bug report logs - #74429
[PATCH] [nt/INSTALL.W64] configure error about missing tree-sitter

Previous Next

Package: emacs;

Reported by: Nerd <hiweedmandriva3 <at> 163.com>

Date: Tue, 19 Nov 2024 05:28:02 UTC

Severity: normal

Tags: patch

Merged with 74431

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74429 in the body.
You can then email your comments to 74429 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#74429; Package emacs. (Tue, 19 Nov 2024 05:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nerd <hiweedmandriva3 <at> 163.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 19 Nov 2024 05:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nerd <hiweedmandriva3 <at> 163.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Nerd <hiweedmandriva3 <at> 163.com>
Subject: [PATCH] [nt/INSTALL.W64] configure error about missing tree-sitter
Date: Mon, 18 Nov 2024 23:03:12 +0800
configure: error: The following required libraries were not found:
     tree-sitter
    Maybe some development libraries/packages are missing?
    To build anyway, give:
         --with-tree-sitter=ifavailable
        as options to configure.

https://packages.msys2.org/base/mingw-w64-tree-sitter
it seems that tree-sitter on msys2/mingw-w64 has two libraries
mingw-w64-x86_64-libtree-sitter and mingw-w64-x86_64-tree-sitter
---
 nt/INSTALL.W64 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
index 9694e85f269d..87eecff779a0 100644
--- a/nt/INSTALL.W64
+++ b/nt/INSTALL.W64
@@ -60,6 +60,7 @@ packages (you can copy and paste it into the shell with Shift + Insert):
   mingw-w64-x86_64-harfbuzz \
   mingw-w64-x86_64-libgccjit \
   mingw-w64-x86_64-sqlite3 \
+  mingw-w64-x86_64-libtree-sitter \
   mingw-w64-x86_64-tree-sitter
 
 The packages include the base developer tools (autoconf, grep, make,
-- 
2.47.0





Merged 74429 74431. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 19 Nov 2024 15:46:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74429; Package emacs. (Thu, 21 Nov 2024 11:06:02 GMT) Full text and rfc822 format available.

Message #10 received at 74429 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nerd <hiweedmandriva3 <at> 163.com>
Cc: 74429 <at> debbugs.gnu.org
Subject: Re: bug#74429: [PATCH] [nt/INSTALL.W64] configure error about missing
 tree-sitter
Date: Thu, 21 Nov 2024 13:04:57 +0200
> Cc: Nerd <hiweedmandriva3 <at> 163.com>
> From: Nerd <hiweedmandriva3 <at> 163.com>
> Date: Mon, 18 Nov 2024 23:03:12 +0800
> 
> configure: error: The following required libraries were not found:
>      tree-sitter
>     Maybe some development libraries/packages are missing?
>     To build anyway, give:
>          --with-tree-sitter=ifavailable
>         as options to configure.
> 
> https://packages.msys2.org/base/mingw-w64-tree-sitter
> it seems that tree-sitter on msys2/mingw-w64 has two libraries
> mingw-w64-x86_64-libtree-sitter and mingw-w64-x86_64-tree-sitter
> ---
>  nt/INSTALL.W64 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
> index 9694e85f269d..87eecff779a0 100644
> --- a/nt/INSTALL.W64
> +++ b/nt/INSTALL.W64
> @@ -60,6 +60,7 @@ packages (you can copy and paste it into the shell with Shift + Insert):
>    mingw-w64-x86_64-harfbuzz \
>    mingw-w64-x86_64-libgccjit \
>    mingw-w64-x86_64-sqlite3 \
> +  mingw-w64-x86_64-libtree-sitter \
>    mingw-w64-x86_64-tree-sitter

Thanks.  However, AFAICS the mingw-w64-x86_64-libtree-sitter package
provided by MSYS2 includes the library under the name
libtree-sitter-0.24.dll, whereas Emacs only knows to look for
libtree-sitter-0.dll.  Does installing this package provide
tree-sitter support for you?  Or did you need to rename the DLL to the
name Emacs looks for?  If users need to rename the DLL, we should tell
that in INSTALL and perhaps also README files.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74429; Package emacs. (Sat, 23 Nov 2024 12:22:02 GMT) Full text and rfc822 format available.

Message #13 received at 74429 <at> debbugs.gnu.org (full text, mbox):

From: "Hiweed Mandriva3" <hiweedmandriva3 <at> 163.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 74429 <at> debbugs.gnu.org, "hiweedmandriva3 <at> 163.com" <hiweedmandriva3 <at> 163.com>
Subject: Re:Re: bug#74429: [PATCH] [nt/INSTALL.W64] configure error about
 missing tree-sitter
Date: Sat, 23 Nov 2024 20:21:03 +0800 (CST)
[Message part 1 (text/plain, inline)]


















At 2024-11-21 19:04:57, "Eli Zaretskii" <eliz <at> gnu.org> wrote:
>> Cc: Nerd <hiweedmandriva3 <at> 163.com>
>> From: Nerd <hiweedmandriva3 <at> 163.com>
>> Date: Mon, 18 Nov 2024 23:03:12 +0800
>> 
>> configure: error: The following required libraries were not found:
>>      tree-sitter
>>     Maybe some development libraries/packages are missing?
>>     To build anyway, give:
>>          --with-tree-sitter=ifavailable
>>         as options to configure.
>> 
>> https://packages.msys2.org/base/mingw-w64-tree-sitter
>> it seems that tree-sitter on msys2/mingw-w64 has two libraries
>> mingw-w64-x86_64-libtree-sitter and mingw-w64-x86_64-tree-sitter
>> ---
>>  nt/INSTALL.W64 | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
>> index 9694e85f269d..87eecff779a0 100644
>> --- a/nt/INSTALL.W64
>> +++ b/nt/INSTALL.W64
>> @@ -60,6 +60,7 @@ packages (you can copy and paste it into the shell with Shift + Insert):
>>    mingw-w64-x86_64-harfbuzz \
>>    mingw-w64-x86_64-libgccjit \
>>    mingw-w64-x86_64-sqlite3 \
>> +  mingw-w64-x86_64-libtree-sitter \
>>    mingw-w64-x86_64-tree-sitter
>
>Thanks.  However, AFAICS the mingw-w64-x86_64-libtree-sitter package
>provided by MSYS2 includes the library under the name
>libtree-sitter-0.24.dll, whereas Emacs only knows to look for
>libtree-sitter-0.dll.  Does installing this package provide
>tree-sitter support for you?  Or did you need to rename the DLL to the
>name Emacs looks for?  If users need to rename the DLL, we should tell

>that in INSTALL and perhaps also README files.


By installing mingw-w64-x86_64-libtree-sitter, it fixed the configure issue.
I did not check whether tree-sitter works well after building emacs.exe successfully at that time.
I did not rename libtree-sitter-0.24.dll.


Just now, I confirm that tree-sitter major mode is not enabled when opening a C source file.
`ldd emacs.exe` does not contain dynamic link library libtree-sitter-0.24.dll.
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 23 Nov 2024 13:12:02 GMT) Full text and rfc822 format available.

Notification sent to Nerd <hiweedmandriva3 <at> 163.com>:
bug acknowledged by developer. (Sat, 23 Nov 2024 13:12:02 GMT) Full text and rfc822 format available.

Message #18 received at 74429-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: hiweedmandriva3 <at> 163.com
Cc: 74429-done <at> debbugs.gnu.org
Subject: Re: bug#74429: [PATCH] [nt/INSTALL.W64] configure error about missing
 tree-sitter
Date: Sat, 23 Nov 2024 15:09:07 +0200
> Cc: 74429 <at> debbugs.gnu.org
> Date: Thu, 21 Nov 2024 13:04:57 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Cc: Nerd <hiweedmandriva3 <at> 163.com>
> > From: Nerd <hiweedmandriva3 <at> 163.com>
> > Date: Mon, 18 Nov 2024 23:03:12 +0800
> > 
> > configure: error: The following required libraries were not found:
> >      tree-sitter
> >     Maybe some development libraries/packages are missing?
> >     To build anyway, give:
> >          --with-tree-sitter=ifavailable
> >         as options to configure.
> > 
> > https://packages.msys2.org/base/mingw-w64-tree-sitter
> > it seems that tree-sitter on msys2/mingw-w64 has two libraries
> > mingw-w64-x86_64-libtree-sitter and mingw-w64-x86_64-tree-sitter
> > ---
> >  nt/INSTALL.W64 | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
> > index 9694e85f269d..87eecff779a0 100644
> > --- a/nt/INSTALL.W64
> > +++ b/nt/INSTALL.W64
> > @@ -60,6 +60,7 @@ packages (you can copy and paste it into the shell with Shift + Insert):
> >    mingw-w64-x86_64-harfbuzz \
> >    mingw-w64-x86_64-libgccjit \
> >    mingw-w64-x86_64-sqlite3 \
> > +  mingw-w64-x86_64-libtree-sitter \
> >    mingw-w64-x86_64-tree-sitter
> 
> Thanks.  However, AFAICS the mingw-w64-x86_64-libtree-sitter package
> provided by MSYS2 includes the library under the name
> libtree-sitter-0.24.dll, whereas Emacs only knows to look for
> libtree-sitter-0.dll.  Does installing this package provide
> tree-sitter support for you?  Or did you need to rename the DLL to the
> name Emacs looks for?  If users need to rename the DLL, we should tell
> that in INSTALL and perhaps also README files.

I've now updated INSTALL.W64 and README.W32 on the emacs-30 branch
with this information, and also modified Emacs 30 to know about the
new naming scheme of libtree-sitter DLL as distributed by MSYS2 folks.

With that, I'm closing this bug.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 23 Nov 2024 13:12:02 GMT) Full text and rfc822 format available.

Notification sent to Hiweed Mandriva3 <hiweedmandriva3 <at> 163.com>:
bug acknowledged by developer. (Sat, 23 Nov 2024 13:12:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74429; Package emacs. (Sat, 23 Nov 2024 13:39:02 GMT) Full text and rfc822 format available.

Message #26 received at 74429 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Hiweed Mandriva3" <hiweedmandriva3 <at> 163.com>
Cc: 74429 <at> debbugs.gnu.org, hiweedmandriva3 <at> 163.com
Subject: Re: bug#74429: [PATCH] [nt/INSTALL.W64] configure error about
 missing tree-sitter
Date: Sat, 23 Nov 2024 15:38:06 +0200
> Date: Sat, 23 Nov 2024 20:21:03 +0800 (CST)
> From: "Hiweed Mandriva3" <hiweedmandriva3 <at> 163.com>
> Cc: 74429 <at> debbugs.gnu.org, "hiweedmandriva3 <at> 163.com" <hiweedmandriva3 <at> 163.com>
> 
> At 2024-11-21 19:04:57, "Eli Zaretskii" <eliz <at> gnu.org> wrote:
> >> Cc: Nerd <hiweedmandriva3 <at> 163.com>
> >> From: Nerd <hiweedmandriva3 <at> 163.com>
> >> Date: Mon, 18 Nov 2024 23:03:12 +0800
> >> 
> >> configure: error: The following required libraries were not found:
> >>      tree-sitter
> >>     Maybe some development libraries/packages are missing?
> >>     To build anyway, give:
> >>          --with-tree-sitter=ifavailable
> >>         as options to configure.
> >> 
> >> https://packages.msys2.org/base/mingw-w64-tree-sitter
> >> it seems that tree-sitter on msys2/mingw-w64 has two libraries
> >> mingw-w64-x86_64-libtree-sitter and mingw-w64-x86_64-tree-sitter
> >> ---
> >>  nt/INSTALL.W64 | 1 +
> >>  1 file changed, 1 insertion(+)
> >> 
> >> diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
> >> index 9694e85f269d..87eecff779a0 100644
> >> --- a/nt/INSTALL.W64
> >> +++ b/nt/INSTALL.W64
> >> @@ -60,6 +60,7 @@ packages (you can copy and paste it into the shell with Shift + Insert):
> >>    mingw-w64-x86_64-harfbuzz \
> >>    mingw-w64-x86_64-libgccjit \
> >>    mingw-w64-x86_64-sqlite3 \
> >> +  mingw-w64-x86_64-libtree-sitter \
> >>    mingw-w64-x86_64-tree-sitter
> >
> >Thanks.  However, AFAICS the mingw-w64-x86_64-libtree-sitter package
> >provided by MSYS2 includes the library under the name
> >libtree-sitter-0.24.dll, whereas Emacs only knows to look for
> >libtree-sitter-0.dll.  Does installing this package provide
> >tree-sitter support for you?  Or did you need to rename the DLL to the
> >name Emacs looks for?  If users need to rename the DLL, we should tell
> >that in INSTALL and perhaps also README files.
> 
> By installing mingw-w64-x86_64-libtree-sitter, it fixed the configure issue.
> I did not check whether tree-sitter works well after building emacs.exe successfully at that time.
> I did not rename libtree-sitter-0.24.dll.
> 
> Just now, I confirm that tree-sitter major mode is not enabled when opening a C source file.

If you rename the DLL to the name libtree-sitter-0.dll, tree-sitter
major modes should be enabled.

Alternatively, if you can build the latest emacs-30 branch of the
Emacs Git repository, it should know about libtree-sitter-0.24.dll.

> `ldd emacs.exe` does not contain dynamic link library libtree-sitter-0.24.dll.

That's normal, since Emacs loads the DLL dynamically.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74429; Package emacs. (Sat, 23 Nov 2024 15:01:02 GMT) Full text and rfc822 format available.

Message #29 received at 74429 <at> debbugs.gnu.org (full text, mbox):

From: "Hiweed Mandriva3" <hiweedmandriva3 <at> 163.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 74429 <at> debbugs.gnu.org
Subject: [PATCH] [nt/INSTALL.W64] configure error about missing tree-sitter
Date: Sat, 23 Nov 2024 23:00:16 +0800 (CST)
[Message part 1 (text/plain, inline)]


















At 2024-11-23 21:38:06, "Eli Zaretskii" <eliz <at> gnu.org> wrote:
>> Date: Sat, 23 Nov 2024 20:21:03 +0800 (CST)
>> From: "Hiweed Mandriva3" <hiweedmandriva3 <at> 163.com>
>> Cc: 74429 <at> debbugs.gnu.org, "hiweedmandriva3 <at> 163.com" <hiweedmandriva3 <at> 163.com>
>> 
>> At 2024-11-21 19:04:57, "Eli Zaretskii" <eliz <at> gnu.org> wrote:
>> >> Cc: Nerd <hiweedmandriva3 <at> 163.com>
>> >> From: Nerd <hiweedmandriva3 <at> 163.com>
>> >> Date: Mon, 18 Nov 2024 23:03:12 +0800
>> >> 
>> >> configure: error: The following required libraries were not found:
>> >>      tree-sitter
>> >>     Maybe some development libraries/packages are missing?
>> >>     To build anyway, give:
>> >>          --with-tree-sitter=ifavailable
>> >>         as options to configure.
>> >> 
>> >> https://packages.msys2.org/base/mingw-w64-tree-sitter
>> >> it seems that tree-sitter on msys2/mingw-w64 has two libraries
>> >> mingw-w64-x86_64-libtree-sitter and mingw-w64-x86_64-tree-sitter
>> >> ---
>> >>  nt/INSTALL.W64 | 1 +
>> >>  1 file changed, 1 insertion(+)
>> >> 
>> >> diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
>> >> index 9694e85f269d..87eecff779a0 100644
>> >> --- a/nt/INSTALL.W64
>> >> +++ b/nt/INSTALL.W64
>> >> @@ -60,6 +60,7 @@ packages (you can copy and paste it into the shell with Shift + Insert):
>> >>    mingw-w64-x86_64-harfbuzz \
>> >>    mingw-w64-x86_64-libgccjit \
>> >>    mingw-w64-x86_64-sqlite3 \
>> >> +  mingw-w64-x86_64-libtree-sitter \
>> >>    mingw-w64-x86_64-tree-sitter
>> >
>> >Thanks.  However, AFAICS the mingw-w64-x86_64-libtree-sitter package
>> >provided by MSYS2 includes the library under the name
>> >libtree-sitter-0.24.dll, whereas Emacs only knows to look for
>> >libtree-sitter-0.dll.  Does installing this package provide
>> >tree-sitter support for you?  Or did you need to rename the DLL to the
>> >name Emacs looks for?  If users need to rename the DLL, we should tell
>> >that in INSTALL and perhaps also README files.
>> 
>> By installing mingw-w64-x86_64-libtree-sitter, it fixed the configure issue.
>> I did not check whether tree-sitter works well after building emacs.exe successfully at that time.
>> I did not rename libtree-sitter-0.24.dll.
>> 
>> Just now, I confirm that tree-sitter major mode is not enabled when opening a C source file.
>
>If you rename the DLL to the name libtree-sitter-0.dll, tree-sitter

>major modes should be enabled.


after rename, open a C source file and check `c-h m` the major mode is still `c-mode` not `c-ts-mode`.


>
>Alternatively, if you can build the latest emacs-30 branch of the
>Emacs Git repository, it should know about libtree-sitter-0.24.dll.
>
>> `ldd emacs.exe` does not contain dynamic link library libtree-sitter-0.24.dll.
>

>That's normal, since Emacs loads the DLL dynamically.


Build the latest commit https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-30&id=e14007ad631120a3f7521e503c8de86aca849bad
of branch eamcs-30 and with library name libtree-sitter-0.24.dll
open a C source file and check major mode is still `c-mode`


How do I check whether tree-sitter works well exactly? Thanks.

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74429; Package emacs. (Sat, 23 Nov 2024 15:40:02 GMT) Full text and rfc822 format available.

Message #32 received at 74429 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Hiweed Mandriva3" <hiweedmandriva3 <at> 163.com>
Cc: 74429 <at> debbugs.gnu.org
Subject: Re: [PATCH] [nt/INSTALL.W64] configure error about missing tree-sitter
Date: Sat, 23 Nov 2024 17:39:39 +0200
> Date: Sat, 23 Nov 2024 23:00:16 +0800 (CST)
> From: "Hiweed Mandriva3" <hiweedmandriva3 <at> 163.com>
> Cc: 74429 <at> debbugs.gnu.org
> 
> >> Just now, I confirm that tree-sitter major mode is not enabled when opening a C source file.
> >
> >If you rename the DLL to the name libtree-sitter-0.dll, tree-sitter
> >major modes should be enabled.
> 
> after rename, open a C source file and check `c-h m` the major mode is still `c-mode` not `c-ts-mode`.

Just renaming is not enough, you need also to load c-ts-mode.

> Build the latest commit https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-30&id=e14007ad631120a3f7521e503c8de86aca849bad
> of branch eamcs-30 and with library name libtree-sitter-0.24.dll
> open a C source file and check major mode is still `c-mode`
> 
> How do I check whether tree-sitter works well exactly? Thanks.

See above.  Recipe:

  emacs -Q
  M-x load-library RET c-ts-mode RET
  C-x C-f some-file.c RET
  M-: major-mode RET

The above should yield c-ts-mode.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74429; Package emacs. (Sat, 23 Nov 2024 16:47:01 GMT) Full text and rfc822 format available.

Message #35 received at 74429 <at> debbugs.gnu.org (full text, mbox):

From: "Hiweed Mandriva3" <hiweedmandriva3 <at> 163.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 74429 <at> debbugs.gnu.org, "hiweedmandriva3 <at> 163.com" <hiweedmandriva3 <at> 163.com>
Subject: [PATCH] [nt/INSTALL.W64] configure error about missing tree-sitter
Date: Sun, 24 Nov 2024 00:46:12 +0800 (CST)
[Message part 1 (text/plain, inline)]


















At 2024-11-23 23:39:39, "Eli Zaretskii" <eliz <at> gnu.org> wrote:
>> Date: Sat, 23 Nov 2024 23:00:16 +0800 (CST)
>> From: "Hiweed Mandriva3" <hiweedmandriva3 <at> 163.com>
>> Cc: 74429 <at> debbugs.gnu.org
>> 
>> >> Just now, I confirm that tree-sitter major mode is not enabled when opening a C source file.
>> >
>> >If you rename the DLL to the name libtree-sitter-0.dll, tree-sitter
>> >major modes should be enabled.
>> 
>> after rename, open a C source file and check `c-h m` the major mode is still `c-mode` not `c-ts-mode`.
>
>Just renaming is not enough, you need also to load c-ts-mode.
>
>> Build the latest commit https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-30&id=e14007ad631120a3f7521e503c8de86aca849bad
>> of branch eamcs-30 and with library name libtree-sitter-0.24.dll
>> open a C source file and check major mode is still `c-mode`
>> 
>> How do I check whether tree-sitter works well exactly? Thanks.
>
>See above.  Recipe:
>
>  emacs -Q
>  M-x load-library RET c-ts-mode RET
>  C-x C-f some-file.c RET
>  M-: major-mode RET
>

>The above should yield c-ts-mode.


Thanks for the steps!
By following them, tree-sitter major mode c-ts-mode works well for emacs-30 branch.
I will try master branch after the building issue is resolved.
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 22 Dec 2024 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.