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

Luv not working nor installing via Luarocks #519

Open
Nazadup opened this issue Oct 15, 2020 · 6 comments
Open

Luv not working nor installing via Luarocks #519

Nazadup opened this issue Oct 15, 2020 · 6 comments
Labels

Comments

@Nazadup
Copy link

Nazadup commented Oct 15, 2020

I've tried some different methods of installing Luv, but so far i got no sucess. I tried both building from source and installig via Luarocks. When building from source, everything seems to work properly, but when i try to run a code that requires luv, it doesn't works, here's the code i'm trying to run:
uv = require('luv') --luarocks install luv

function set_timeout(timeout, callback)
local timer = uv.new_timer()
local function ontimeout()
uv.timer_stop(timer)
uv.close(timer)
callback()
end
uv.timer_start(timer, timeout, 0, ontimeout)
return timer
end

set_timeout(1000, function() print('ok') end) -- time in ms

uv.run() --it will hold at this point until every timer have finished

Visual Studio Code returns:
lua: C:\Users\Win10\Desktop\Lua Folders\Lua Coding\learn.lua:1: module 'luv' not found: no field package.preload['luv'] no file 'C:\lua' no file 'C:\lua\luv.dll' no file 'C:\lua\..\lib\lua\5.4\luv.dll' no file 'C:\lua\loadall.dll' no file '.\luv.dll' no file 'C:\lua\luv54.dll' no file '.\luv54.dll' stack traceback: [C]: in function 'require' C:\Users\Win10\Desktop\Lua Folders\Lua Coding\learn.lua:1: in main chunk [C]: in ? The terminal process "C:\Windows\System32\cmd.exe /d /c lua "C:\Users\Win10\Desktop\Lua Folders\Lua Coding\learn.lua"" terminated with exit code: 1.

And, whenever i try to install luv via Luarocks, either trough Visual Studio Code or cmd (can't do it on PowerShell, my Luarocks doesn't works there), i get this:
C:\Users\Win10\Documents\LuaRocks>luarocks install luv
Installing https://luarocks.org/luv-1.36.0-0.src.rock

luv 1.36.0-0 depends on lua >= 5.1 (5.4-1 provided by VM)
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- The C compiler identification is GNU 9.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/MinGW/bin/gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/MinGW/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test UV_LINT_W4
-- Performing Test UV_LINT_W4 - Failed
-- Performing Test UV_LINT_WALL
-- Performing Test UV_LINT_WALL - Success
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER - Success
-- Performing Test UV_LINT_STRICT_PROTOTYPES
-- Performing Test UV_LINT_STRICT_PROTOTYPES - Success
-- Performing Test UV_LINT_EXTRA
-- Performing Test UV_LINT_EXTRA - Success
-- Lua: using information from luarocks
-- LUA_LIBDIR: C:\lua
-- LUA_INCDIR: C:\lua\include
-- LUA: C:\lua/lua.exe
-- Lua library: LUA_LIBRARIES-NOTFOUND
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LUA_LIBRARIES
linked by target "luv" in directory C:/Users/Win10/AppData/Local/Temp/luarocks_luv-1.36.0-0-3784/luv-1.36.0-0

-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.

Error: Build error: Failed cmake.

Information that might be useful: I did try to reinstall it multiple times, i do have CMake and MinGW (had to get MinGW because installing Luv through Luarocks was giving a different error, which ceased after MinGW being installed) and i'm doing it all in a Windows 10 machine. Also, i'm very new into programming.

So, what is going on and how can i fix it?

@squeek502
Copy link
Member

squeek502 commented Oct 15, 2020

Looks like an issue with Lua 5.4. Relevant issues:

@Nazadup
Copy link
Author

Nazadup commented Oct 16, 2020

Looks like an issue with Lua 5.4. Relevant issues:

Thanks a lot but i'm not sure what i should do, tho. Do you recommend me installing Lua 5.3, instead?

@squeek502
Copy link
Member

Unfortunately our Lua 5.4 support is not quite there yet. Looks like the error you're getting is from your Lua lib files not being found when searching for them here:

NAMES lua lua53 lua52 lua51 liblua liblua53 liblua52 liblua51

Note to self: need to add lua54 liblua54 to the lib search names in #515

@dustin10weering
Copy link

Hey, I'm experiencing the exact same issue with LUA_LIBRARIES not found, and I'm using lua 5.3.

@osadchij
Copy link

osadchij commented Jan 6, 2021

Oh, just posted the same Issue with lua5.1

@squeek502
Copy link
Member

Is this still a problem with the latest release?

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

No branches or pull requests

5 participants