[Freeswitch-users] ESL: luamod not compiling

Michael Jerris mike at jerris.com
Tue May 18 21:26:19 PDT 2010


On May 19, 2010, at 12:12 AM, Neil Patel wrote:

> I just downloaded today's snapshot and tried compiling luamod. I got the error below:
> 
> root at server:/usr/src/freeswitch-snapshot/libs/esl# make luamod
> make MYLIB="../libesl.a" SOLINK="-shared -Xlinker -x" CFLAGS="-I/usr/src/freeswitch-snapshot/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2 -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes" CXXFLAGS="-I/usr/src/freeswitch-snapshot/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -Wall -Werror -Wno-unused-variable" CXX_CFLAGS="" -C lua
> make[1]: Entering directory `/usr/src/freeswitch-snapshot/libs/esl/lua'
> g++  -I/usr/src/freeswitch-snapshot/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -Wall -Werror -Wno-unused-variable  -Wno-unused-function -c esl_wrap.cpp -o esl_wrap.o
> esl_wrap.cpp:726:17: error: lua.h: No such file or directory
> esl_wrap.cpp:727:21: error: lauxlib.h: No such file or directory
> esl_wrap.cpp:745: error: ‘lua_CFunction’ does not name a type
> esl_wrap.cpp:746: error: ‘lua_CFunction’ does not name a type
> esl_wrap.cpp:761: error: ‘lua_CFunction’ does not name a type
> esl_wrap.cpp:766: error: ‘lua_CFunction’ does not name a type
> esl_wrap.cpp:767: error: ‘lua_CFunction’ does not name a type
> esl_wrap.cpp:773: error: ‘lua_CFunction’ does not name a type
> esl_wrap.cpp:850: error: ‘lua_State’ was not declared in this scope
> esl_wrap.cpp:850: error: ‘L’ was not declared in this scope
> esl_wrap.cpp:850: error: expected ‘,’ or ‘;’ before ‘{’ token
> esl_wrap.cpp:861: error: variable or field ‘SWIG_Lua_SetModule’ declared void
> esl_wrap.cpp:861: error: ‘lua_State’ was not declared in this scope
> esl_wrap.cpp:861: error: ‘L’ was not declared in this scope
> esl_wrap.cpp:861: error: expected primary-expression before ‘*’ token
> esl_wrap.cpp:861: error: ‘module’ was not declared in this scope
> esl_wrap.cpp:875: error: ‘lua_State’ was not declared in this scope
> esl_wrap.cpp:875: error: ‘L’ was not declared in this scope
> esl_wrap.cpp:876: error: expected ‘,’ or ‘;’ before ‘{’ token
> esl_wrap.cpp:887: error: ‘lua_State’ was not declared in this scope
> esl_wrap.cpp:887: error: ‘L’ was not declared in this scope
> esl_wrap.cpp:888: error: expected ‘,’ or ‘;’ before ‘{’ token
> esl_wrap.cpp:3156: error: expected `}' at end of input
> make[1]: *** [esl_wrap.o] Error 1
> make[1]: Leaving directory `/usr/src/freeswitch-snapshot/libs/esl/lua'
> make: *** [luamod] Error 2
> 
> I tried changing the includes for lua.h and lauxlib.h to a place I had them (/usr/include/lua5.1/), but then I got stuck on this error:
> 
> root at server:/usr/src/freeswitch-snapshot/libs/esl# make luamod
> make MYLIB="../libesl.a" SOLINK="-shared -Xlinker -x" CFLAGS="-I/usr/src/freeswitch-snapshot/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2 -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes" CXXFLAGS="-I/usr/src/freeswitch-snapshot/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -Wall -Werror -Wno-unused-variable" CXX_CFLAGS="" -C lua
> make[1]: Entering directory `/usr/src/freeswitch-snapshot/libs/esl/lua'
> g++  -I/usr/src/freeswitch-snapshot/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -Wall -Werror -Wno-unused-variable  -Wno-unused-function -c esl_wrap.cpp -o esl_wrap.o
> g++ -shared -Xlinker -x esl_wrap.o ../libesl.a -llua -lpthread -o ESL.so -L. 
> /usr/bin/ld: cannot find -llua
> collect2: ld returned 1 exit status
> make[1]: *** [ESL.so] Error 1
> make[1]: Leaving directory `/usr/src/freeswitch-snapshot/libs/esl/lua'
> make: *** [luamod] Error 2
> 
> I couldn't quite make sense of this. Thanks in advance.


It means it can't find liblua.so or liblua.a in the lib search path or in any -L arg passed in LDFLAGS




More information about the FreeSWITCH-users mailing list