emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Versioned Tree-sitter parser libraries


From: Eli Zaretskii
Subject: Re: Versioned Tree-sitter parser libraries
Date: Sun, 16 Apr 2023 17:49:41 +0300

> Date: Sun, 16 Apr 2023 15:20:51 +0100 (BST)
> From: Peter Oliver <p.d.oliver@mavit.org.uk>
> 
> A number of Tree-sitter parsers include a Makefile that will install, e.g., 
> /usr/lib/libtree-sitter-json.so.0.0.  However, I notice that Emacs 29.0.90 
> will find it only if there exists a symlink /usr/lib/libtree-sitter-json.so.
> 
> Is this desirable?

If we were to load a versioned shared library, how would Emacs know
which version to load?

> The background to this question is that I’m thinking about packaging 
> Tree-sitter parsers as RPMs for Fedora 
> (https://pagure.io/tree-sitter-json/blob/rawhide/f/tree-sitter-json.spec).  
> Typical Fedora practice 
> (https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages) 
> is to assume that the unversioned symlink isn’t required for regular use, and 
> to place it in a …-devel subpackage that wouldn’t usually be installed.

That practice is fine for when a program is linked against the
library, because the -lFOO linker switch is supposed to take care of
that, and Emacs doesn't need to know which version is being used.  But
here we load the shared libraries at run time, so we must know their
names.  These names are explicitly mentioned in the Emacs sources.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]