Re: Texinfo 7.2.90 build with mingw.org's MinGW: libtool installation location

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:17:24 +0000
> 
> On Sat, Jan 17, 2026 at 09:08:55PM +0000, Gavin Smith wrote:
> > 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?  Were the libraries installed in the wrong place
> > with Texinfo 7.2?
> > 
> 
> I've read in an email on the libtool mailing list archives that
> the path $libdir/../bin is used:
> 
> Mike Gran wrote:
> > Because when a MinGW DLL is installed by libtool, the libfoo.lib.a
> > goes into $libdir and the libfoo.dll goes into $libdir/../bin, which
> > happens to be $bindir
> https://lists.gnu.org/archive/html/libtool/2022-11/msg00000.html
> 
> So e.g.  /usr/lib/texi2any becomes /usr/lib/texi2any/../bin = /usr/lib/bin.
> 
> If this is right, then one workaround is to use an extra layer of directories.
> 
> If xsdir is instead /usr/lib/texi2any/lib, then this would lead to the
> directory /usr/lib/texi2any/bin being used instead, which is not so bad.

Right, but these directories are unlikely to be on PATH.  $prefix/bin
is usually on PATH, so if, as Patrice says, SWIG needs to load the
libtexinfo*.dll DLLs without reading the *.la files, it is better to
install them in $prefix/bin.

The libtool's "../bin" trick for Windows is just for the default case
of installing libraries in $prefix/lib, but it doesn't work well when
the directory structure is more complex.  I'm not a libtool expert,
but maybe there are ways of telling it to use a different arrangement?
Maybe Bruno (CC'ed) could help us with that?
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.