<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi All, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I hope you can help with something I have noticed.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Current build is below and I am looking to use some scripting with v8 (javascript is required here), but I am hitting a whole host of issues with just trying to get mod_v8 installed. The rest of the software I have tried
is perfect and has been for a few days.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Ubuntu 20.04 server – latest and upto date.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">FreeSWITCH build 1.10.6<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Here is my debug and steps taken, but I am at a loss currently so any help would be appreciated here.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Am I missing something simple here?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Many Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">John. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">From the documentation: <a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_v8">
https://freeswitch.org/confluence/display/FREESWITCH/mod_v8</a> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Build/Install<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">mod_v8 is built and installed by default as of revision b76233266931ca0b53f3bcc589277b972d714216.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">If for some reason it's not, do the following:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Uncomment languages/mod_v8 in modules.conf in your src directory (make it always build and install mod_v8)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Run 'make mod_v8-install' to make and install just the v8 module<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Edit conf/autoload_configs/modules.conf.xml in your FreeSWITCH™ install directory to load mod_v8<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In fs_cli, run "load mod_v8"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">If you uncomment it from the autoload_configs/modules.conf.xml and reloadxml then you won't get any errors, but as the module doesn't exist, if you try to do a javascript command from fs_cli it will give you an error:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">"-ERR javascript Command not found!"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Running through the 'make mod_v8-install' throws some errors about:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">making install mod_v8<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">make[2]: Entering directory '/usr/src/freeswitch-1.10.6.-release/src/mod/languages/mod_v8'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">make install-am<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">make[3]: Entering directory '/usr/src/freeswitch-1.10.6.-release/src/mod/languages/mod_v8'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> CXX mod_v8_la-mod_v8.lo<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In file included from mod_v8.h:36,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> from mod_v8.cpp:68:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">./include/javascript.hpp:35:10: fatal error: v8.h: No such file or directory<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> 35 | #include <v8.h><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> | ^~~~~~<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">compilation terminated.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Trying to recompile with: "sudo ./configure -C" throws the below errors:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">checking for v8-6.1_static >= 6.1.298... checking for v8fs_static >= 6.1.298... checking for v8 >= 6.1.298... configure: error: You need to either install libv8-6.1-dev (>= 6.1.298), libv8fs-dev (>= 6.1.298) or disable
mod_v8 in modules.conf<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="mailto:root@freeswitch:/usr/src/freeswitch-1.10.6.-release#">root@freeswitch:/usr/src/freeswitch-1.10.6.-release#</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">On Ubunutu and Debian this is libv8-dev and is installed.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="mailto:root@freeswitch:/usr/src/freeswitch-1.10.6.-release#">root@freeswitch:/usr/src/freeswitch-1.10.6.-release#</a> sudo apt-get install libv8-dev<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Reading package lists... Done<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Building dependency tree<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Reading state information... Done<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Note, selecting 'libnode-dev' instead of 'libv8-dev'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">libnode-dev is already the newest version (10.19.0~dfsg-3ubuntu1).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="mailto:root@freeswitch:/usr/src/freeswitch-1.10.6.-release#">root@freeswitch:/usr/src/freeswitch-1.10.6.-release#</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>