[Freeswitch-users] Mod_v8 issues - build 1.10.6

John Hardiman john.hardiman at missionlabs.co.uk
Thu Jul 1 13:18:37 UTC 2021


Hi All,

I hope you can help with something I have noticed.

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.

Ubuntu 20.04 server - latest and upto date.
FreeSWITCH build 1.10.6

Here is my debug and steps taken, but I am at a loss currently so any help would be appreciated here.

Am I missing something simple here?

Many Thanks,

John.



>From the documentation: https://freeswitch.org/confluence/display/FREESWITCH/mod_v8

"
Build/Install
mod_v8 is built and installed by default as of revision b76233266931ca0b53f3bcc589277b972d714216.

If for some reason it's not, do the following:

Uncomment languages/mod_v8 in modules.conf in your src directory (make it always build and install mod_v8)
Run 'make mod_v8-install' to make and install just the v8 module
Edit conf/autoload_configs/modules.conf.xml in your FreeSWITCH(tm) install directory to load mod_v8
In fs_cli, run "load mod_v8"
"

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:

"-ERR javascript Command not found!"

Running through the 'make mod_v8-install' throws some errors about:
"
making install mod_v8
make[2]: Entering directory '/usr/src/freeswitch-1.10.6.-release/src/mod/languages/mod_v8'
make  install-am
make[3]: Entering directory '/usr/src/freeswitch-1.10.6.-release/src/mod/languages/mod_v8'
  CXX      mod_v8_la-mod_v8.lo
In file included from mod_v8.h:36,
                 from mod_v8.cpp:68:
./include/javascript.hpp:35:10: fatal error: v8.h: No such file or directory
   35 | #include <v8.h>
      |          ^~~~~~
compilation terminated.
"

Trying to recompile with: "sudo ./configure -C" throws the below errors:

"
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
root at freeswitch:/usr/src/freeswitch-1.10.6.-release#<mailto:root at freeswitch:/usr/src/freeswitch-1.10.6.-release#>
"

On Ubunutu and Debian this is libv8-dev and is installed.

root at freeswitch:/usr/src/freeswitch-1.10.6.-release#<mailto:root at freeswitch:/usr/src/freeswitch-1.10.6.-release#> sudo apt-get install libv8-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libnode-dev' instead of 'libv8-dev'
libnode-dev is already the newest version (10.19.0~dfsg-3ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
root at freeswitch:/usr/src/freeswitch-1.10.6.-release#<mailto:root at freeswitch:/usr/src/freeswitch-1.10.6.-release#>






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20210701/d37a9414/attachment.html>


More information about the FreeSWITCH-users mailing list