lunarmodules / luasocket

Network support for the Lua language
http://lunarmodules.github.io/luasocket/
MIT License
1.83k stars 626 forks source link

"Build error: Failed compiling module mime\core.dll" on Windows #429

Open zack-incredible opened 5 months ago

zack-incredible commented 5 months ago

I have installed the lua54 version of window. And installed the luarocks of 3.11.0 version. Environment path have been added. When I use the shell command of luarocks install luasocket to install the luasoket package,It show the following issue.Is anybody meet the same issue? and How to solve it'?

Installing https://luarocks.org/luasocket-3.1.0-1.src.rock

luasocket 3.1.0-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
x86_64-w64-mingw32-gcc -O2 -c -o src/mime.o -ID:\Programers_installation\Lua_Binary/include src/mime.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/compat.o -ID:\Programers_installation\Lua_Binary/include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc  -shared -o C:\Users\zhaol\AppData\Local\Temp\luarocks_build-LuaSocket-3.1.0-1-2986800\mime\core.dll src/mime.o src/compat.o -Lc:\windows\system32 D:\Programers_installation\Lua_Binary\lua54.dll -lm
D:/Programers_installation/MingW64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o:crtdll.c:(.text+0x16d): undefined reference to `_execute_onexit_table'
D:/Programers_installation/MingW64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o:crtdll.c:(.text+0x8): undefined reference to `_initialize_onexit_table'
D:/Programers_installation/MingW64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o:crtdll.c:(.text+0x38b): undefined reference to `_register_onexit_function'
D:/Programers_installation/MingW64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):pseudo-reloc.c:(.text.unlikely+0x28): undefined reference to `__acrt_iob_func'
D:/Programers_installation/MingW64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):pseudo-reloc.c:(.text.unlikely+0x51): undefined reference to `__acrt_iob_func'
collect2.exe: error: ld returned 1 exit status

Error: Build error: Failed compiling module mime\core.dll
alerque commented 5 months ago

I'm not familiar with Windows build issues, but here are a few folks around that use it there so hopefully somebody can chime in. It looks like you're probably missing some library or header path so the builder doesn't know where to link some functions.

zack-incredible commented 5 months ago

I'm not familiar with Windows build issues, but here are a few folks around that use it there so hopefully somebody can chime in. It looks like you're probably missing some library or header path so the builder doesn't know where to link some functions.

Thanks for your kindly reply and advice

agoshigagoroba commented 4 months ago

Hi! I'm new to Lua and I just wanted to install luasockets via luarocks but I'm stuck on the same issue and no idea how to solve it. The issue seems to be the same, if not, my apologies:

 luarocks install luasocket
Installing https://luarocks.org/luasocket-3.1.0-1.src.rock

luasocket 3.1.0-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
x86_64-w64-mingw32-gcc -O2 -c -o src/luasocket.o -IC:\Dev\lua src/luasocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/timeout.o -IC:\Dev\lua src/timeout.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/buffer.o -IC:\Dev\lua src/buffer.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/io.o -IC:\Dev\lua src/io.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/auxiliar.o -IC:\Dev\lua src/auxiliar.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/options.o -IC:\Dev\lua src/options.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
src/options.c: In function 'opt_ip6_setmembership':
src/options.c:406:10: warning: implicit declaration of function 'inet_pton'; did you mean 'inet_aton'? [-Wimplicit-function-declaration]
     if (!inet_pton(AF_INET6, lua_tostring(L, -1), &val.ipv6mr_multiaddr))
          ^~~~~~~~~
          inet_aton
x86_64-w64-mingw32-gcc -O2 -c -o src/inet.o -IC:\Dev\lua src/inet.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/except.o -IC:\Dev\lua src/except.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/select.o -IC:\Dev\lua src/select.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/tcp.o -IC:\Dev\lua src/tcp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/udp.o -IC:\Dev\lua src/udp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/compat.o -IC:\Dev\lua src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/wsocket.o -IC:\Dev\lua src/wsocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc  -shared -o C:\Users\BLACKB~1\AppData\Local\Temp\luarocks_build-LuaSocket-3.1.0-1-3248744\socket\core.dll src/luasocket.o src/timeout.o src/buffer.o src/io.o src/auxiliar.o src/options.o src/inet.o src/except.o src/select.o src/tcp.o src/udp.o src/compat.o src/wsocket.o -lws2_32 C:\Dev\lua\lua54.dll -lm
x86_64-w64-mingw32-gcc -O2 -c -o src/mime.o -IC:\Dev\lua src/mime.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc -O2 -c -o src/compat.o -IC:\Dev\lua src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
x86_64-w64-mingw32-gcc  -shared -o C:\Users\BLACKB~1\AppData\Local\Temp\luarocks_build-LuaSocket-3.1.0-1-3248744\mime\core.dll src/mime.o src/compat.o -Lc:\windows\system32 C:\Dev\lua\lua54.dll -lm
C:/Dev/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o:crtdll.c:(.text+0x16d): undefined reference to `_execute_onexit_table'
C:/Dev/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o:crtdll.c:(.text+0x8): undefined reference to `_initialize_onexit_table'
C:/Dev/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o:crtdll.c:(.text+0x38b): undefined reference to `_register_onexit_function'
C:/Dev/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):pseudo-reloc.c:(.text.unlikely+0x28): undefined reference to `__acrt_iob_func'
C:/Dev/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):pseudo-reloc.c:(.text.unlikely+0x51): undefined reference to `__acrt_iob_func'
collect2.exe: error: ld returned 1 exit status

