Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luarocks install tl fails on Windows #916

Closed
llint opened this issue Jan 19, 2025 · 9 comments · Fixed by #919
Closed

luarocks install tl fails on Windows #916

llint opened this issue Jan 19, 2025 · 9 comments · Fixed by #919

Comments

@llint
Copy link

llint commented Jan 19, 2025

Windows 11, MSVC
Running this command within the MSVC developer command prompt, got the following error:

C:\Users\X>luarocks install tl
Installing https://luarocks.org/tl-0.24.3-1.src.rock
Using dependencies pinned in lockfile: luarocks.lock
tl 0.24.3-1 is pinned to argparse 0.7.1-1 (0.7.1-1 installed: success)
tl 0.24.3-1 is pinned to compat53 0.12-1 (not installed)
Installing https://luarocks.org/compat53-0.12-1.src.rock
cl /nologo /MD /O2 -c -Folutf8lib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include lutf8lib.c
lutf8lib.c
link -dll -def:utf8.def -out:C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\utf8.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib lutf8lib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\utf8.lib and object C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\utf8.exp
cl /nologo /MD /O2 -c -Folstrlib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include lstrlib.c
lstrlib.c
link -dll -def:string.def -out:C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\string.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib lstrlib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\string.lib and object C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\string.exp
cl /nologo /MD /O2 -c -Foltablib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include ltablib.c
ltablib.c
link -dll -def:table.def -out:C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\table.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib ltablib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\table.lib and object C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\table.exp
cl /nologo /MD /O2 -c -Foliolib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include liolib.c
liolib.c
liolib.c(280): warning C4047: '=': 'FILE *' differs in levels of indirection from 'int'
link -dll -def:io.def -out:C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\io.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib liolib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

io.def : error LNK2001: unresolved external symbol luaopen_compat53_io
C:\Users\X\AppData\Local\Temp\luarocks_build-compat53-0.12-1-668774\compat53\io.lib : fatal error LNK1120: 1 unresolved externals

Error: Failed installing dependency: https://luarocks.org/compat53-0.12-1.src.rock - Build error: Failed compiling module compat53\io.dll

luarocks list gives the following output (just fyi):

C:\Users\X>luarocks list

Rocks installed for Lua 5.4
---------------------------

argparse
   0.7.1-1 (installed) - C:\Users\X\AppData\Roaming\luarocks\lib\luarocks\rocks-5.4

compat53
   0.14.3-1 (installed) - C:\Users\X\AppData\Roaming\luarocks\lib\luarocks\rocks-5.4

luasocket
   3.1.0-1 (installed) - C:\Users\X\AppData\Roaming\luarocks\lib\luarocks\rocks-5.4



@hishamhm
Copy link
Member

Try deleting your luarocks.lock file, or at least removing the compat53 entry from it.

@hishamhm
Copy link
Member

Closing this one since it's a LuaRocks configuration issue rather than a Teal issue. I'm pretty sure the solution above addresses the problem.

@mbartlett21
Copy link

mbartlett21 commented Jan 23, 2025

The rockspec at luarocks.org/manifests/hisham/tl-0.24.3-1.rockspec has compat53 in its dependencies. Thus luarocks is attempting to install it.

dependencies = {
   "compat53 >= 0.11",
   "argparse"
}

EDIT:

If I download and modify that rockspec to not include compat53, it then looks at the dependencies in the luarocks.lock in the root of this repo (which again include compat53 and again fail)

@llint
Copy link
Author

llint commented Jan 23, 2025

I did a clean luarocks install tl, and the same linker error still occured.

C:\Users\Lin>luarocks install tl
Installing https://luarocks.org/tl-0.24.3-1.src.rock
Using dependencies pinned in lockfile: luarocks.lock
tl 0.24.3-1 is pinned to argparse 0.7.1-1 (not installed)
Installing https://luarocks.org/argparse-0.7.1-1.src.rock
No existing manifest. Attempting to rebuild...
argparse 0.7.1-1 is now installed in C:\Users\Lin\AppData\Roaming\luarocks (license: MIT)

