compiled_output.txt
Hi , noahwatkins:
Thinks for your reply ,but I still got some errors when using luarocks to install lua-rados :
[root@ceph-ca1 ~]# /usr/local/openresty/luajit/bin/luarocks install https://raw.github.com/noahdesu/lua-rados/master/rockspecs/lua-rados-0.0.1-1.rockspec
./bootstrap.sh && LUA=/usr/local/openresty/luajit//bin/luajit CPPFLAGS=-I/usr/local/openresty/luajit/include/luajit-2.1 ./configure --prefix=/usr/local/openresty/luajit/lib/luarocks/rocks/lua-rados/0.0.1-1 --libdir=/usr/local/openresty/luajit/lib/luarocks/rocks/lua-rados/0.0.1-1/lib --datadir=/usr/local/openresty/luajit/lib/luarocks/rocks/lua-rados/0.0.1-1/lua && make clean && make
autoreconf: Entering directory `.'
......
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lua-rados.rockspec
config.status: executing depfiles commands
config.status: executing libtool commands
test -z "rados.la" || rm -f rados.la
rm -f ./so_locations
rm -rf .libs _libs
rm -f *.o
rm -f *.lo
CXX rados_la-lua_rados.lo
In file included from /usr/include/c++/4.8.2/type_traits:35:0,
from /usr/include/rados/buffer.h:46,
from /usr/include/rados/librados.hpp:12,
from lua_rados.cc:14:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the
^
…..
In file included from /usr/include/rados/librados.hpp:11:0,
from lua_rados.cc:14:
/usr/include/rados/memory.h:7:14: error: 'std::shared_ptr' has not been declared
using std::shared_ptr;
^
make: *** [rados_la-lua_rados.lo] Error 1
Error: Build error: Failed building.
And then I add -std=c++11 or -std=gnu++11 to run manually like this:
./bootstrap.sh && LUA=/usr/local/openresty/luajit//bin/luajit CPPFLAGS=-I/usr/local/openresty/luajit/include/luajit-2.1 ./configure --prefix=/usr/local/openresty/luajit/lib/luarocks/rocks/lua-rados/0.0.1-1 --libdir=/usr/local/openresty/luajit/lib/luarocks/rocks/lua-rados/0.0.1-1/lib --datadir=/usr/local/openresty/luajit/lib/luarocks/rocks/lua-rados/0.0.1-1/lua -std=c++11 -std=gnu++11
compile and make install Successful
but I still con't use lua-rados in openresty, some errors like that:
2017/03/17 03:12:36 [error] 26777#0: *10 lua entry thread aborted: runtime error: error loading module 'rados' from file '/usr/local/openresty/luajit/lib/luarocks/rocks/lua-rados/0.0.1-1/lib/rados.so':
/usr/local/openresty/luajit/lib/luarocks/rocks/lua-rados/0.0.1-1/lib/rados.so: undefined symbol: luaopen_rados
stack traceback:
coroutine 0:
[C]: in function 'require'
content_by_lua(nginx.conf:71):3: in function <content_by_lua(nginx.conf:71):1>, client: 192.168.33.22, server: localhost, request: "GET /api HTTP/1.1", host: "172.26.101.93"
2017/03/17 03:12:36 [debug] 26777#0: *10 lua request cleanup: forcible=0
my env:
centos 7
nginx version: openresty/1.11.2.2
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
LuaJIT 2.1.0-beta2 -- Copyright (C) 2005-2016 Mike Pall. http://luajit.org/