[Freeswitch-users] Error when building ESL for PHP

Michael Jerris mike at jerris.com
Fri Oct 11 22:31:25 MSD 2013


You can just do a checkout of the master or 1.2 branch directly from git.

Mike

On Oct 11, 2013, at 2:09 PM, Sam Montour <smontour at verizon.net> wrote:

> I’d like to test the patch for now. Where can I download the patch file?
>  
> From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Michael Jerris
> Sent: Friday, October 11, 2013 1:00 PM
> To: FreeSWITCH Users Help
> Subject: Re: [Freeswitch-users] Error when building ESL for PHP
>  
> I'll wait for ken to chime in, it might not be a release yet, you can just hand patch libs/esl/php/esl_wrap.cpp real quick and it will fix the issue
>  
> On Oct 11, 2013, at 1:48 PM, Sam Montour <smontour at verizon.net> wrote:
> 
> 
> I am running FS 1.2.12. Is the patch included in FS 1.2.13? I can upgrade then. If not, where can I download the patch? Thanks.
>  
> From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Michael Jerris
> Sent: Friday, October 11, 2013 12:35 PM
> To: FreeSWITCH Users Help
> Subject: Re: [Freeswitch-users] Error when building ESL for PHP
>  
> This patch should already be in tree.  Ken Rice- Is this in a release build yet?
>  
> On Oct 11, 2013, at 1:24 PM, Richard Genthner <rgenthner at symplicity.com> wrote:
> 
> 
> 
> Sam,
> Thats a  known bug.
>  
> diff --git a/libs/esl/php/Makefile b/libs/esl/php/Makefile
> index dce8fd4..97674f8 100644
> --- a/libs/esl/php/Makefile
> +++ b/libs/esl/php/Makefile
> @@ -17,6 +17,7 @@ all: ESL.so
>  
>  esl_wrap.cpp:
>         swig -module ESL -php5 -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i
> +       sed -e 's/  char \*type_name;/  const char \*type_name;/' -i esl_wrap.cpp
>  
>  esl_wrap.o: esl_wrap.cpp
>         $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) $(WRAP_GCC_WARNING_SILENCE) -c esl_wrap.cpp -o esl_wrap.o
> diff --git a/libs/esl/php/esl_wrap.cpp b/libs/esl/php/esl_wrap.cpp
> index 8c91f25..0389cc2 100644
> --- a/libs/esl/php/esl_wrap.cpp
> +++ b/libs/esl/php/esl_wrap.cpp
> @@ -857,7 +857,7 @@ SWIG_ZTS_ConvertResourcePtr(zval *z, swig_type_info *ty, int flags TSRMLS_DC) {
>    swig_object_wrapper *value;
>    void *p;
>    int type;
> -  char *type_name;
> +  const char *type_name;
>  
>    value = (swig_object_wrapper *) zend_list_find(z->value.lval, &type);
>    if ( flags && SWIG_POINTER_DISOWN ) {
>  
> Thats the Patch for it.
> -- 
> Thanks,
> 
> Richard Genthner
> System Administrator
> Symplicity
> tel 703.351.0200 x 8051
> web www.symplicity.com
>  
> On Oct 11, 2013, at 1:16 PM, Sam Montour <smontour at verizon.net> wrote:
> 
> 
> 
> Hi all,
> I am trying to build ESL library for PHP but received the error below. I checked all pre-requisite libraries according to ESL wiki page and seem to have them all.
>  
> libxml2-dev libpcre3-dev libcurl4-openssl-dev libgmp3-dev libaspell-dev python-dev php5-dev libonig-dev libqdbm-dev libedit-dev libdb-dev.
>  
> It’s throwing an error for an invalid conversion from const char to char in esl_wrapp.cpp.
>  
> I am running FreeSWITCH Version 1.2.12+git~20130816T225403Z~8566ffa82a on Linux Mint 14.
>  
> Any idea on how to fix this error?
>  
> Thanks
>  
> root:/usr/local/src/freeswitch/libs/esl# make
> root:/usr/local/src/freeswitch/libs/esl# make phpmod-install
> make MYLIB="../libesl.a" SOLINK="-shared -Xlinker -x" CFLAGS="-I/usr/local/src/freeswitch/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2" CXXFLAGS="-I/usr/local/src/freeswitch/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC" CXX_CFLAGS="" -C php
> make[1]: Entering directory `/usr/local/src/freeswitch/libs/esl/php'
> g++  -I/usr/local/src/freeswitch/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wno-unused-label -Wno-unused-function -c esl_wrap.cpp -o esl_wrap.o
> esl_wrap.cpp: In function ‘void* SWIG_ZTS_ConvertResourcePtr(zval*, swig_type_info*, int)’:
> esl_wrap.cpp:869:65: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
> esl_wrap.cpp: In function ‘void _wrap_ESLevent_event_set(int, zval*, zval**, zval*, int)’:
> esl_wrap.cpp:1047:46: warning: format not a string literal and no format arguments [-Wformat-security]
>  
> .
> .
> .
> esl_wrap.cpp:2757:46: warning: format not a string literal and no format arguments [-Wformat-security]
> make[1]: *** [esl_wrap.o] Error 1
> make[1]: Leaving directory `/usr/local/src/freeswitch/libs/esl/php'
> make: *** [phpmod] Error 2
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131011/738c6326/attachment.html 


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