Error when building ESL for PHP

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error when building ESL for PHP

Sami Montour

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


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error when building ESL for PHP

Richard Genthner
<base href="x-msg://2142/">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 <[hidden email]> 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
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

signature.asc (507 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error when building ESL for PHP

Michael Jerris
Administrator
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 <[hidden email]> wrote:

<base href="x-msg://2142/">
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 <[hidden email]> 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


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error when building ESL for PHP

Sami Montour
<base href="x-msg://2142/">

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: [hidden email] [mailto:[hidden email]] 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 <[hidden email]> 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 <[hidden email]> 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

 


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error when building ESL for PHP

Michael Jerris
Administrator
<base href="x-msg://2142/">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 <[hidden email]> 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: [hidden email] [mailto:freeswitch-[hidden email]] 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 <[hidden email]> 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 <[hidden email]> 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
 
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error when building ESL for PHP

Sami Montour
<base href="x-msg://2142/">

I’d like to test the patch for now. Where can I download the patch file?

 

From: [hidden email] [mailto:[hidden email]] 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 <[hidden email]> 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: [hidden email] [mailto:freeswitch-[hidden email]] 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 <[hidden email]> 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 <[hidden email]> 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

 

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

 


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error when building ESL for PHP

Michael Jerris
Administrator
<base href="x-msg://2142/">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 <[hidden email]> wrote:

I’d like to test the patch for now. Where can I download the patch file?
 
From: [hidden email] [mailto:freeswitch-[hidden email]] 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 <[hidden email]> 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: [hidden email] [mailto:freeswitch-[hidden email]] 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 <[hidden email]> 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 <[hidden email]> 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


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error when building ESL for PHP

Sami Montour
<base href="x-msg://2142/">

Thanks Mike.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Michael Jerris
Sent: Friday, October 11, 2013 1:31 PM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Error when building ESL for PHP

 

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 <[hidden email]> wrote:



I’d like to test the patch for now. Where can I download the patch file?

 

From: [hidden email] [mailto:freeswitch-[hidden email]] 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 <[hidden email]> 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: [hidden email] [mailto:freeswitch-[hidden email]] 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 <[hidden email]> 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 <[hidden email]> 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

 


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Loading...