Error: Build error: Failed compiling module mime\core.dll
alerque commented 4 months ago

Again I'm not on Windows and many people that are don't have this problem, so I suggest you guys talk a little bit and compare environments and figure out what is unique about your situation.

Given that this failure is at link time one thing to check might be all the environment variables and default build flags in relation to gcc/ld, this might be an LTO related failure of something getting optimized to early.

Chenshuai770 commented 3 months ago

gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=D:/lua/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../../../src/gcc-13.2.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/buildroot/x86_64-1320-posix-seh-ucrt-rt_v11-rev0/mingw64 --enable-host-shared --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libssp --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/buildroot/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-Builds project' --with-bugurl=https://github.com/niXman/mingw-builds CFLAGS='-O2 -pipe -fno-ident -I/c/buildroot/x86_64-1320-posix-seh-ucrt-rt_v11-rev0/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/buildroot/x86_64-1320-posix-seh-ucrt-rt_v11-rev0/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/buildroot/x86_64-1320-posix-seh-ucrt-rt_v11-rev0/mingw64/opt/include -I/c/buildroot/prerequisites/x86_64-zlib-static/include -I/c/buildroot/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/buildroot/x86_64-1320-posix-seh-ucrt-rt_v11-rev0/mingw64/opt/lib -L/c/buildroot/prerequisites/x86_64-zlib-static/lib -L/c/buildroot/prerequisites/x86_64-w64-mingw32-static/lib ' LD_FOR_TARGET=/c/buildroot/x86_64-1320-posix-seh-ucrt-rt_v11-rev0/mingw64/bin/ld.exe --with-boot-ldflags=' -Wl,--disable-dynamicbase -static-libstdc++ -static-libgcc' Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.2.0 (x86_64-posix-seh-rev0, Built by MinGW-Builds project)

C:\Users\77045>luarocks install luasay

Error: No results matching query were found for Lua 5.4. To check if it is available for other Lua versions, use --check-lua-versions.

C:\Users\77045>lua Lua 5.4.2 Copyright (C) 1994-2020 Lua.org, PUC-Rio

C:\Users\77045>luarocks install say Installing https://luarocks.org/say-1.4.1-3.src.rock say 1.4.1-3 is already installed in D:\lua\5.4.2\systree Use --force to reinstall.

C:\Users\77045>luarocks install say --force Installing https://luarocks.org/say-1.4.1-3.src.rock say 1.4.1-3 is already installed in D:\lua\5.4.2\systree Use --force to reinstall.

C:\Users\77045>luarocks install luasocket Installing https://luarocks.org/luasocket-3.1.0-1.src.rock

