Re: Texinfo 7.2.90 build with mingw.org's MinGW: testing and installation

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
> From: Gavin Smith <[email protected]>
> Date: Sat, 17 Jan 2026 21:08:53 +0000
> 
> On Sat, Jan 17, 2026 at 09:43:44PM +0100, [email protected] wrote:
> > > > > Which brings me to the installation.  I've just run "make install",
> > > > > and I see that various libtexinfo*.dll DLLs are installed in
> > > > > $prefix/lib/bin.
> > > > 
> > > > That is somewhat unexpected.  In tta/C/Makefile.am, there is
> > > > 
> > > > converterlibdir = $(libdir)/$(CONVERTER)
> > > > xsdir = $(converterlibdir)
> > > > 
> > > > and the libraries are in xs_LTLIBRARIES, and therefore should be
> > > > installed in $(libdir)/texi2any, since CONVERTER=texi2any.
> > > > 
> > > > xs_LTLIBRARIES += libtexinfo.la
> > > 
> > > I think the reason is libtool.  It "knows" that shared libraries on
> > > Windows need to be installed in the 'bin' subdirectory, not in the
> > > 'lib' subdirectory as on Posix systems.
> > > 
> > > So I guess this calls for some Makefile wizardry, to make sure
> > > libtexinfo*.dll libraries end up in lib/texi2any/ instead.
> > 
> > Ok.  I guess we have to bypass libtool on that.
> 
> Is this a new problem?

Yes.

> Were the libraries installed in the wrong place with Texinfo 7.2?

No, they were installed together with the XS DLLs.  But Texinfo 7.2
didn't use libtool for that, did it?

> I know libtool is used for installation, as sometimes it needs to relink
> a library file so it works in the new location.  But installing in a
> completely different location sounds like a bad idea.
> 
> The .la files can contain a "libdir" line which may affect where the
> files are installed.  For example:
> 
> # Directory that this library needs to be installed in:
> libdir='/usr/local/lib/texi2any'

I have $prefix/lib/texi2any/libtexinfo.la file which says:

  # Directory that this library needs to be installed in:
  libdir='d:/usr/lib/texi2any'

(my $prefix is "d:/usr").  This is okay for finding the *.dll.a import
libraries, as this entry says:

  # Names of this library.
  library_names='libtexinfo.dll.a'

but XSLoader needs to use the entry below, in addition to libdir, to
load the DLL itself:

  # The name that we can dlopen(3).
  dlname='../bin/libtexinfo-1.dll'

> Eli: can you check the contents of some of the .la files before they
> are installed, to confirm which location the libdir= lines refer to?

There are two: one in tta/C/, the other in tta/C/.libs.  They are
identical, and also identical to the installed file, with one
difference: the dlname entry says

  # The name that we can dlopen(3).
  dlname='libtexinfo-1.dll'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.