[Freeswitch-users] Re- FreeSWITCH 1.6.5 Lua version (can it be upgraded)?
Andrew Keil
andrew.keil at visytel.com
Wed Dec 2 08:27:45 MSK 2015
Michael,
Thanks for your quick response.
I am not using an rpm for the FreeSWITCH 1.6.5 install (see my setup instructions “FreeSWITCH 1.6.5 on CentOS 6.7 setup instructions” below).
However, I am using yum install for lua-devel (which I know is the old version 5.1.4).
I agree it does look like an fpic issue and I am trying to solve that now, however after 3 hours of experimenting I thought I would ask here to see if anyone has managed to get Lua running on FreeSWITCH 1.6.5 with a version 5.2.x or later.
I will let you know how I get on. It seemed simpler when Lua was inside FreeSWITCH, instead of using the system version. However, once I find out how to fix it I will respond to this thread.
Andrew
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Michael Jerris
Sent: Wednesday, 2 December 2015 4:11 PM
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
Subject: Re: [Freeswitch-users] Re- FreeSWITCH 1.6.5 Lua version (can it be upgraded)?
I would check how the rpm is doing the build. Looks like an fpic issue, Installing the dev package against a different version manually installed is a recipie for causing all kinds of issues that are a pain to fix. If you are using packages at all, don't mix it.
On Tuesday, December 1, 2015, Andrew Keil <andrew.keil at visytel.com<mailto:andrew.keil at visytel.com>> wrote:
To FreeSWITCH users,
I just noticed that since upgrading to FreeSWITCH 1.6.5 (on CentOS 6.7 or CentOS 7) that the Lua version is 5.1.4 (since when running yum install lua-devel the version installed is 5.1.4).
Also when I type: lua -v {it returns 5.1.4}
In order to try to upgrade Lua inside FreeSWITCH to version 5.2.4 I followed this procedure:
First I uninstalled lua-devel by typing: yum -y remove lua-devel
Then I then installed off lua.org<http://lua.org> a later version (in this case 5.2.4, even though they are up to 5.3.2 now):
1) cd /usr/local/src
2) curl -R -O http://www.lua.org/ftp/lua-5.2.4.tar.gz
3) cd lua-5.2.4
4) make linux test
5) make linux install
6) Tested by typing: lua -v (to check the version number) – All OK now reports 5.2.4 correctly
Next I followed the instructions below from (7) to (13) {first I made sure the freeswitch directory was removed by typing rm -rf freeswitch from the /usr/local/src directory}
Unfortunately, I received this error message from the FreeSWITCH make command:
making all mod_lua
make[4]: Entering directory `/usr/local/src/freeswitch/src/mod/languages/mod_lua'
CXXLD mod_lua.la<http://mod_lua.la>
/usr/bin/ld: /usr/local/lib/liblua.a(lapi.o): relocation R_X86_64_32 against `luaO_nilobject_' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/liblua.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mod_lua.la<http://mod_lua.la>] Error 1
make[4]: Leaving directory `/usr/local/src/freeswitch/src/mod/languages/mod_lua'
make[3]: *** [mod_lua-all] Error 1
make[3]: Leaving directory `/usr/local/src/freeswitch/src/mod'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/freeswitch/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/freeswitch'
make: *** [all] Error 2
I found this was fixed by re-installing lua-devel via: yum –y install lua-devel
However now when I continue on and complete the make && make install then start FreeSWITCH I get this error:
2015-12-02 15:19:22.341356 [CRIT] switch_loadable_module.c:1520 Error Loading module /usr/local/freeswitch/mod/mod_lua.so
**/usr/local/freeswitch/mod/mod_lua.so: undefined symbol: lua_callk**
I assume this issue is now related to the fact that lua-devel is version 5.1.4 and the installed system wide Lua is 5.2.4.
Can anyone assist me in upgrading Lua to run Lua version 5.2.x within FreeSWITCH 1.6.5?
Please note the procedure below works fine and runs Lua at version 5.1.4.
FreeSWITCH 1.6.5 on CentOS 6.7 setup instructions:
========================================================
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 lua-devel libsndfile-devel
5.1) These should install successfully
6) Note: No packages for: libvpx2*, libdb4* (so mod_vpx & mod_fsv will not be supported)
7) cd /usr/local/src
8) git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git
9) cd /usr/local/src/freeswitch
10) ./bootstrap.sh
11) vi modules.conf
11.1) comment out (ie. place '#' infront):
mod_fsv
mod_vpx
Save and close (<Esc> :wq!)
12) ./configure
13) make
14) make install
15) make cd-sounds-install
16) make cd-moh-install
17) cd /usr/local/freeswitch/conf
18) vi vars.xml
18.1) change: <X-PRE-PROCESS cmd="set" data="default_password=1234"/> { !! set it to something different !! }
Save and close (<Esc> :wq!)
19) cd /usr/local/freeswitch/conf/autoload_configs
20) vi modules.conf.xml
20.1) comment out (ie. place '<!--' infront and '-->' at the end):
mod_fsv
mod_vpx
Save and close (<Esc> :wq!)
21) cd /usr/local/freeswitch/bin
22) ./freeswitch -nonat -nonatmap
23) ... to exit from the FreeSWITCH console
Kind Regards,
Andrew Keil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20151202/fda3ae06/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list