Neopallium / lua-zmq

Lua zeromq2 binding
http://github.com/Neopallium/lua-zmq
MIT License
153 stars 36 forks source link

cmake build fails with Lua 5.2? #30

Closed joshber closed 12 years ago

joshber commented 12 years ago

Hi. Trying to build on OS X 10.7.4 with gcc 4.2.1, lua 5.2.0, and zmq 2.2.0

Generates the output that follows. My apologies if I'm simply doing something stupid. I suspect the problem lies with the luaL_reg* declarations that start at src/pre_generated-zmq.nobj.c:189. The canonical typedef is apparently luaL_Reg. In Lua 5.1, lauxlib.h included

define luaL_reg luaL_Reg

but this is not present in lauxlib.h under Lua 5.2. This was noted when Lua 5.2 was in beta a year ago

http://lua-users.org/lists/lua-l/2011-07/msg00708.html

but seems not to have been changed. My copy of lauxlib.h, installed March of this year, has no lowercase-r compatibility #define

Any chance of a fix? Other than going back to Lua 5.1?

Thanks! --Josh

[100%] Building C object CMakeFiles/lua-zmq.dir/src/pre_generated-zmq.nobj.c.o /Users/josh/dev/lua/lua-zmq/src/pregenerated-zmq.nobj.c:189: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘attribute’ before ‘’ token /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c: In function ‘nobj_try_loading_ffi’: /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:398: error: too few arguments to function ‘lua_load’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c: In function ‘obj_type_register_package’: /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:888: error: nested functions are disabled, use -fnested-functions to re-enable /Users/josh/dev/lua/lua-zmq/src/pregenerated-zmq.nobj.c:888: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:888: error: ‘reg_list’ undeclared (first use in this function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:888: error: (Each undeclared identifier is reported only once /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:888: error: for each function it appears in.) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:888: error: ‘reg_sub_module’ has no member named ‘pub_funcs’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:896: error: ‘reg_sub_module’ has no member named ‘constants’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:896: error: ‘reg_sub_module’ has no member named ‘bidirectional_consts’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c: In function ‘obj_type_register_meta’: /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:902: error: nested functions are disabled, use -fnested-functions to re-enable /Users/josh/dev/lua/lua-zmq/src/pregenerated-zmq.nobj.c:902: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:902: error: ‘reg_list’ undeclared (first use in this function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:905: error: ‘reg_sub_module’ has no member named ‘pub_funcs’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:911: error: ‘reg_sub_module’ has no member named ‘constants’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:911: error: ‘reg_sub_module’ has no member named ‘bidirectional_consts’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:914: error: ‘reg_sub_module’ has no member named ‘methods’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:918: error: ‘reg_sub_module’ has no member named ‘metas’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c: In function ‘obj_type_register’: /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:926: error: nested functions are disabled, use -fnested-functions to re-enable /Users/josh/dev/lua/lua-zmq/src/pregenerated-zmq.nobj.c:926: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:926: error: ‘reg_list’ undeclared (first use in this function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:928: error: ‘reg_sub_module’ has no member named ‘bases’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:940: error: ‘reg_sub_module’ has no member named ‘pub_funcs’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:973: error: ‘reg_sub_module’ has no member named ‘methods’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:991: error: ‘reg_sub_module’ has no member named ‘metas’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:1000: error: ‘reg_sub_module’ has no member named ‘constants’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:1000: error: ‘reg_sub_module’ has no member named ‘bidirectional_consts’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c: At top level: /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:5770: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZErrors_pub_funcs’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:5774: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZErrors_methods’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:5779: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZErrors_metas’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6196: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_zmq_msg_t_pub_funcs’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6203: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_zmq_msg_t_methods’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6214: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_zmq_msg_t_metas’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6233: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_Socket_pub_funcs’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6237: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_Socket_methods’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6394: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_Socket_metas’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6413: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_Poller_pub_funcs’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6418: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_Poller_methods’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6429: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_Poller_metas’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6448: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_Ctx_pub_funcs’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6452: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_Ctx_methods’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6459: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_Ctx_metas’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6478: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_StopWatch_pub_funcs’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6483: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_StopWatch_methods’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6488: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘obj_ZMQ_StopWatch_metas’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6507: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘zmq_function’ /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: error: ‘obj_ZErrors_pub_funcs’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: (near initialization for ‘reg_sub_modules[0]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: error: ‘obj_ZErrors_methods’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: (near initialization for ‘reg_sub_modules[0]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: error: ‘obj_ZErrors_metas’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: (near initialization for ‘reg_sub_modules[0]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: (near initialization for ‘reg_sub_modules[0]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: (near initialization for ‘reg_sub_modules[0]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: (near initialization for ‘reg_sub_modules[0]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6694: warning: (near initialization for ‘reg_sub_modules[0]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: error: ‘obj_zmq_msg_t_pub_funcs’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: (near initialization for ‘reg_sub_modules[1]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: error: ‘obj_zmq_msg_t_methods’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: (near initialization for ‘reg_sub_modules[1]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: error: ‘obj_zmq_msg_t_metas’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: (near initialization for ‘reg_sub_modules[1]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: (near initialization for ‘reg_sub_modules[1]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: (near initialization for ‘reg_sub_modules[1]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: (near initialization for ‘reg_sub_modules[1]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6695: warning: (near initialization for ‘reg_sub_modules[1]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: error: ‘obj_ZMQ_Socket_pub_funcs’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: (near initialization for ‘reg_sub_modules[2]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: error: ‘obj_ZMQ_Socket_methods’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: (near initialization for ‘reg_sub_modules[2]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: error: ‘obj_ZMQ_Socket_metas’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: (near initialization for ‘reg_sub_modules[2]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: (near initialization for ‘reg_sub_modules[2]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: (near initialization for ‘reg_sub_modules[2]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: (near initialization for ‘reg_sub_modules[2]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6696: warning: (near initialization for ‘reg_sub_modules[2]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: error: ‘obj_ZMQ_Poller_pub_funcs’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: (near initialization for ‘reg_sub_modules[3]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: error: ‘obj_ZMQ_Poller_methods’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: (near initialization for ‘reg_sub_modules[3]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: error: ‘obj_ZMQ_Poller_metas’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: (near initialization for ‘reg_sub_modules[3]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: (near initialization for ‘reg_sub_modules[3]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: (near initialization for ‘reg_sub_modules[3]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: (near initialization for ‘reg_sub_modules[3]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6697: warning: (near initialization for ‘reg_sub_modules[3]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: error: ‘obj_ZMQ_Ctx_pub_funcs’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: (near initialization for ‘reg_sub_modules[4]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: error: ‘obj_ZMQ_Ctx_methods’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: (near initialization for ‘reg_sub_modules[4]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: error: ‘obj_ZMQ_Ctx_metas’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: (near initialization for ‘reg_sub_modules[4]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: (near initialization for ‘reg_sub_modules[4]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: (near initialization for ‘reg_sub_modules[4]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: (near initialization for ‘reg_sub_modules[4]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6698: warning: (near initialization for ‘reg_sub_modules[4]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: error: ‘obj_ZMQ_StopWatch_pub_funcs’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: (near initialization for ‘reg_sub_modules[5]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: error: ‘obj_ZMQ_StopWatch_methods’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: (near initialization for ‘reg_sub_modules[5]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: error: ‘obj_ZMQ_StopWatch_metas’ undeclared here (not in a function) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: (near initialization for ‘reg_sub_modules[5]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: (near initialization for ‘reg_sub_modules[5]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: (near initialization for ‘reg_sub_modules[5]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: (near initialization for ‘reg_sub_modules[5]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6699: warning: (near initialization for ‘reg_sub_modules[5]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: (near initialization for ‘reg_sub_modules[6]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: (near initialization for ‘reg_sub_modules[6]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: (near initialization for ‘reg_sub_modules[6]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: (near initialization for ‘reg_sub_modules[6]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: (near initialization for ‘reg_sub_modules[6]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: (near initialization for ‘reg_sub_modules[6]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: excess elements in struct initializer /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6700: warning: (near initialization for ‘reg_sub_modules[6]’) /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c: In function ‘luaopen_zmq’: /Users/josh/dev/lua/lua-zmq/src/pre_generated-zmq.nobj.c:6758: error: ‘zmq_function’ undeclared (first use in this function) make[2]: * [CMakeFiles/lua-zmq.dir/src/pre_generated-zmq.nobj.c.o] Error 1 make[1]: * [CMakeFiles/lua-zmq.dir/all] Error 2 make: *\ [all] Error 2

joshber commented 12 years ago

Update: By adding

define luaL_reg luaL_Reg

and adding an additional NULL argument to the lua_load() call at pre_generated-zma.nobj.c:398

(5.2 requires a char* mode argument, but NULL is treated as "bt" = binary or text)

http://www.lua.org/manual/5.2/manual.html#lua_load

I was able to build with no warnings. Loading the module in Lua generates the following:

Lua 5.2.0 Copyright (C) 1994-2011 Lua.org, PUC-Rio

require"zmq" error loading module 'zmq' from file '/usr/local/lib/lua/5.2/zmq.so': dlopen(/usr/local/lib/lua/5.2/zmq.so, 6): Symbol not found: _luaL_register Referenced from: /usr/local/lib/lua/5.2/zmq.so Expected in: flat namespace in /usr/local/lib/lua/5.2/zmq.so stack traceback: [C]: in ? [C]: in function 'require' stdin:1: in main chunk [C]: in ?

andrewstarks commented 12 years ago

Hey all, I think I've got the same issue. I just want to confirm that lua-zmq does not work with Lua 5.2? I've decided to limit my tinkering to 5.2 and flopping back to test 5.1 is more work than asking nicely here. :)

Neopallium commented 12 years ago

lua-zmq now supports Lua 5.2.