luasocket 3.1.0-1 depends on lua >= 5.1 (5.4-1 provided by VM: success) x86_64-w64-mingw32-gcc -O2 -c -o src/luasocket.o -ID:\lua\5.4.2\include src/luasocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/timeout.o -ID:\lua\5.4.2\include src/timeout.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/buffer.o -ID:\lua\5.4.2\include src/buffer.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/io.o -ID:\lua\5.4.2\include src/io.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/auxiliar.o -ID:\lua\5.4.2\include src/auxiliar.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/options.o -ID:\lua\5.4.2\include src/options.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/inet.o -ID:\lua\5.4.2\include src/inet.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/except.o -ID:\lua\5.4.2\include src/except.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/select.o -ID:\lua\5.4.2\include src/select.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/tcp.o -ID:\lua\5.4.2\include src/tcp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/udp.o -ID:\lua\5.4.2\include src/udp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/compat.o -ID:\lua\5.4.2\include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/wsocket.o -ID:\lua\5.4.2\include src/wsocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -shared -o C:\Users\77045\AppData\Local\Temp\luarocks_build-LuaSocket-3.1.0-1-5794310\socket\core.dll src/luasocket.o src/timeout.o src/buffer.o src/io.o src/auxiliar.o src/options.o src/inet.o src/except.o src/select.o src/tcp.o src/udp.o src/compat.o src/wsocket.o -lws2_32 D:\lua\5.4.2\bin\lua54.dll -lMSVCRT x86_64-w64-mingw32-gcc -O2 -c -o src/mime.o -ID:\lua\5.4.2\include src/mime.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -O2 -c -o src/compat.o -ID:\lua\5.4.2\include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include x86_64-w64-mingw32-gcc -shared -o C:\Users\77045\AppData\Local\Temp\luarocks_build-LuaSocket-3.1.0-1-5794310\mime\core.dll src/mime.o src/compat.o -Lc:\windows\system32 D:\lua\5.4.2\bin\lua54.dll -lMSVCRT D:/lua/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/lua/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o:crtdll.c:(.text+0x148): undefined reference to _execute_onexit_table' D:/lua/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/lua/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o:crtdll.c:(.text+0x8): undefined reference to_initialize_onexit_table' D:/lua/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/lua/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o:crtdll.c:(.text+0x34b): undefined reference to _register_onexit_function' D:/lua/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/lua/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):pseudo-reloc.c:(.text+0x28): undefined reference toacrt_iob_func' D:/lua/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/lua/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):pseudo-reloc.c:(.text+0x51): undefined reference to `acrt_iob_func' collect2.exe: error: ld returned 1 exit status

Error: Build error: Failed compiling module mime\core.dll

Tieske commented 3 months ago

@alerque this line: https://github.com/lunarmodules/luasocket/blob/e3ca4a767a68d127df548d82669aba3689bd84f4/luasocket-scm-3.rockspec#L37

seems to be the culprit. Do you recall why it was commented out?

alerque commented 3 months ago

Nope, it came from #383 so maybe @goldenstein64 knows something. I'm reliant on contributors and reporters for Windows issues, I don't have any way to test them properly locally.

goldenstein64 commented 3 months ago

It looks like I'm still able to compile v3.1.0, tested with MinGW from nuwen 18.0 and 19.0. This is the output I get:

> luarocks --version
luarocks 3.9.2
LuaRocks main command-line interface

> gcc -v
Using built-in specs.
COLLECT_GCC=~\ProgramFiles\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=~/programfiles/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: 
    ../src/configure 
    --enable-languages=c,c++ 
    --build=x86_64-w64-mingw32 
    --host=x86_64-w64-mingw32 
    --target=x86_64-w64-mingw32 
    --disable-multilib 
    --prefix=/c/temp/gcc/dest 
    --with-sysroot=/c/temp/gcc/dest 
    --disable-libstdcxx-pch 
    --disable-libstdcxx-verbose 
    --disable-nls 
    --disable-shared 
    --disable-win32-registry 
    --enable-threads=posix 
    --enable-libgomp 
    --with-zstd=/c/mingw 
    --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (GCC)

> luarocks install luasocket      
Installing https://luarocks.org/luasocket-3.1.0-1.src.rock

luasocket 3.1.0-1 depends on lua >= 5.1 (5.4-1 provided by VM)
gcc -O2 -c -o src/mime.o -I~/ProgramFiles/Lua/5.4/include src/mime.c -DLUASOCKET_DEBUG -DWINVER=0x0501
gcc -O2 -c -o src/compat.o -I~/ProgramFiles/Lua/5.4/include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501
gcc  -shared -o mime/core.dll src/mime.o src/compat.o ~/ProgramFiles/Lua/5.4/lua54.dll -lm
gcc -O2 -c -o src/luasocket.o -I~/ProgramFiles/Lua/5.4/include src/luasocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/timeout.o -I~/ProgramFiles/Lua/5.4/include src/timeout.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/buffer.o -I~/ProgramFiles/Lua/5.4/include src/buffer.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/io.o -I~/ProgramFiles/Lua/5.4/include src/io.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/auxiliar.o -I~/ProgramFiles/Lua/5.4/include src/auxiliar.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/options.o -I~/ProgramFiles/Lua/5.4/include src/options.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/inet.o -I~/ProgramFiles/Lua/5.4/include src/inet.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/except.o -I~/ProgramFiles/Lua/5.4/include src/except.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/select.o -I~/ProgramFiles/Lua/5.4/include src/select.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/tcp.o -I~/ProgramFiles/Lua/5.4/include src/tcp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/udp.o -I~/ProgramFiles/Lua/5.4/include src/udp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/compat.o -I~/ProgramFiles/Lua/5.4/include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc -O2 -c -o src/wsocket.o -I~/ProgramFiles/Lua/5.4/include src/wsocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:/windows/system32/include
gcc  -shared -o socket/core.dll src/luasocket.o src/timeout.o src/buffer.o src/io.o src/auxiliar.o src/options.o src/inet.o src/except.o src/select.o src/tcp.o src/udp.o src/compat.o src/wsocket.o -lws2_32 ~/ProgramFiles/Lua/5.4/lua54.dll -lm
luasocket 3.1.0-1 is now installed in ./lua_modules (license: MIT)

gcc 13.2.0 specs:

> ~\ProgramFiles\MinGW-19.0\bin\gcc.exe -v
Using built-in specs.
COLLECT_GCC=~\ProgramFiles\MinGW-19.0\bin\gcc.exe
COLLECT_LTO_WRAPPER=~/ProgramFiles/MinGW-19.0/bin/../libexec/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: 
    ../src/configure 
    --enable-languages=c,c++ 
    --build=x86_64-w64-mingw32 
    --host=x86_64-w64-mingw32 
    --target=x86_64-w64-mingw32 
    --disable-multilib 
    --prefix=/e/temp/gcc/dest 
    --with-sysroot=/e/temp/gcc/dest 
    --disable-libstdcxx-pch 
    --disable-libstdcxx-verbose 
    --disable-nls 
    --disable-shared 
    --disable-win32-registry 
    --enable-threads=posix 
    --enable-libgomp 
    --with-zstd=/c/mingw
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (GCC)

and building with that flag uncommented leads to an error.

> luarocks build ./rockspecs/luasocket-3.1.0-1.rockspec
luasocket 3.1.0-1 depends on lua >= 5.1 (5.4-1 provided by VM)
gcc -O2 -c -o src/mime.o -I~/ProgramFiles/Lua/5.4/include src/mime.c -DLUASOCKET_DEBUG -DLUASOCKET_INET_PTON -DWINVER=0x0501
gcc -O2 -c -o src/compat.o -I~/ProgramFiles/Lua/5.4/include src/compat.c -DLUASOCKET_DEBUG -DLUASOCKET_INET_PTON -DWINVER=0x0501
gcc  -shared -o mime/core.dll src/mime.o src/compat.o ~/ProgramFiles/Lua/5.4/lua54.dll -lm
gcc -O2 -c -o src/luasocket.o -I~/ProgramFiles/Lua/5.4/include src/luasocket.c -DLUASOCKET_DEBUG -DLUASOCKET_INET_PTON -DWINVER=0x0501 -Ic:/windows/system32/include
In file included from src/luasocket.c:20:
src/inet.h:48:13: error: conflicting types for 'inet_ntop'; have 'const char *(int,  const void *, char *, socklen_t)' {aka 'const char *(int,  const void *, char *, int)'}
   48 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt);
      |             ^~~~~~~~~
In file included from src/wsocket.h:12,
                 from src/socket.h:18,
                 from src/inet.h:18,
                 from src/luasocket.c:20:
~\programfiles\mingw\x86_64-w64-mingw32\include\ws2tcpip.h:401:35: note: previous declaration of 'inet_ntop' with type 'const CHAR *(INT,  const void *, CHAR *, size_t)' {aka 'const char *(int,  const void *, char *, long long unsigned int)'}
  401 | WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, LPCVOID pAddr, LPSTR pStringBuf, size_t StringBufSize);
      |                                   ^~~~~~~~~
In file included from src/luasocket.c:20:
src/inet.h:49:5: warning: 'inet_pton' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   49 | int inet_pton(int af, const char *src, void *dst);
      |     ^~~~~~~~~

Error: Build error: Failed compiling object src/luasocket.o

I'm gonna look at the build steps others provided, there may be a dependency being added/removed somewhere.

And I'm also going to say that I'm not an expert with C or anything, I just tried something in that rockspec and that made it work for whatever reason.

goldenstein64 commented 3 months ago

Now that I updated my LuaRocks, I'm getting the same error :)

> luarocks --version
luarocks 3.11.0
LuaRocks main command-line interface

> luarocks install luasocket
Installing https://luarocks.org/luasocket-3.1.0-1.src.rock

luasocket 3.1.0-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
gcc -O2 -c -o src/mime.o -I~/ProgramFiles/Lua/5.4/include src/mime.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
gcc -O2 -c -o src/compat.o -I~/ProgramFiles/Lua/5.4/include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
gcc  -shared -o ~\AppData\Local\Temp\luarocks_build-LuaSocket-3.1.0-1-4424335\mime\core.dll src/mime.o src/compat.o -Lc:\windows\system32 ~\ProgramFiles\Lua\5.4\lua54.dll -lm
ld: ~/ProgramFiles/MinGW-19.0/x86_64-w64-mingw32/lib/dllcrt2.o:crtdll.c:(.text+0x148): undefined reference to `_execute_onexit_table'
ld: ~/ProgramFiles/MinGW-19.0/x86_64-w64-mingw32/lib/dllcrt2.o:crtdll.c:(.text+0x338): undefined reference to `_execute_onexit_table'
ld: ~/ProgramFiles/MinGW-19.0/x86_64-w64-mingw32/lib/dllcrt2.o:crtdll.c:(.text+0x8): undefined reference to `_initialize_onexit_table'
ld: ~/ProgramFiles/MinGW-19.0/x86_64-w64-mingw32/lib/dllcrt2.o:crtdll.c:(.text+0x40b): undefined reference to `_register_onexit_function'
ld: ~/ProgramFiles/MinGW-19.0/x86_64-w64-mingw32/lib/libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o): in function `__report_error':
E:/temp/gcc/src/mingw-w64-crt/crt/pseudo-reloc.c:150:(.text+0x28): undefined reference to `__acrt_iob_func'
ld: E:/temp/gcc/src/mingw-w64-crt/crt/pseudo-reloc.c:151:(.text+0x51): undefined reference to `__acrt_iob_func'
collect2.exe: error: ld returned 1 exit status

Error: Build error: Failed compiling module mime\core.dll

I'm still not sure what could be causing it at the moment.

goldenstein64 commented 3 months ago

I tried adding the same fix for mime.core as I did for socket.core in #383, and it worked?

diff --git a/rockspecs/luasocket-3.1.0-1.rockspec b/rockspecs/luasocket-3.1.0-1.rockspec
index 2d724ac..a386404 100644
--- a/rockspecs/luasocket-3.1.0-1.rockspec
+++ b/rockspecs/luasocket-3.1.0-1.rockspec
@@ -114,6 +114,7 @@ local function make_plat(plat)
     modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c"
     modules["socket.core"].libraries = { "ws2_32" }
     modules["socket.core"].libdirs = {}
+    modules["mime.core"].libdirs = {}
   end
   return { modules = modules }
 end
> luarocks build ./rockspecs/luasocket-3.1.0-1.rockspec
luasocket 3.1.0-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/luasocket.o -I~/ProgramFiles/Lua/5.4/include src/luasocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/timeout.o -I~/ProgramFiles/Lua/5.4/include src/timeout.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/buffer.o -I~/ProgramFiles/Lua/5.4/include src/buffer.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/io.o -I~/ProgramFiles/Lua/5.4/include src/io.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include    
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/auxiliar.o -I~/ProgramFiles/Lua/5.4/include src/auxiliar.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/options.o -I~/ProgramFiles/Lua/5.4/include src/options.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/inet.o -I~/ProgramFiles/Lua/5.4/include src/inet.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/except.o -I~/ProgramFiles/Lua/5.4/include src/except.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/select.o -I~/ProgramFiles/Lua/5.4/include src/select.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/tcp.o -I~/ProgramFiles/Lua/5.4/include src/tcp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include  
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/udp.o -I~/ProgramFiles/Lua/5.4/include src/udp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include  
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/compat.o -I~/ProgramFiles/Lua/5.4/include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/wsocket.o -I~/ProgramFiles/Lua/5.4/include src/wsocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe  -shared -o ~\AppData\Local\Temp\luarocks_build-LuaSocket-3.1.0-1-6459592\socket\core.dll src/luasocket.o src/timeout.o src/buffer.o src/io.o src/auxiliar.o src/options.o src/inet.o src/except.o src/select.o src/tcp.o src/udp.o src/compat.o src/wsocket.o -lws2_32 ~\ProgramFiles\Lua\5.4\lua54.dll -lm       
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/mime.o -I~/ProgramFiles/Lua/5.4/include src/mime.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe -O2 -c -o src/compat.o -I~/ProgramFiles/Lua/5.4/include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
~/ProgramFiles/MinGW-19.0/bin/gcc.exe  -shared -o ~\AppData\Local\Temp\luarocks_build-LuaSocket-3.1.0-1-6459592\mime\core.dll src/mime.o src/compat.o ~\ProgramFiles\Lua\5.4\lua54.dll -lm
luasocket 3.1.0-1 is now installed in ./lua_modules (license: MIT)

