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

Error while installing LuaSec #850

Closed
Choonster opened this issue Jul 21, 2018 · 13 comments
Closed

Error while installing LuaSec #850

Choonster opened this issue Jul 21, 2018 · 13 comments
Labels

Comments

@Choonster
Copy link

LuaRocks version: 3.0.0
OS: WIndows 10 x64

While attempting to install LuaSec with luarocks install luasec, I got the following error:

Error: LuaRocks 3.0.0 bug (please report at https://github.com/luarocks/luarocks/issues).
[string "src/luarocks/manif.lua"]:140: attempt to concatenate a nil value (local 'err')
stack traceback:
        [string "src/luarocks/manif.lua"]:140: in function 'luarocks.manif.load_manifest'
        [string "src/luarocks/search.lua"]:111: in function <[string "src/luarocks/search.lua"]:101>
        (...tail calls...)
        [string "src/luarocks/search.lua"]:155: in function 'luarocks.search.search_repos'
        [string "src/luarocks/search.lua"]:240: in function 'luarocks.search.find_suitable_rock'
        [string "src/luarocks/cmd/install.lua"]:208: in function 'luarocks.cmd.install.command'
        (...tail calls...)
        [C]: in function 'xpcall'
        [string "src/luarocks/cmd.lua"]:444: in function 'luarocks.cmd.run_command'
        [string "luarocks"]:35: in main chunk
        [C]: in ?
@hishamhm
Copy link
Member

@Choonster this was running luarocks.exe, right?

Could you give this build a try to see if this fixes the issue? https://hisham.hm/win32/luarocks-dev-windows-32-8734df1.zip

Thank you!

@Choonster
Copy link
Author

Choonster commented Jul 23, 2018

Yes, I was running luarocks.exe.

That fixed the issue, thanks.

However, I'm having another issue where running the linked build of LuaRocks in the Visual Studio command prompt tries to compile LuaSec using mingw32-gcc instead of using the Microsoft compiler toolchain.

Is there anything I need to post to help diagnose this? Should I open another issue?

@hishamhm
Copy link
Member

hishamhm commented Jul 23, 2018

luarocks.exe attempts to detect the VS command prompt checking if the VCINSTALLDIR environment variable exists. Do you have that env var when you run set from the command prompt? What MSVC version are you running?

In case VCINSTALLDIR does not exist in your VS command prompt:

  1. what other Visual Studio environment variables exist?
  2. if you do set VCINSTALLDIR=foo in the prompt, does luarocks.exe start using the Microsoft toolchain?

@Tieske
Copy link
Contributor

Tieske commented Jul 23, 2018

and what Visual Studio or Windows SDK version?

@Choonster
Copy link
Author

Choonster commented Jul 24, 2018

I'm using VS2017 Professional.

There's no VCINSTALLDIR variable set when I open the VS command prompt and even if I set it, LuaRocks still attempts to use mingw32-gcc.

You can see the full list of variables here. Interestingly, VSINSTALLDIR is set, but not VCINSTALLDIR.

@daurnimator
Copy link
Member

@Choonster I found https://gist.github.com/teeks99/627dce6f298ba02592643f03fe36a68b which indicates it should be present: can see how yours might differ?

@Choonster
Copy link
Author

I didn't have the "Desktop development with C++" workload installed in my VS2017 Professional instance, which is likely why the VCINSTALLDIR variable wasn't set.

I do have it installed in my VS2017 Community instance, which does have VCINSTALLDIR set in its command prompt.

However, LuaRocks still attempts to use mingw32-gcc when run in the VS2017 Community command prompt.

@ghost
Copy link

ghost commented Jul 28, 2018

@Choonster how did you manage to run luarocks.exe on Windows 10 x64? Whenever I try to run it, I get the following error: Error: Current directory does not exist. Please run LuaRocks from an existing directory.

For instance:

C:\luarocks-3.0.0-windows-32>luarocks install luasocket
Error: Current directory does not exist. Please run LuaRocks from an existing directory.

What am I doing wrong?

@Choonster
Copy link
Author

@murillow I installed it over the top of an existing LuaRocks 2 installation from LuaWinMulti and moved the config-5.3.lua file to C:\Program Files (x86)\LuaRocks. I haven't tried a completely fresh installation.

@ghost
Copy link

ghost commented Jul 28, 2018

@Choonster wow I didn't even know about LuaWinMulti! OMG, It's so handy! Thanks!!!

@hishamhm
Copy link
Member

hishamhm commented Aug 2, 2018

@Choonster @murillow please give this new build a try:

https://hisham.hm/win32/luarocks-dev-windows-32-2018-08-02-1ab3297.zip

it should detect MSVC correctly when VCINSTALLDIR is set.

@Choonster
Copy link
Author

@hishamhm That build worked, thanks. I managed to install LuaSocket and LuaSec using it.

@Bayu12345677
Copy link

help

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