Re: Can't install cjson on windows with luarocks?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Can't install cjson on windows with luarocks?
- From: Thibault Charbonnier <thibaultcha@...>
- Date: 2016年12月19日 18:51:56 -0800
On 12/19/16 5:41 PM, Geoff Leyland wrote:
Hi,
I'm trying to install lua-cjson on Windows with Luarocks (2.4.2, freshly installed).
cl is:
cl /?
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
When I try to install, I get:
luarocks install lua-cjson
The specified configuration type is missing. The tools for the
configuration might not be installed.
Installing https://luarocks.org/lua-cjson-2.1.0-1.src.rock
cl /nologo /MD /O2 -c -Folua_cjson.obj -IC:/Users/Geoff Leyland/lua/include lua_cjson.c -DDISABLE_INVALID_NUMBERS
lua_cjson.c
c:\users\geoff leyland\appdata\local\temp\luarocks_lua-cjson-2.1.0-1-8654\lua-cjson-2.1.0\strbuf.h(78) : error C2054: expected '(' to follow 'inline'
c:\users\geoff leyland\appdata\local\temp\luarocks_lua-cjson-2.1.0-1-8654\lua-cjson-2.1.0\strbuf.h(79) : error C2085: 'strbuf_reset' : not in formal parameter list
c:\users\geoff leyland\appdata\local\temp\luarocks_lua-cjson-2.1.0-1-8654\lua-cjson-2.1.0\strbuf.h(79) : error C2143: syntax error : missing ';' before '{'
...
It doesn't look like there's anything wrong with strbuf.h. The "offending" line is:
static inline void strbuf_reset(strbuf_t *s)
which I would have thought was ok. (The preceding lines look ok too, and anyway this installs fine on *nix).
Am I making any obvious mistakes?
Have you tried installing the master branch? I wouldn't know for sure
but it seems like it received a few fixes for Windows installs since 2.1.0:
https://github.com/mpx/lua-cjson/compare/2.1.0...master
Additionally, you might want to check out the openresty/lua-cjson
maintained fork which contains a few bugfixes and additional features:
https://github.com/openresty/lua-cjson/#description
https://github.com/mpx/lua-cjson/compare/master...openresty:master
Both of those options are not published on Luarocks but you can clone
either repository and try to install their master branch with:
$ git clone <mpx/lua-cjson or openresty/lua-cjson>
$ cd lua-cjson
$ luarocks make
-- Thibault