On Sun, Feb 22, 2026 at 10:52:54PM +0100, [email protected] wrote:
> On Sun, Feb 22, 2026 at 07:37:05PM +0000, Gavin Smith wrote:
> > I don't know if it is the direct cause of the problem but I see in
> > the Gnulib documentation, it says we should use an option to LT_INIT
> > that we are not currently using under tta/configure.ac:
> > 
> >      If you want it to be possible to compile your program for a native
> >   Windows platform and you use Libtool, you need to use the ‘win32-dll’
> >   option of ‘LT_INIT’.  In other words, put:
> >   
> >        LT_INIT([win32-dll])
> >   
> >      in your ‘configure.ac’.
> > 
> > (Info node "(gnulib)Libtool and Windows".)
> > 
> > I don't know if it is worth adding this before the release though, in
> > case it breaks something.
> 
> It is also something that the libtool maintainer proposed we do,
> https://lists.gnu.org/archive/html/libtool/2025-09/msg00001.html
> 
> but, if I understood well, this requires doing something like what Bruno
> proposes for extern variables:
> 
>     LIBFOO_DLL_VARIABLE char *optarg;
>   where LIBFOO_DLL_VARIABLE needs to expand to
>     __declspec(dllexport)
>   or
>     __declspec(dllimport)
>   depending on the compilation unit.
> 
> I started having a look at that for texi2any libraries, checking which
> extern variables were really used from other libraries, and maybe
> replacing variables by functions and/or adding the __declspec
> qualifiers.  I only wanted to do that for the code in the texi2any
> libraries, not in Gnulib code.  But then I got sidetracked by the issue
> I found with dlpreopen, which is also there on GNU/Linux.

Link to archived message: 
https://lists.gnu.org/archive/html/bug-texinfo/2026-02/msg00106.html

Bruno's email about __declspec appears to be this one:
https://lists.gnu.org/archive/html/bug-texinfo/2026-02/msg00102.html

We still do not use the win32-dll option in LT_INIT in ./tta/configure.ac or
tta/perl/CheckXS/configure.ac.

According to the Libtool manual, this means that dynamic libraries are not
built:

  ‘win32-dll’
  This option should be used if the package has been ported to build
  clean dlls on win32 platforms. Usually this means that any library
  data items are exported with __declspec(dllexport) and imported with
  __declspec(dllimport). If this option is not used, libtool will assume
  that the package libraries are not dll clean and will build only static
  libraries on win32 hosts.

https://www.gnu.org/software/libtool/manual/libtool.html#index-LT_005fINIT

Does this mean that XS modules do not build at all on MS-Windows?  I do
not remember this being the case.

Perhaps the claim in the manual about only building "static libraries
on win32 hosts" is not strictly accurate.


  • Re: ... Eli Zaretskii
    • ... Eli Zaretskii
      • ... pertusus
        • ... Eli Zaretskii
          • ... Eli Zaretskii
            • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
              • ... Eli Zaretskii
              • ... Eli Zaretskii
              • ... Gavin Smith
              • ... pertusus
              • ... Gavin Smith
              • ... Eli Zaretskii
              • ... Gavin Smith
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
              • ... pertusus
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
              • ... pertusus
            • ... pertusus
            • ... Gavin Smith
        • ... pertusus
          • ... Eli Zaretskii

Reply via email to