luacrypto icon indicating copy to clipboard operation
luacrypto copied to clipboard

I cannot compile it in fedora 20

Open linjianzao opened this issue 11 years ago • 2 comments

/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT lcrypto.lo -MD -MP -MF .deps/lcrypto.Tpo -c -o lcrypto.lo lcrypto.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT lcrypto.lo -MD -MP -MF .deps/lcrypto.Tpo -c lcrypto.c -fPIC -DPIC -o .libs/lcrypto.o In file included from lcrypto.c:31:0: lcrypto.c:38:13: error: expected declaration specifiers or '...' before '(' token static void luaL_register (lua_State *L, const char *libname, const luaL_Reg *l) ^ lcrypto.c:38:13: error: expected declaration specifiers or '...' before '(' token static void luaL_register (lua_State *L, const char *libname, const luaL_Reg *l) ^ lcrypto.c:38:13: error: expected declaration specifiers or '...' before numeric constant static void luaL_register (lua_State *L, const char *libname, const luaL_Reg *l) ^ lcrypto.c:44:0: warning: "lua_objlen" redefined [enabled by default] #define lua_objlen lua_rawlen ^ In file included from /usr/include/lua.h:16:0, from lcrypto.c:30: /usr/include/luaconf.h:301:0: note: this is the location of the previous definition #define lua_objlen(L,i) lua_rawlen(L, (i))

linjianzao avatar Jan 02 '14 03:01 linjianzao

I think this is my bug. I does not check compat flags. You can try this

#ifndef LUA_COMPAT_MODULE
static void luaL_register ....
#endif

#ifndef LUA_COMPAT_ALL
#define lua_objlen lua_rawlen
#endif

Or just remove this defenitions.

moteus avatar Jan 02 '14 13:01 moteus

I am success by luarocks . thanks!

linjianzao avatar Jan 02 '14 14:01 linjianzao