0

I want to install lua-cjson, and I get this error when running luarocks install lua-cjson

Error: Build error: Failed installing cjson.dll

My version of cl is https://i.stack.imgur.com/djC5S.jpg

My luarocks version is:

luarocks 2.0.2
LuaRocks main command-line interface

I have no idea how to fix this

Here is the output when I run luarocks install lua-cjson in Developer Command Prompt for VS 2019(2):

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>luarocks install lua-cjson
Installing http://luarocks.org/repositories/rocks/lua-cjson-2.1.0.6-1.src.rock...
cl /MD /O2 -c -Folua_cjson.obj -IC:/Program Files (x86)/Lua/5.1/include lua_cjson.c -DDISABLE_INVALID_NUMBERS -DUSE_INTERNAL_ISINF
Microsoft (R) C/C++ Optimizing Compiler Version 19.22.27905 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

lua_cjson.c
lua_cjson.c(736): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(753): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1280): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1458): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1470): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1475): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1492): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1497): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1502): warning C4090: 'function': different 'const' qualifiers
cl /MD /O2 -c -Fostrbuf.obj -IC:/Program Files (x86)/Lua/5.1/include strbuf.c -DDISABLE_INVALID_NUMBERS -DUSE_INTERNAL_ISINF
Microsoft (R) C/C++ Optimizing Compiler Version 19.22.27905 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

strbuf.c
cl /MD /O2 -c -Fofpconv.obj -IC:/Program Files (x86)/Lua/5.1/include fpconv.c -DDISABLE_INVALID_NUMBERS -DUSE_INTERNAL_ISINF
Microsoft (R) C/C++ Optimizing Compiler Version 19.22.27905 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

fpconv.c
link -dll -def:cjson.def -out:cjson.dll C:/Program Files (x86)/Lua/5.1/lib/lua5.1.lib lua_cjson.obj strbuf.obj fpconv.obj
Microsoft (R) Incremental Linker Version 14.22.27905.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library cjson.lib and object cjson.exp

Error: Build error: Failed installing cjson.dll in C:\Program Files (x86)\Lua\5.1\rocks/lua-cjson/2.1.0.6-1/lib

I expect to be able to install luarocks but it fails.

OverHash
  • 3
  • 1
  • 4
  • Speaking of which, you probably should try to update luarocks first (it's 3.2.0 now if I'm not mistaken). Also, what does "I expect to be able to install luarocks but it fails." mean? – val - disappointed in SE Sep 01 '19 at 18:35
  • @val READ CORRECT POST HERE: https://imgur.com/a/zvFngia FORMATTING BAD ON STACKOVERFLOW I installed 3.2.0 but am now getting this whenever I run `luarocks install lua-cjson`: `C:\Users\OverHash>luarocks install lua-cjson` `Warning: Could not find a Lua 5.3 interpreter in your PATH. Modules may not install with the correct configurations. You may want to specify the path prefix to your build of Lua 5.3 using --lua-dir` `Installing https://luarocks.org/lua-cjson-2.1.0.6-1.src.rock` `Error: Failed finding Lua header files. You may need to install them or configure LUA_INCDIR.` – OverHash Sep 03 '19 at 08:27

0 Answers0