I will make a PR. Someone please test this patch.

brostosjoined commented 3 weeks ago
luarocks install luasocket
Installing https://luarocks.org/luasocket-3.1.0-1.src.rock

luasocket 3.1.0-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/luasocket.o -IC:\Program Files\Lua/include src/luasocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/timeout.o -IC:\Program Files\Lua/include src/timeout.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/buffer.o -IC:\Program Files\Lua/include src/buffer.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/io.o -IC:\Program Files\Lua/include src/io.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/auxiliar.o -IC:\Program Files\Lua/include src/auxiliar.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/options.o -IC:\Program Files\Lua/include src/options.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/inet.o -IC:\Program Files\Lua/include src/inet.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/except.o -IC:\Program Files\Lua/include src/except.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/select.o -IC:\Program Files\Lua/include src/select.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/tcp.o -IC:\Program Files\Lua/include src/tcp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/udp.o -IC:\Program Files\Lua/include src/udp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/compat.o -IC:\Program Files\Lua/include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/wsocket.o -IC:\Program Files\Lua/include src/wsocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe"  -shared -o C:\Users\user\AppData\Local\Temp\luarocks_build-LuaSocket-3.1.0-1-7780209\socket\core.dll src/luasocket.o src/timeout.o src/buffer.o src/io.o src/auxiliar.o src/options.o src/inet.o src/except.o src/select.o src/tcp.o src/udp.o src/compat.o src/wsocket.o -lws2_32 C:\Program Files\Lua\lib\lua54.dll -lm
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/mime.o -IC:\Program Files\Lua/include src/mime.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/compat.o -IC:\Program Files\Lua/include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe"  -shared -o C:\Users\user\AppData\Local\Temp\luarocks_build-LuaSocket-3.1.0-1-7780209\mime\core.dll src/mime.o src/compat.o -Lc:\windows\system32 C:\Program Files\Lua\lib\lua54.dll -lm
ld.lld: error: undefined symbol: _initialize_onexit_table
>>> referenced by ../crt/crtdll.c:64
>>>               C:/Program Files/LLVM/llvm-mingw-20240619-ucrt-x86_64/x86_64-w64-mingw32/lib/dllcrt2.o:(pre_c_init)

