[Freeswitch-users] How to get later versions of Lua to run on FreeSWITCH 1.6.5 running on CentOS 6 or CentOS 7

Sergey Safarov s.safarov at gmail.com
Wed Dec 2 22:29:55 MSK 2015


To install latest version of package i recommend port package from fedora
repo (for Lua package
http://dl.fedoraproject.org/pub/fedora/linux/development/23/source/SRPMS/l/)

To make rebuild please use mock utility
mock -r epel-6-x86_64 --rebuild ./lua-5.3.0-4.fc23.src.rpm

Then install other required dependences to build FS. If required make
newest packages version from fedora repo. Instruction how to build most of
dependences is located at
https://freeswitch.org/confluence/display/FREESWITCH/Creating+RPM+repositary

To make FS srpm execute commands
git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git
mv freeswitch freeswitch-1.7.0
mkdir -p ~/rpmbuild/SOURCES
mkdir -p ~/rpmbuild/SPEC
tar cjf ~/rpmbuild/SOURCES/freeswitch-1.7.0.tar.bz2 freeswitch-1.7.0
cp freeswitch-1.7.0/freeswitch.spec ~/rpmbuild/SPECS/
cd ~/rpmbuild/SOURCES
wget
http://ftp.nsysu.edu.tw/FreeBSD/ports/distfiles/freeswitch/libmemcached-0.32.tar.gz
wget
http://ftp.nsysu.edu.tw/FreeBSD/ports/distfiles/freeswitch/communicator_semi_6000_20080321.tar.gz
wget
http://sourceforge.net/projects/cmusphinx/files/sphinxbase/0.8/sphinxbase-0.8.tar.gz
wget
http://sourceforge.net/projects/cmusphinx/files/pocketsphinx/0.8/pocketsphinx-0.8.tar.gz
wget
https://github.com/mongodb/mongo-c-driver/releases/download/1.1.0/mongo-c-driver-1.1.0.tar.gz
wget http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2
rpmbuild -bs ~/rpmbuild/SPECS/freeswitch.spec
mock -r epel-6-x86_64 --rebuild
~/rpmbuild/SRPMS/freeswitch-1.7.0-1.el7.centos.src.rpm

Late will be long process. If error will arise write me directly.

Sergey






On Wed, Dec 2, 2015 at 12:29 PM, Andrew Keil <andrew.keil at visytel.com>
wrote:

> To all,
>
>
>
> After much testing I have managed to get Lua 5.3.2 (the latest Lua
> version, however this will work with all the Lua 5.2.x versions) to run
> inside FreeSWITCH 1.6.5 on CentOS 6.7 (however the same should work inside
> CentOS 7).
>
>
>
> Here is what I have done.  Please make any comments and improvements to
> this procedure.
>
>
>
> *** One part I am not happy with is that I have to manually copy the
> liblua.so from /usr/local/lib to /usr/local/freeswitch/lib (see point 22
> below).  For some reason FreeSWITCH does not find the shared library inside
> /usr/local/lib.  Maybe there is a setting for this I can change as the
> other option is to put liblua.so inside /usr/lib64 where “yum install
> lua-devel” puts the liblua.so for Lua version 5.1.4, however I do not like
> this concept. ***
>
>
>
> Please note: Currently mod_fsv and mod_vpx (both are relating to
> FreeSWITCH video features) are not supported inside these instructions,
> however if you are wanting to move off 1.4.x (since this is going
> end-of-life in 2016 at some stage) then this could at least be a very good
> first step, especially if upgrading to Centos 7 is not possible based on
> your current environment setup.
>
>
>
> This is based on a fresh installation of CentOS 6.7 (
> *CentOS-6.7-x86_64-bin-DVD1.iso*).  In my case I ran a default setup
> selecting *Software Development Workstation*.
>
>
>
> Logged in as *root* user.
>
>
>
> 1) Make sure yum update is run and CentOS is up-to-date
>
>
>
> 2) {optional} Inside Terminal window select Edit Profile Preferences and
> select "Use custom default terminal size" and make it 160 x 60.  Close
> terminal and re-open for the change to take effect.
>
>
>
> 3) yum -y install epel-release
>
>
>
> 4) yum -y install git gcc-c++ autoconf automake libtool wget python
> ncurses-devel zlib-devel libjpeg-devel openssl-devel sqlite-devel
> libcurl-devel libxml2-devel libidn-devel
>
> 4.1) These should be already installed and up-to-date
>
>
>
> 5) yum -y install e2fsprogs-devel pcre-devel speex-devel ldns-devel
> libedit-devel libyuv-devel opus-devel libvpx-devel unbound-devel
> libuuid-devel libsndfile-devel
>
> 5.1) These should install successfully
>
> 5.2) Originally I also installed lua-devel, so if this has already been
> installed then remove it by: yum -y remove lua-devel
>
>
>
> 6) Note: No packages for: libvpx2*, libdb4* (so mod_vpx & mod_fsv will not
> be supported)
>
>
>
> 7) Setup Lua 5.3.2 here (obviously you can select your own version):
>
> 7.1) cd /usr/local/src
>
> 7.2) curl -R -O http://www.lua.org/ftp/lua-5.3.2.tar.gz
>
> 7.3) tar zxf lua-5.3.2.tar.gz
>
> 7.4) cd /usr/local/src/lua-5.3.2
>
> 7.5) vi Makefile
>
>                 Change: TO_LIB= liblua.a
>
>                 To be: TO_LIB= liblua.a liblua.so
>
> Save and close (<Esc> :wq!)
>
> 7.6) cd /usr/local/src/lua-5.3.2/src
>
> 7.7) vi Makefile
>
>                 Change: CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2
> $(SYSCFLAGS) $(MYCFLAGS)
>
>                 To be: CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2
> $(SYSCFLAGS) $(MYCFLAGS) -fPIC
>
>                 Add under: LUA_A= liblua.a
>
> The line: LUA_SO= liblua.so
>
> Change: ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
>
>                 To be: ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
>
> Add under: $(LUAC_T): $(LUAC_O) $(LUA_A)
>
>                 $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
>
> The lines: $(LUA_SO): $(CORE_O) $(LIB_O)
>
>                 $(CC) -o $@ -shared $?
>
> Save and close (<Esc> :wq!)
>
> 7.8) make linux test
>
> 7.9) make linux install
>
>
>
> 8) cd /usr/local/src
>
>
>
> 9) git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git
>
>
>
> 10) cd /usr/local/src/freeswitch
>
>
>
> 11) ./bootstrap.sh
>
>
>
> 12) vi modules.conf
>
> 12.1) comment out (ie. place '#' infront):
>
> mod_fsv
>
> mod_vpx
>
> Save and close (<Esc> :wq!)
>
>
>
> 13) ./configure
>
>
>
> 14) make
>
>
>
> 15) make install
>
>
>
> 16) make cd-sounds-install
>
>
>
> 17) make cd-moh-install
>
>
>
> 18) cd /usr/local/freeswitch/conf
>
>
>
> 19) vi vars.xml
>
> 19.1) change:  <X-PRE-PROCESS cmd="set" data="default_password=1234"/> {
> !! set it to something different !! }
>
>     Save and close (<Esc> :wq!)
>
>
>
> 20) cd /usr/local/freeswitch/conf/autoload_configs
>
>
>
> 21) vi modules.conf.xml
>
> 21.1) comment out (ie. place '<!--' infront and '-->' at the end):
>
> mod_fsv
>
> mod_vpx
>
> Save and close (<Esc> :wq!)
>
>
>
> 22) cp /usr/local/lib/liblua.so /usr/local/freeswitch/lib/.
>
>
>
> 23) cd /usr/local/freeswitch/bin
>
>
>
> 24) ./freeswitch -nonat -nonatmap
>
>
>
> 25) ... to exit from the FreeSWITCH console
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> 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/20151202/dc54fb0f/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list