LUA_GLOBALSINDEX undeclared in lua 5.2
Hubbitus opened this issue · 2 comments
+ cmake -DLIBCGROUPS=0 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_DBUS=1 -DLUA_JIT=0 -DPROCPS_STATIC:BOOL=OFF .
CMake Warning:
Manually-specified variables were not used by the project:
PROCPS_STATIC
+ make -j3
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/modules/simplerules.c: In function 'load_simple_directory':
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/modules/simplerules.c:249:13: warning: 'g_strcasecmp' is deprecated (declared at /usr/include/glib-2.0/glib/gstrfuncs.h:200) [-Wdeprecated-declarations]
if(!g_strcasecmp(disabled[j], rule_name))
^
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/src/core.c: In function 'load_rule_directory':
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/src/core.c:1977:11: warning: 'g_strcasecmp' is deprecated (declared at /usr/include/glib-2.0/glib/gstrfuncs.h:200) [-Wdeprecated-declarations]
if(!g_strcasecmp(disabled[j], rule_name))
^
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/src/core.c: In function 'load_modules':
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/src/core.c:2038:7: warning: 'g_strcasecmp' is deprecated (declared at /usr/include/glib-2.0/glib/gstrfuncs.h:200) [-Wdeprecated-declarations]
if(!g_strcasecmp(disabled[i], module_name)) {
^
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/src/ulatencyd.c: In function 'main':
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/src/ulatencyd.c:503:3: warning: 'g_type_init' is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
g_type_init ();
^
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/src/ulatencyd.c:508:3: warning: 'g_thread_init' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Wdeprecated-declarations]
g_thread_init(NULL);
^
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/src/ulatencyd.c:591:32: error: 'LUA_GLOBALSINDEX' undeclared (first use in this function)
lua_getfield(lua_main_state, LUA_GLOBALSINDEX, "CGROUP_ROOT"); /* function to be called */
^
/home/pasha/SOFT/rpmbuild/BUILD/ulatencyd.b30c5ef/src/ulatencyd.c:591:32: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [src/CMakeFiles/ulatencyd.dir/ulatencyd.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/CMakeFiles/ulatencyd.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
According to http://stackoverflow.com/questions/10087226/lua-5-2-lua-globalsindex-alternative registry index should be used instead
Čt 13. březen 2014, 04:05:04 CET
Pavel Alexeev aka Pahan-Hubbitus notifications@github.com napsal(a):
According to
http://stackoverflow.com/questions/10087226/lua-5-2-lua-globalsindex-alternative
reistry index should be used instead
Hi,
There will be probably more issues with migrating to lua 5.2. I have
looked at it a bit some time ago because I wanted string.format() from
5.2.
Currently ulatencyd requires lua 5.1 and because (1) you may have
5.2 installed along with 5.1 and (2) migrating to lua 5.2 will remove
compatibility with 5.1. and 5.2 is not available everywhere, it is not
a priority for me.
Cheers,
Petr