<div dir="ltr">Maybe related to: <a href="https://github.com/zdevito/terra/issues/6">https://github.com/zdevito/terra/issues/6</a> </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 12, 2013 at 6:56 PM, James Mortensen <span dir="ltr"><<a href="mailto:james.mortensen@synclio.com" target="_blank">james.mortensen@synclio.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I pulled the latest master and ran make lua-reconf and make mod_lua-install. I shutdown and restarted FreeSWITCH and still see the same output when hitting the require statement.</div>
<div><br></div><div><div>Here's the version of FreeSWITCH I'm on, for confirmation:</div><div><br></div><div>FreeSWITCH Version 1.5.8b+git~20131210T191701Z~9ec1e86574~64bit (git 9ec1e86 2013-12-10 19:17:01Z 64bit)</div>
<div><br></div><div>FreeSWITCH Started</div><div>Max Sessions [1000]</div><div>Session Rate [30]</div><div>SQL [Enabled]</div></div><div><br></div><div><br></div><div>I saw the "link against installed libraries" message after running mod_lua-install, and I'm not 100% sure I understand, but do I need to somehow link the mod_lua module to LuaXml or vice versa? </div>
<div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><br></div><div>Thanks,</div><div>James<br></div><div><br><div><br></div></div></div></div><div><div class="h5"><br><div class="gmail_quote">On Thu, Dec 12, 2013 at 4:26 PM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">try getting latest master and doing make lua-reconf then make mod_lua-install<div>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Thu, Dec 12, 2013 at 5:51 PM, James Mortensen <span dir="ltr"><<a href="mailto:james.mortensen@synclio.com" target="_blank">james.mortensen@synclio.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr">Here's what I've since discovered:<div>
<br></div><div>- Verified FreeSWITCH uses Lua 5.2.2 - see freeswitch/src/mod/languages/mod_lua/lua/lua.h </div>
<div>- Manually built and compiled the same Lua 5.2.2 for the system Lua</div>
<div>- Downloaded and compiled from source the latest LibXml using the Lua 5.2.2 development headers.</div><div><br></div><div>gcc -shared -fPIC -Wl,-E -o LuaXML_lib.so LuaXML_lib.c -I/mnt/src/lua/lua-5.2.2/src </div><div>
<br></div><div>- Copied the .so binary to /usr/local/lib/lua/5.2/LuaXML_lib.so.</div><div><br></div><div><br></div><div>Afterwards, verify the system Lua can load the library:</div><div><br></div><div>test.lua:</div><div>
<div>
<div> print('hello world from lua')</div></div><div>require('LuaXML')</div><div><div>print(_VERSION)</div><div>print("---\nREADY.")</div></div></div><div><br></div><div><div>ubuntu@fs# lua /mnt/scripts/test.lua</div>
<div>
<div>hello world from lua</div><div>Lua 5.2</div><div>---</div><div>READY.</div></div></div><div><br></div><div><br></div><div>The library loads without incident. But, when we try to run the same test script from the CLI, we get the following:</div>
<div><br></div><div><div>freeswitch@ip-10-166-245-111> lua test.lua</div><div>hello world from lua</div><div>2013-12-12 23:21:08.515046 [ERR] mod_lua.cpp:199 error loading module 'LuaXML_lib' from file '/usr/local/lib/lua/5.2/LuaXML_lib.so':</div>
<div>
<div><span style="white-space:pre-wrap">        </span>/usr/local/lib/lua/5.2/LuaXML_lib.so: undefined symbol: lua_gettop</div><div>stack traceback:</div><div><span style="white-space:pre-wrap">        </span>[C]: in ?</div><div>
<span style="white-space:pre-wrap">        </span>[C]: in function 'require'</div></div><div><span style="white-space:pre-wrap">        </span>/usr/local/share/lua/5.2/LuaXML.lua:1: in main chunk</div><div><span style="white-space:pre-wrap">        </span>[C]: in function 'require'</div>
<div><span style="white-space:pre-wrap">        </span>/opt/freeswitch-1.5.8-2013-12-11/scripts/test.lua:2: in main chunk</div><div><br></div><div>-ERR Cannot execute script</div><div><br></div><div>freeswitch@ip-10-166-245-111> </div>
</div><div><br></div><div><br></div><div><br></div><div>Now, I'm not sure what the issue is, but if the library compiles and even runs with the same Lua version that's embedded in FreeSWITCH, why would it not work when called from within FreeSWITCH?</div>
<span><font color="#888888">
<div><br></div><div><br></div></font></span><div><div class="gmail_extra"><span><font color="#888888"><div><div dir="ltr"><div><br></div><div>James</div><div><br></div></div></div></font></span><div><div>
<br><div class="gmail_quote">On Thu, Dec 12, 2013 at 12:02 AM, James Mortensen <span dir="ltr"><<a href="mailto:james.mortensen@synclio.com" target="_blank">james.mortensen@synclio.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Okay, so I figured out that the multiple Lua VMs detected is because the version of Lua was slightly different than the compiled .so file for LuaXML_lib, even though it said it was the right version. So I recompiled it and added it into the /usr/local/lib/lua/5.2 folder, and I put LuaXml.lua into /usr/local/share/lua/5.2.<div>
<br></div><div>Now, I'm seeing these undefined symbol errors and will need to tackle this next:</div><div><br></div><div><div>2013-12-12 07:41:53.395054 [ERR] mod_lua.cpp:199 error loading module 'LuaXML_lib' from file '/usr/local/lib/lua/5.2/LuaXML_lib.so':</div>
<div><span style="white-space:pre-wrap">        </span>/usr/local/lib/lua/5.2/LuaXML_lib.so: undefined symbol: lua_gettop</div><div><div>stack traceback:</div><div><span style="white-space:pre-wrap">        </span>[C]: in ?</div>
<div>
<span style="white-space:pre-wrap">        </span>[C]: in function 'require'</div><div><span style="white-space:pre-wrap">        </span>/usr/local/share/lua/5.2/LuaXml.lua:1: in main chunk</div><div><span style="white-space:pre-wrap">        </span>[C]: in function 'require'</div>
<div><span style="white-space:pre-wrap">        </span>/opt/freeswitch/scripts/parser.lua:2: in main chunk</div></div></div><span><font color="#888888"><div><br></div><div><br></div><div><br></div></font></span><div class="gmail_extra">
<span><font color="#888888"><br clear="all"><div><div dir="ltr">
<div><br></div><div>James<br></div><div><div><br></div></div></div></div></font></span><div><div>
<br><br><div class="gmail_quote">On Wed, Dec 11, 2013 at 6:26 PM, James Mortensen <span dir="ltr"><<a href="mailto:james.mortensen@synclio.com" target="_blank">james.mortensen@synclio.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Just to update this thread, I created the following Lua script:<div><br></div><div><div> print('hello world from lua')^M</div><div>print(_VERSION)</div><div>print("---\nREADY.")</div><div>
<br>
</div><div>and then ran it from the CLI. The output was: </div><div><br></div><div><div>freeswitch@fs> lua test.lua</div><div>hello world from lua</div><div>Lua 5.2</div><div>---</div><div>READY.</div><div><br></div>
<div>
Also, I found part of the answer to my problem. FreeSWITCH Lua was updated to 5.2 on Nov 12th, 2771498707c194c70cf25ad9473be66ef59cfb46, so I went ahead and grabbed the corresponding LuaXml library for version 5.2 not 5.1.</div>
</div><div><br></div><div><br></div><div><div>2013-12-12 02:12:42.615049 [ERR] mod_lua.cpp:199 multiple Lua VMs detected</div><div>stack traceback:</div><div><span style="white-space:pre-wrap">        </span>[C]: in ?</div><div>
<span style="white-space:pre-wrap">        </span>[C]: in function 'require'</div><div><span style="white-space:pre-wrap">        </span>/usr/local/share/lua/5.2/LuaXml.lua:1: in main chunk</div><div><span style="white-space:pre-wrap">        </span>[C]: in function 'require'</div>
<div><span style="white-space:pre-wrap">        </span>/opt/freeswitch/scripts/parser.lua:2: in main chunk</div></div><div><br></div><div class="gmail_extra">So now it's a matter of tracing down this error, which is where this mailing list post left off: <a href="http://freeswitch-users.2379917.n2.nabble.com/Not-really-a-Freeswitch-issue-but-td7595250.html" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/Not-really-a-Freeswitch-issue-but-td7595250.html</a></div>
<div class="gmail_extra"><br></div><div class="gmail_extra">I'll keep pounding away at this and update the list once I figure it out.</div><div class="gmail_extra"><span><font color="#888888"><br clear="all">
<div><div dir="ltr"><div><br></div><div>
James</div></div></div></font></span><div><div>
<br><br><div class="gmail_quote">On Wed, Dec 11, 2013 at 4:05 PM, James Mortensen <span dir="ltr"><<a href="mailto:james.mortensen@synclio.com" target="_blank">james.mortensen@synclio.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Hello,<div><br></div><div>I just ran git pull and rebuilt FreeSWITCH, and now Lua is unable to locate the LuaXml library.</div><div><br></div><div><div>module 'LuaXml' not found:</div><div><span style="white-space:pre-wrap">        </span>no field package.preload['LuaXml']</div>
<div><span style="white-space:pre-wrap">        </span>no file '/usr/local/lib/lua/5.2/LuaXml.so'</div><div><span style="white-space:pre-wrap">        </span>no file '/usr/local/lib/lua/5.2/loadall.so'</div><div>
<span style="white-space:pre-wrap">        </span>no file './LuaXml.so'</div><div><br></div><div>and another:</div><div><br></div><div><div>module 'LuaXml' not found:</div><div><span style="white-space:pre-wrap">        </span>no field package.preload['LuaXml']</div>
<div><span style="white-space:pre-wrap">        </span>no file './LuaXml.so'</div><div><span style="white-space:pre-wrap">        </span>no file '/usr/local/lib/lua/5.1/LuaXml.so'</div><div><span style="white-space:pre-wrap">        </span>no file '/usr/lib/x86_64-linux-gnu/lua/5.1/LuaXml.so'</div>
<div><span style="white-space:pre-wrap">        </span>no file '/usr/lib/lua/5.1/LuaXml.so'</div><div><span style="white-space:pre-wrap">        </span>no file '/usr/local/lib/lua/5.1/loadall.so'</div></div><div>
<br></div><div>Note that in /usr/local/lib/lua/5.1 there is a LuaXML_lib.so, but no LuaXml.so. </div><div><br></div><div>Those are example of one of the many error messages the system has been spitting out at me. Tt's complaining about not finding a LuaXml.so despite none actually existing on the box and despite following the instructions in the wiki.</div>
<div><br></div><div>I already followed the instructions in <a href="http://wiki.freeswitch.org/wiki/Mod_lua" target="_blank">http://wiki.freeswitch.org/wiki/Mod_lua</a> for installing LuaXml via the luarocks package manager, so since that didn't work I tried including the library manually from the luaxml website. Although the lua on the box can run the test.lua script successfully, I am not having luck in FreeSWITCH.</div>
<div><br></div><div>I also tried recompiling from scratch running the bootstrap and configure scripts. No luck.</div><div><br></div><div>I've also tried installing both Lua 5.1 and Lua 5.2. I realize the wiki shows 5.1 being used, but I already tried that and moved onto trying other things. Still working on trying to figure out what happened, but wanted to see if anyone else is having any trouble with this as well. I realize Lua is embedded in FreeSWITCH, so I'm a bit confused about why it can't find the library.</div>
<div><br></div><div>Using lua 5.2 on the box, I can run the test.lua script that users the library, what version of Lua does FreeSWITCH use? I'm not convinced it's using an embedded version of Lua based on the fact that I see it trying to use the paths from the Lua installed from apt-get.</div>
<span><font color="#888888">
<div><br></div><div><div dir="ltr"><div><br></div><div>James<br></div><div><br><div><br></div></div></div></div>
</font></span></div></div>
</blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div></div></div>
<br></div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a> ☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a> ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div>
<div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch ☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call <br>
</div><div>☎ <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a> ☎ <a href="tel:%2B19193869900" value="+19193869900" target="_blank">+19193869900</a> </div><div><br>
</div></div></div></div>
</font></span></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a> ☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a> ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div>
<div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch ☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call <br>
</div><div>☎ <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a> ☎ +19193869900 </div><div><br></div></div></div></div>
</div>