Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cannot compile it in fedora 20 #32

Open
linjianzao opened this issue Jan 2, 2014 · 2 comments
Open

I cannot compile it in fedora 20 #32

linjianzao opened this issue Jan 2, 2014 · 2 comments

Comments

@linjianzao
Copy link

/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))

@moteus
Copy link
Contributor

moteus commented Jan 2, 2014

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.

@linjianzao
Copy link
Author

I am success by luarocks . thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants