unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65123: 29.1; Build fails with "configure --without-all --with-tree-sitter"
@ 2023-08-07 10:44 Ulrich Mueller
  2023-08-07 12:42 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Mueller @ 2023-08-07 10:44 UTC (permalink / raw)
  To: 65123

Forwarding downstream bug: https://bugs.gentoo.org/911826

Linking of temacs fails with undefined references to symbols
dynlib_error, dynlib_open and dynlib_sym when using configure options
--without-all --with-tree-sitter. To reproduce:

emacs-29.1 $ ./configure --without-all --without-x --with-tree-sitter
[...]
emacs-29.1 $ make V=1
[...]
gcc -o temacs.tmp \
  -Demacs  -I. -I. -I../lib -I../lib                          -MMD -MF deps/.d -MP             -g3 -O2     \
    dispnew.o frame.o scroll.o xdisp.o menu.o  window.o charset.o coding.o category.o ccl.o character.o chartab.o bidi.o cm.o term.o terminal.o xfaces.o    emacs.o keyboard.o macros.o keymap.o sysdep.o bignum.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o casetab.o casefiddle.o indent.o search.o regex-emacs.o undo.o alloc.o pdumper.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o sort.o font.o print.o lread.o  syntax.o  bytecode.o comp.o  process.o gnutls.o callproc.o region-cache.o sound.o timefns.o atimer.o doprnt.o intervals.o textprop.o composite.o xml.o lcms.o   profiler.o decompress.o thread.o systhread.o sqlite.o  treesit.o itree.o          json.o     terminfo.o lastfile.o      ../lib/libgnu.a                              -ltinfo           -lanl 
   -lm    -ljansson  -lgmp    -ltree-sitter    
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: treesit.o: in function `treesit_load_language':
/local/home/ulm/emacs-29.1/src/treesit.c:617:(.text+0x4a6a): undefined reference to `dynlib_error'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /local/home/ulm/emacs-29.1/src/treesit.c:618:(.text+0x4a72): undefined reference to `dynlib_open'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /local/home/ulm/emacs-29.1/src/treesit.c:619:(.text+0x4a7a): undefined reference to `dynlib_error'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /local/home/ulm/emacs-29.1/src/treesit.c:634:(.text+0x4d41): undefined reference to `dynlib_error'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /local/home/ulm/emacs-29.1/src/treesit.c:644:(.text+0x4d68): undefined reference to `dynlib_sym'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /local/home/ulm/emacs-29.1/src/treesit.c:646:(.text+0x4d78): undefined reference to `dynlib_error'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:704: temacs] Error 1
make[2]: Leaving directory '/local/home/ulm/emacs-29.1/src'
make[1]: *** [Makefile:544: src] Error 2
make[1]: Leaving directory '/local/home/ulm/emacs-29.1'
make[1]: Entering directory '/local/home/ulm/emacs-29.1'
***
*** "make all" failed with exit status 2.
***
*** You could try to:
*** - run "make bootstrap", which might fix the problem
*** - run "make V=1", which displays the full commands invoked by make,
***   to further investigate the problem
***
make[1]: *** [Makefile:414: advice-on-failure] Error 2
make[1]: Leaving directory '/local/home/ulm/emacs-29.1'
make: *** [Makefile:370: all] Error 2
emacs-29.1 $ 


Looks like configure.ac should set NEED_DYNLIB=yes when tree-sitter
is requested. It already does so in one code path, but it doesn't for
tree-sitter >= 0.20.2.

$ pkg-config --modversion tree-sitter
0.20.9


(The above build failure will also occur with a simple "configure
--without-all", because it leaves both json and tree-sitter enabled.
Is this intentional? I'd have expected --without-all to turn these
features off.)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#65123: 29.1; Build fails with "configure --without-all --with-tree-sitter"
  2023-08-07 10:44 bug#65123: 29.1; Build fails with "configure --without-all --with-tree-sitter" Ulrich Mueller
@ 2023-08-07 12:42 ` Eli Zaretskii
  2023-08-07 13:02   ` Ulrich Mueller
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-08-07 12:42 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: 65123

> From: Ulrich Mueller <ulm@gentoo.org>
> Date: Mon, 07 Aug 2023 12:44:38 +0200
> 
> Forwarding downstream bug: https://bugs.gentoo.org/911826
> 
> Linking of temacs fails with undefined references to symbols
> dynlib_error, dynlib_open and dynlib_sym when using configure options
> --without-all --with-tree-sitter. To reproduce:

Thanks.  Does the patch below fix this?

diff --git a/configure.ac b/configure.ac
index 5dd182a..ab401be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3254,6 +3254,7 @@ AC_DEFUN
     [HAVE_TREE_SITTER=yes], [HAVE_TREE_SITTER=no])
   if test "${HAVE_TREE_SITTER}" = yes; then
     AC_DEFINE(HAVE_TREE_SITTER, 1, [Define if using tree-sitter.])
+    NEED_DYNLIB=yes
   else
     EMACS_CHECK_MODULES([TREE_SITTER], [tree-sitter >= 0.6.3],
       [HAVE_TREE_SITTER=yes], [HAVE_TREE_SITTER=no])





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#65123: 29.1; Build fails with "configure --without-all --with-tree-sitter"
  2023-08-07 12:42 ` Eli Zaretskii
