[tlbuild] About building TeXLive on MSYS2/MinGW64

luigi scarso luigi.scarso at gmail.com
Sun Mar 1 13:08:27 CET 2020


On Sun, Mar 1, 2020 at 12:01 PM Angelo Graziosi <angelo.g0 at libero.it> wrote:

> Just for completeness, in case someon could be interested.
>
> Out of curiosity, I tried a build on MSYS2/MinGW64 after an rsync of last
> source, and did ./Build.
>
> It failed after building 105 executable in this way:
>
> -----------------------------------------------------------------
> [...]
> mv -f luatexdir/luasocket/src/.deps/libluasocket_a-except.Tpo
> luatexdir/luasocket/src/.deps/libluasocket_a-except.Po    gcc
> -DHAVE_CONFIG_H -I. -I../../../texk/web2c -I./w2c  -DLUASOCKET_DEBUG
> -I../../../texk/web2c/luatexdir/luasocket
> -I/tmp/tlsource/Work/libs/lua53/include -DLUA_COMPAT_MODULE
> -DLUA_COMPAT_5_2 -DLUAI_HASHLIMIT=6   -g -O2 -MT
> luatexdir/luasocket/src/libluasocket_a-inet.o -MD -MP -MF
> luatexdir/luasocket/src/.deps/libluasocket_a-inet.Tpo -c -o
> luatexdir/luasocket/src/libluasocket_a-inet.o `test -f
> 'luatexdir/luasocket/src/inet.c' || echo
> '../../../texk/web2c/'`luatexdir/luasocket/src/inet.c
> In file included from
> ../../../texk/web2c/luatexdir/luasocket/src/inet.c:13:
> ../../../texk/web2c/luatexdir/luasocket/src/inet.h:50:13: error:
> conflicting types for 'inet_ntop'
>    50 | const char *inet_ntop(int af, const void *src, char *dst,
> socklen_t cnt);
>       |             ^~~~~~~~~
> In file included from
> ../../../texk/web2c/luatexdir/luasocket/src/wsocket.h:12,
>                  from
> ../../../texk/web2c/luatexdir/luasocket/src/socket.h:18,
>                  from
> ../../../texk/web2c/luatexdir/luasocket/src/inet.h:18,
>                  from
> ../../../texk/web2c/luatexdir/luasocket/src/inet.c:13:
> C:/msys64/mingw64/x86_64-w64-mingw32/include/ws2tcpip.h:451:35: note:
> previous declaration of 'inet_ntop' was here        451 |
> WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, LPCVOID pAddr,
> LPSTR pStringBuf, size_t StringBufSize);       |
>        ^~~~~~~~~
> In file included from
> ../../../texk/web2c/luatexdir/luasocket/src/inet.c:13:
> ../../../texk/web2c/luatexdir/luasocket/src/inet.h:51:5: warning:
> 'inet_pton' redeclared without dllimport attribute: previous dllimport
> ignored [-Wattributes]
>    51 | int inet_pton(int af, const char *src, void *dst);
>       |     ^~~~~~~~~
>

It's ok with
x86_64-w64-mingw32-gcc (GCC) 7.3-win32 20180312
only because in ws2tcpip.h I have
#define InetNtopA inet_ntop


Indeed in  luatexdir/luasocket/src/inet.h we have

25 #if defined( __MINGW32__ ) || defined( __MINGW64__ )
26 #define LUASOCKET_INET_PTON
27 #endif

49 #ifdef LUASOCKET_INET_PTON
50 const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt);
51 int inet_pton(int af, const char *src, void *dst);
52 #endif

Line 50 now is not ok anymore.

-- 
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tlbuild/attachments/20200301/3a1b7698/attachment.html>


More information about the tlbuild mailing list.