ld.lld: error: undefined symbol: _execute_onexit_table
>>> referenced by ../crt/crtdll.c:130
>>>               C:/Program Files/LLVM/llvm-mingw-20240619-ucrt-x86_64/x86_64-w64-mingw32/lib/dllcrt2.o:(_CRT_INIT)
>>> referenced by ../crt/crtdll.c:130
>>>               C:/Program Files/LLVM/llvm-mingw-20240619-ucrt-x86_64/x86_64-w64-mingw32/lib/dllcrt2.o:(__DllMainCRTStartup)
>>> referenced by ../crt/crtdll.c:130
>>>               C:/Program Files/LLVM/llvm-mingw-20240619-ucrt-x86_64/x86_64-w64-mingw32/lib/dllcrt2.o:(__DllMainCRTStartup)

ld.lld: error: undefined symbol: _register_onexit_function
>>> referenced by ../crt/crtdll.c:207
>>>               C:/Program Files/LLVM/llvm-mingw-20240619-ucrt-x86_64/x86_64-w64-mingw32/lib/dllcrt2.o:(atexit)

ld.lld: error: undefined symbol: __acrt_iob_func
>>> referenced by ../crt/pseudo-reloc.c:150
>>>               libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):(__report_error)
>>> referenced by ../crt/pseudo-reloc.c:151
>>>               libmingw32.a(lib64_libmingw32_a-pseudo-reloc.o):(__report_error)
clang-18: error: linker command failed with exit code 1 (use -v to see invocation)