tl 0.24.3-1 is pinned to compat53 0.12-1 (not installed)
Installing https://luarocks.org/compat53-0.12-1.src.rock
cl /nologo /MD /O2 -c -Folutf8lib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include lutf8lib.c
lutf8lib.c
link -dll -def:utf8.def -out:C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.12-1-4239533\compat53\utf8.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib lutf8lib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.12-1-4239533\compat53\utf8.lib and object C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.12-1-4239533\compat53\utf8.exp
cl /nologo /MD /O2 -c -Folstrlib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include lstrlib.c
lstrlib.c
link -dll -def:string.def -out:C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.12-1-4239533\compat53\string.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib lstrlib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.12-1-4239533\compat53\string.lib and object C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.12-1-4239533\compat53\string.exp
cl /nologo /MD /O2 -c -Foliolib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include liolib.c
liolib.c
liolib.c(280): warning C4047: '=': 'FILE *' differs in levels of indirection from 'int'
link -dll -def:io.def -out:C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.12-1-4239533\compat53\io.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib liolib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

io.def : error LNK2001: unresolved external symbol luaopen_compat53_io
C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.12-1-4239533\compat53\io.lib : fatal error LNK1120: 1 unresolved externals

Error: Failed installing dependency: https://luarocks.org/compat53-0.12-1.src.rock - Build error: Failed compiling module compat53\io.dll

C:\Users\Lin>luarocks list

Rocks installed for Lua 5.4
---------------------------

argparse
   0.7.1-1 (installed) - C:\Users\Lin\AppData\Roaming\luarocks\lib\luarocks\rocks-5.4


is the pinned compat53 0.12-1 at fault here?

C:\Users\Lin>luarocks install compat53 0.12-1
**Installing https://luarocks.org/compat53-0.12-1.src.rock**

compat53 0.12-1 depends on lua >= 5.1, < 5.5 (5.4-1 provided by VM: success)
cl /nologo /MD /O2 -c -Foliolib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include liolib.c
liolib.c
liolib.c(280): warning C4047: '=': 'FILE *' differs in levels of indirection from 'int'
link -dll -def:io.def -out:C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.12-1-6267612\compat53\io.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib liolib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

io.def : error LNK2001: unresolved external symbol luaopen_compat53_io
C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.12-1-6267612\compat53\io.lib : fatal error LNK1120: 1 unresolved externals

Error: Build error: Failed compiling module compat53\io.dll

C:\Users\Lin>luarocks install compat53
**Installing https://luarocks.org/compat53-0.14.3-1.src.rock**

compat53 0.14.3-1 depends on lua >= 5.1, < 5.5 (5.4-1 provided by VM: success)
cl /nologo /MD /O2 -c -Folstrlib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include lstrlib.c
lstrlib.c
link -dll -def:string.def -out:C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\string.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib lstrlib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\string.lib and object C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\string.exp
cl /nologo /MD /O2 -c -Foltablib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include ltablib.c
ltablib.c
link -dll -def:table.def -out:C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\table.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib ltablib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\table.lib and object C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\table.exp
cl /nologo /MD /O2 -c -Foliolib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include liolib.c
liolib.c
C:\Users\Lin\AppData\Local\Temp\luarocks_compat53-0.14.3-1-7146385\lua-compat-5.3-0.14.3\lprefix.h(199): warning C4005: 'LUA_USE_WINDOWS': macro redefinition
C:\Lua\lua-5.4.2_Win64_dll17_lib\include\luaconf.h(51): note: see previous definition of 'LUA_USE_WINDOWS'
link -dll -def:io.def -out:C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\io.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib liolib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\io.lib and object C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\io.exp
cl /nologo /MD /O2 -c -Folutf8lib.obj -IC:\Lua\lua-5.4.2_Win64_dll17_lib\include lutf8lib.c
lutf8lib.c
link -dll -def:utf8.def -out:C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\utf8.dll C:\Lua\lua-5.4.2_Win64_dll17_lib\lua54.lib lutf8lib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\utf8.lib and object C:\Users\Lin\AppData\Local\Temp\luarocks_build-compat53-0.14.3-1-6718557\compat53\utf8.exp
compat53 0.14.3-1 is now installed in C:\Users\Lin\AppData\Roaming\luarocks (license: MIT)

@mbartlett21
Copy link

mbartlett21 commented Jan 23, 2025

@hishamhm
Are you happy to reopen this?

The pinned compat53 0.12-1 in the root of this repo seems to be the problem. I can install compat53 0.14.3-1 with no trouble (as it compiles with Lua 5.4 now), but installing tl still tries to get version 0.12-1.

Either the lock file could be deleted and have a new release, or if the lock file had the version changed to 0.14.3-1 would work.

@hishamhm hishamhm reopened this Jan 23, 2025
@hishamhm
Copy link
Member

@mbartlett21 Yes, I forgot that the repo included a lockfile!

@llint
Copy link
Author

llint commented Jan 23, 2025

would there be a new release on luarocks soon?

@hishamhm
Copy link
Member

@llint just now! Teal 0.24.4 is released!

@mbartlett21
Copy link

Thanks for that. Works now :)

Details


C:\Users\Me\Documents
> luarocks install tl
Installing https://luarocks.org/tl-0.24.4-1.src.rock
Using dependencies pinned in lockfile: luarocks.lock
tl 0.24.4-1 is pinned to argparse 0.7.1-1 (0.7.1-1 installed: success)
tl 0.24.4-1 is pinned to compat53 0.14.4-1 (not installed)
Installing https://luarocks.org/compat53-0.14.4-1.src.rock
cl /nologo /MD /O2 -c -Folutf8lib.obj -IC:\ProgramFilesOpen\lua\lua-5.4.6\src\ lutf8lib.c
lutf8lib.c
link -dll -def:utf8.def -out:C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\utf8.dll C:\ProgramFilesOpen\lua\lua5.4.lib lutf8lib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\utf8.lib and object C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\utf8.exp
cl /nologo /MD /O2 -c -Foliolib.obj -IC:\ProgramFilesOpen\lua\lua-5.4.6\src\ liolib.c
liolib.c
C:\Users\Me\AppData\Local\Temp\luarocks_compat53-0.14.4-1-5994640\lua-compat-5.3-0.14.4\lprefix.h(199): warning C4005: 'LUA_USE_WINDOWS': macro redefinition
C:\ProgramFilesOpen\lua\lua-5.4.6\src\luaconf.h(51): note: see previous definition of 'LUA_USE_WINDOWS'
link -dll -def:io.def -out:C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\io.dll C:\ProgramFilesOpen\lua\lua5.4.lib liolib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\io.lib and object C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\io.exp
cl /nologo /MD /O2 -c -Folstrlib.obj -IC:\ProgramFilesOpen\lua\lua-5.4.6\src\ lstrlib.c
lstrlib.c
link -dll -def:string.def -out:C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\string.dll C:\ProgramFilesOpen\lua\lua5.4.lib lstrlib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\string.lib and object C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\string.exp
cl /nologo /MD /O2 -c -Foltablib.obj -IC:\ProgramFilesOpen\lua\lua-5.4.6\src\ ltablib.c
ltablib.c
link -dll -def:table.def -out:C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\table.dll C:\ProgramFilesOpen\lua\lua5.4.lib ltablib.obj
Microsoft (R) Incremental Linker Version 14.42.34435.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\table.lib and object C:\Users\Me\AppData\Local\Temp\luarocks_build-compat53-0.14.4-1-6362129\compat53\table.exp
compat53 0.14.4-1 is now installed in C:\Users\Me\AppData\Roaming\luarocks (license: MIT)

Checking stability of dependencies in the absence of
compat53 0.14.3-1...

Removing compat53 0.14.3-1...
Removal successful.
tl 0.24.4-1 is pinned to luafilesystem 1.8.0-1 (1.8.0-1 installed: success)

tl 0.24.4-1 is now installed in C:\Users\Me\AppData\Roaming\luarocks (license: MIT)


C:\Users\Me\Documents
>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants