[Freeswitch-users] ESL: luamod not compiling

Neil Patel neilp at cs.stanford.edu
Tue May 18 21:33:07 PDT 2010


On Tue, May 18, 2010 at 9:26 PM, Michael Jerris <mike at jerris.com> wrote:

>
> 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
>

I don't have liblua.so. liblua.a is here:
freeswitch/src/mod/languages/mod_lua/lua/liblua.a

Is this why I have to compile lua manually? Should it be with or without
-fPIC?


>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100518/3cea19f5/attachment-0001.html 


More information about the FreeSWITCH-users mailing list