Error: Build error: Failed compiling module mime\core.dll

The fix above from goldenstein64 above compiled without any errors

luarocks make

luasocket scm-3 depends on lua >= 5.1 (5.4-1 provided by VM: success)
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/mime.o -IC:\Program Files\Lua/include src/mime.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/compat.o -IC:\Program Files\Lua/include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe"  -shared -o C:\Users\user\AppData\Local\Temp\luarocks_build-LuaSocket-scm-3-1902310\mime\core.dll src/mime.o src/compat.o C:\Program Files\Lua\lib\lua54.dll -lm
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/luasocket.o -IC:\Program Files\Lua/include src/luasocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/timeout.o -IC:\Program Files\Lua/include src/timeout.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/buffer.o -IC:\Program Files\Lua/include src/buffer.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/io.o -IC:\Program Files\Lua/include src/io.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/auxiliar.o -IC:\Program Files\Lua/include src/auxiliar.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/options.o -IC:\Program Files\Lua/include src/options.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/inet.o -IC:\Program Files\Lua/include src/inet.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/except.o -IC:\Program Files\Lua/include src/except.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/select.o -IC:\Program Files\Lua/include src/select.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/tcp.o -IC:\Program Files\Lua/include src/tcp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/udp.o -IC:\Program Files\Lua/include src/udp.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/compat.o -IC:\Program Files\Lua/include src/compat.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe" -O2 -c -o src/wsocket.o -IC:\Program Files\Lua/include src/wsocket.c -DLUASOCKET_DEBUG -DWINVER=0x0501 -Ic:\windows\system32\include
"C:\Program Files\LLVM\llvm-mingw-20240619-ucrt-x86_64\bin\x86_64-w64-mingw32-gcc.exe"  -shared -o C:\Users\user\AppData\Local\Temp\luarocks_build-LuaSocket-scm-3-1902310\socket\core.dll src/luasocket.o src/timeout.o src/buffer.o src/io.o src/auxiliar.o src/options.o src/inet.o src/except.o src/select.o src/tcp.o src/udp.o src/compat.o src/wsocket.o -lws2_32 C:\Program Files\Lua\lib\lua54.dll -lm
No existing manifest. Attempting to rebuild...
luasocket scm-3 is now installed in C:\Users\user/lua_modules (license: MIT)