lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.92k stars 549 forks source link

Cannot build latest source #68

Closed whatvn closed 9 years ago

whatvn commented 9 years ago

When build lwan on my Ubuntu with lua, luajit install, got this error:

../common/liblwan-common.a(lwan-lua.c.o): In function state_create': [20/995] /home/parallels/lwan-master/common/lwan-lua.c:126: undefined reference toluaL_newstate' /home/parallels/lwan-master/common/lwan-lua.c:132: undefined reference to luaL_openlibs' /home/parallels/lwan-master/common/lwan-lua.c:134: undefined reference toluaL_newmetatable' /home/parallels/lwan-master/common/lwan-lua.c:135: undefined reference to luaL_register' /home/parallels/lwan-master/common/lwan-lua.c:136: undefined reference tolua_setfield' /home/parallels/lwan-master/common/lwan-lua.c:138: undefined reference to luaL_loadfile' /home/parallels/lwan-master/common/lwan-lua.c:138: undefined reference tolua_pcall' /home/parallels/lwan-master/common/lwan-lua.c:139: undefined reference to lua_tolstring' /home/parallels/lwan-master/common/lwan-lua.c:140: undefined reference tolua_close' ../common/liblwan-common.a(lwan-lua.c.o): In function state_destroy': /home/parallels/lwan-master/common/lwan-lua.c:153: undefined reference tolua_close' ../common/liblwan-common.a(lwan-lua.c.o): In function get_or_create_cache': /home/parallels/lwan-master/common/lwan-lua.c:159: undefined reference topthread_getspecific' /home/parallels/lwan-master/common/lwan-lua.c:165: undefined reference to pthread_setspecific' ../common/liblwan-common.a(lwan-lua.c.o): In functionunref_thread': /home/parallels/lwan-master/common/lwan-lua.c:174: undefined reference to luaL_unref' ../common/liblwan-common.a(lwan-lua.c.o): In functionget_handler_function': /home/parallels/lwan-master/common/lwan-lua.c:227: undefined reference to lua_getfield' /home/parallels/lwan-master/common/lwan-lua.c:228: undefined reference tolua_type' ../common/liblwan-common.a(lwan-lua.c.o): In function push_request': /home/parallels/lwan-master/common/lwan-lua.c:233: undefined reference tolua_newuserdata' /home/parallels/lwan-master/common/lwan-lua.c:235: undefined reference to lua_getfield' /home/parallels/lwan-master/common/lwan-lua.c:236: undefined reference tolua_setmetatable' ../common/liblwan-common.a(lwan-lua.c.o): In function push_newthread': /home/parallels/lwan-master/common/lwan-lua.c:241: undefined reference tolua_newthread' /home/parallels/lwan-master/common/lwan-lua.c:245: undefined reference to luaL_ref' ../common/liblwan-common.a(lwan-lua.c.o): In functionlua_handle_cb': /home/parallels/lwan-master/common/lwan-lua.c:280: undefined reference to lua_resume' /home/parallels/lwan-master/common/lwan-lua.c:287: undefined reference tolua_tolstring' ../common/liblwan-common.a(lwan-lua.c.o): In function lua_init': /home/parallels/lwan-master/common/lwan-lua.c:321: undefined reference topthread_key_create' ../common/liblwan-common.a(lwan-lua.c.o): In function lua_shutdown': /home/parallels/lwan-master/common/lwan-lua.c:343: undefined reference topthread_key_delete' ../common/liblwan-common.a(lwan-serve-files.c.o): In function compress_cached_entry': /home/parallels/lwan-master/common/lwan-serve-files.c:302: undefined reference tocompressBound' /home/parallels/lwan-master/common/lwan-serve-files.c:307: undefined reference to compress' ../common/liblwan-common.a(lwan-tables.c.o): In functionlwan_tables_init': /home/parallels/lwan-master/common/lwan-tables.c:42: undefined reference to uncompress' ../common/liblwan-common.a(lwan-thread.c.o): In functioncreate_thread': /home/parallels/lwan-master/common/lwan-thread.c:365: undefined reference to pthread_create' ../common/liblwan-common.a(lwan-thread.c.o): In functionlwan_thread_shutdown': /home/parallels/lwan-master/common/lwan-thread.c:416: undefined reference to pthread_tryjoin_np' ../common/liblwan-common.a(lwan-cache.c.o): In functioncache_create': /home/parallels/lwan-master/common/lwan-cache.c:116: undefined reference to pthread_rwlock_init' /home/parallels/lwan-master/common/lwan-cache.c:118: undefined reference topthread_rwlock_init' /home/parallels/lwan-master/common/lwan-cache.c:135: undefined reference to pthread_rwlock_destroy' ../common/liblwan-common.a(lwan-cache.c.o): In functioncache_destroy': /home/parallels/lwan-master/common/lwan-cache.c:157: undefined reference to pthread_rwlock_destroy' /home/parallels/lwan-master/common/lwan-cache.c:158: undefined reference topthread_rwlock_destroy' ../common/liblwan-common.a(lwan-cache.c.o): In function cache_get_and_ref_entry': /home/parallels/lwan-master/common/lwan-cache.c:184: undefined reference topthread_rwlock_tryrdlock' /home/parallels/lwan-master/common/lwan-cache.c:193: undefined reference to `pthread_rwlock_unlock'

With -pthread add to build flag, pthread error go way, but lua stays the same.

lpereira commented 9 years ago

I believe this is fixed in 779756c7a3; just tested that on an Ubuntu 12.04 machine. Could you please verify?

Hempels-ravens commented 9 years ago

no problems compiling on Arch Linux(with all packages up-to date)

whatvn commented 9 years ago

Yes, this commit fixed my issue.

Thanks,