wahern / cqueues

Continuation Queues: Embeddable asynchronous networking, threading, and notification framework for Lua on Unix.
http://25thandclement.com/~william/projects/cqueues.html
MIT License
248 stars 37 forks source link

Build fails against luajit 2.1 #189

Closed daurnimator closed 7 years ago

daurnimator commented 7 years ago

LuaJIT 2.1 provides some lua 5.2 symbols. These end up clashing with our compat implementations.

Build log from https://travis-ci.org/daurnimator/lua-http/jobs/261447848:

enabling Lua 5.1
cp /tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/config.h.guess /tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/config.h
cp /tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/config.h /tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/config.h
mkdir -p /tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/5.1
gcc -O2 -std=gnu99 -fPIC -g -Wall -Wextra  -Wno-missing-field-initializers  -Wno-override-init -Wno-unused -O2 -fPIC -DLUA_COMPAT_APIINTCASTS -I/home/travis/hererocks/include -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE -I"/usr/include" -I"/usr/include" -DCQUEUES_VENDOR='"william@25thandClement.com"' -DCQUEUES_VERSION=20161215L  -c -o /tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/5.1/cqueues.o /tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/cqueues.c
In file included from /tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/cqueues.h:44:0,
                 from /tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/cqueues.c:51:
/tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/compat52.h:31:13: error: static declaration of ‘luaL_setmetatable’ follows non-static declaration
/home/travis/hererocks/include/lauxlib.h:92:18: note: previous declaration of ‘luaL_setmetatable’ was here
/tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/compat52.h:42:14: error: static declaration of ‘luaL_testudata’ follows non-static declaration
/home/travis/hererocks/include/lauxlib.h:91:19: note: previous declaration of ‘luaL_testudata’ was here
/tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/compat52.h:57:13: error: static declaration of ‘luaL_setfuncs’ follows non-static declaration
/home/travis/hererocks/include/lauxlib.h:88:18: note: previous declaration of ‘luaL_setfuncs’ was here
/tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/compat52.h:71:0: warning: "luaL_newlibtable" redefined [enabled by default]
/home/travis/hererocks/include/lauxlib.h:123:0: note: this is the location of the previous definition
/tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/compat52.h:74:0: warning: "luaL_newlib" redefined [enabled by default]
/home/travis/hererocks/include/lauxlib.h:125:0: note: this is the location of the previous definition
make: *** [/tmp/luarocks_cqueues-20161215.51-0-QiLoDX/cqueues-rel-20161215/src/5.1/cqueues.o] Error 1