Re: Texinfo 7.2.90 build with mingw.org's MinGW: libtool installation location
Bruno Haible via Bug reports for the GNU Texinfo documentation system <[email protected]>
| Newsgroups | gmane.comp.tex.texinfo.bugs |
|---|---|
| Organization | GNU |
| Message-ID | <3191029.9VTjjQsp5K@nimes> |
Eli Zaretskii wrote in the thread starting at
<https://lists.gnu.org/archive/html/bug-texinfo/2026-01/msg00185.html>:
> > > > > 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?
The libtool manual [1] says that during linking, the option '-bindir'
(I guess, that means an option "-bindir DIRECTORY") can be used to specify
this directory.
[1] https://www.gnu.org/software/libtool/manual/html_node/Link-mode.html
Ileana, I'd suggest this doc patch:
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 084fce40..d9f1a22c 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -1515,7 +1515,7 @@ Tries to avoid versioning (@pxref{Versioning}) for libraries and modules,
i.e.@: no version information is stored and no symbolic links are created.
If the platform requires versioning, this option has no effect.
-@item -bindir
+@item -bindir @var{directory}
Pass the absolute name of the directory for installing executable
programs (@pxref{Directory Variables, , Directory Variables, standards,
The GNU Coding Standards}). @command{libtool} may use this value to