lipp / lua-websockets

Websockets for Lua.
http://lipp.github.com/lua-websockets/
MIT License
396 stars 113 forks source link

Can't install via luarocks #100

Open seregayoga opened 8 years ago

seregayoga commented 8 years ago

It resolves all dependecies except luabitop:

lua-websockets$ sudo luarocks make rockspecs/lua-websockets-scm-1.rockspec

Missing dependencies for lua-websockets:
luabitop 

Using https://luarocks.org/luabitop-1.0.2-1.src.rock... switching to 'build' mode
gcc -O2 -fPIC -I/usr/local/include -c bit.c -o bit.o
bit.c: In function ‘barg’:
bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h"
 #error "Unknown number type, check LUA_NUMBER_* in luaconf.h"
  ^

Error: Failed installing dependency: https://luarocks.org/luabitop-1.0.2-1.src.rock - Build error: Failed compiling object bit.o

$ lua -v
Lua 5.3.3  Copyright (C) 1994-2016 Lua.org, PUC-Rio
$ luarocks --version
/usr/local/lib/luarocks/rocks/luarocks/2.3.0-1/bin/luarocks 2.3.0
LuaRocks main command-line interface
jteppinette commented 5 years ago

The install is failing on Lua 5.3, because it is using luabitop which doesn't support Lua 5.3. I am on MacOS, so the following worked for me after a $ brew install lua@5.1 libev:

$ luarocks --lua-dir=/usr/local/opt/lua@5.1 make rockspecs/lua-websockets-scm-1.rockspec OPENSSL_DIR=/usr/local/opt/openssl