@ 2023-08-07 13:02   ` Ulrich Mueller
  2023-08-07 13:21     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Mueller @ 2023-08-07 13:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 65123

>>>>> On Mon, 07 Aug 2023, Eli Zaretskii wrote:

>> From: Ulrich Mueller <ulm@gentoo.org>
>> Date: Mon, 07 Aug 2023 12:44:38 +0200
>> 
>> Forwarding downstream bug: https://bugs.gentoo.org/911826
>> 
>> Linking of temacs fails with undefined references to symbols
>> dynlib_error, dynlib_open and dynlib_sym when using configure options
>> --without-all --with-tree-sitter. To reproduce:

> Thanks.  Does the patch below fix this?

> diff --git a/configure.ac b/configure.ac
> index 5dd182a..ab401be 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -3254,6 +3254,7 @@ AC_DEFUN
>      [HAVE_TREE_SITTER=yes], [HAVE_TREE_SITTER=no])
>    if test "${HAVE_TREE_SITTER}" = yes; then
>      AC_DEFINE(HAVE_TREE_SITTER, 1, [Define if using tree-sitter.])
> +    NEED_DYNLIB=yes
>    else
>      EMACS_CHECK_MODULES([TREE_SITTER], [tree-sitter >= 0.6.3],
>        [HAVE_TREE_SITTER=yes], [HAVE_TREE_SITTER=no])

Thanks, this fixes the problem for me.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#65123: 29.1; Build fails with "configure --without-all --with-tree-sitter"
  2023-08-07 13:02   ` Ulrich Mueller
@ 2023-08-07 13:21     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-08-07 13:21 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: 65123-done

> From: Ulrich Mueller <ulm@gentoo.org>
> Cc: 65123@debbugs.gnu.org
> Date: Mon, 07 Aug 2023 15:02:43 +0200
> 
> >>>>> On Mon, 07 Aug 2023, Eli Zaretskii wrote:
> 
> > Thanks.  Does the patch below fix this?
> 
> > diff --git a/configure.ac b/configure.ac
> > index 5dd182a..ab401be 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -3254,6 +3254,7 @@ AC_DEFUN
> >      [HAVE_TREE_SITTER=yes], [HAVE_TREE_SITTER=no])
> >    if test "${HAVE_TREE_SITTER}" = yes; then
> >      AC_DEFINE(HAVE_TREE_SITTER, 1, [Define if using tree-sitter.])
> > +    NEED_DYNLIB=yes
> >    else
> >      EMACS_CHECK_MODULES([TREE_SITTER], [tree-sitter >= 0.6.3],
> >        [HAVE_TREE_SITTER=yes], [HAVE_TREE_SITTER=no])
> 
> Thanks, this fixes the problem for me.

Thanks, installed on the emacs-29 branch, and closing the bug.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-07 13:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07 10:44 bug#65123: 29.1; Build fails with "configure --without-all --with-tree-sitter" Ulrich Mueller
2023-08-07 12:42 ` Eli Zaretskii
2023-08-07 13:02   ` Ulrich Mueller
2023-08-07 13:21     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).