[Freeswitch-users] PHP ESL Installation

Vishal Pai vishalmpai at gmail.com
Thu Dec 26 18:04:56 UTC 2019


Hello everyone

Season's Greetings.

I am having php7.0 installed on my Debian 9 OS Using below command

apt install php7.0 libapache2-mod-php7.0 php7.0-common php7.0-pdo
php7.0-mbstring php7.0-xmlrpc php7.0-soap php7.0-gd php7.0-xml php7.0-intl
php7.0-mysql php7.0-cli php7.0-mcrypt php7.0-ldap php7.0-zip php7.0-curl
php7.0-dev

Now when i compile esl under

/usr/src/freeswitch-1.10.1.-release/libs/esl make phpmod-install

i am getting following errors

make MYLIB=".././.libs/libesl.a" SOLINK="-shared -Xlinker -x"
CFLAGS="-I/usr/src/freeswitch-1.10.1.-release/libs/esl/src/include
-I/usr/include/uuid -I/usr/src/freeswitch-1.10.1.-release/src/include
-I/usr/src/freeswitch-1.10.1.-release/src/include
-I/usr/src/freeswitch-1.10.1.-release/libs/libteletone/src -fPIC
-ffast-math -Werror -Wno-unused-result -Wno-misleading-indentation
-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DCJSON_API_VISIBILITY=1
-DHAVE_VISIBILITY=1 -g -ggdb -DHAVE_OPENSSL"
CXXFLAGS="-I/usr/src/freeswitch-1.10.1.-release/libs/esl/src/include
-I/usr/src/freeswitch-1.10.1.-release/src/include
-I/usr/src/freeswitch-1.10.1.-release/src/include
-I/usr/src/freeswitch-1.10.1.-release/libs/libteletone/src -fPIC
-ffast-math -fvisibility=hidden -DSWITCH_API_VISIBILITY=1
-DCJSON_API_VISIBILITY=1 -DHAVE_VISIBILITY=1" CXX_CFLAGS="" -C php
make[1]: Entering directory
'/usr/src/freeswitch-1.10.1.-release/libs/esl/php'
g++ -I/usr/src/freeswitch-1.10.1.-release/libs/esl/src/include
-I/usr/src/freeswitch-1.10.1.-release/src/include
-I/usr/src/freeswitch-1.10.1.-release/src/include
-I/usr/src/freeswitch-1.10.1.-release/libs/libteletone/src -fPIC
-ffast-math -fvisibility=hidden -DSWITCH_API_VISIBILITY=1
-DCJSON_API_VISIBILITY=1 -DHAVE_VISIBILITY=1
-I/usr/src/freeswitch-1.10.1.-release/libs/esl/src/include
-I/usr/src/freeswitch-1.10.1.-release/src/include
-I/usr/src/freeswitch-1.10.1.-release/src/include
-I/usr/src/freeswitch-1.10.1.-release/libs/libteletone/src -fPIC
-ffast-math -fvisibility=hidden -DSWITCH_API_VISIBILITY=1
-DCJSON_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -I/usr/include/php/20151012
-I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM
-I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext
-I/usr/include/php/20151012/ext/date/lib -Wno-unused-label
-Wno-unused-function -c esl_wrap.cpp -o esl_wrap.o
esl_wrap.cpp:876:105: error: macro "zend_hash_update" passed 6 arguments,
but takes just 3
       zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"),
(void*)&resource, sizeof(zval), NULL);
esl_wrap.cpp:1246:50: error: macro "ZVAL_STRING" passed 3 arguments, but
takes just 2
       ZVAL_STRING(return_value, (char *)result, 1);
                                                  ^
esl_wrap.cpp:1521:50: error: macro "ZVAL_STRING" passed 3 arguments, but
takes just 2
       ZVAL_STRING(return_value, (char *)result, 1);
                                                  ^
esl_wrap.cpp:1610:50: error: macro "ZVAL_STRING" passed 3 arguments, but
takes just 2
       ZVAL_STRING(return_value, (char *)result, 1);
                                                  ^
esl_wrap.cpp:1640:50: error: macro "ZVAL_STRING" passed 3 arguments, but
takes just 2
       ZVAL_STRING(return_value, (char *)result, 1);
                                                  ^
esl_wrap.cpp:1670:50: error: macro "ZVAL_STRING" passed 3 arguments, but
takes just 2
       ZVAL_STRING(return_value, (char *)result, 1);
                                                  ^
esl_wrap.cpp:1918:50: error: macro "ZVAL_STRING" passed 3 arguments, but
takes just 2
       ZVAL_STRING(return_value, (char *)result, 1);
                                                  ^
esl_wrap.cpp:1948:50: error: macro "ZVAL_STRING" passed 3 arguments, but
takes just 2
       ZVAL_STRING(return_value, (char *)result, 1);
                                                  ^
esl_wrap.cpp: In function ‘void SWIG_landfill(zend_resource*)’:
esl_wrap.cpp:813:51: error: ‘rsrc’ was not declared in this scope
 static ZEND_RSRC_DTOR_FUNC(SWIG_landfill) { (void)rsrc; }
                                                   ^~~~
esl_wrap.cpp: In function ‘void SWIG_ZTS_SetPointerZval(zval*, void*,
swig_type_info*, int)’:
esl_wrap.cpp:836:66: error: ‘ZEND_REGISTER_RESOURCE’ was not declared in
this scope
       ZEND_REGISTER_RESOURCE(z, value, *(int *)(type->clientdata));
                                                                  ^
esl_wrap.cpp:857:29: error: ‘MAKE_STD_ZVAL’ was not declared in this scope
       MAKE_STD_ZVAL(resource);
                             ^
esl_wrap.cpp:858:73: error: ‘ZEND_REGISTER_RESOURCE’ was not declared in
this scope
       ZEND_REGISTER_RESOURCE(resource, value, *(int *)(type->clientdata));
                                                                         ^
esl_wrap.cpp:863:93: error: cannot convert ‘char*’ to ‘zend_string* {aka
_zend_string*}’ for argument ‘1’ to ‘zend_class_entry*
zend_lookup_class(zend_string*)’
         result = zend_lookup_class(classname, SWIG_PREFIX_LEN +
type_name_len, &ce TSRMLS_CC);

                 ^
esl_wrap.cpp:866:83: error: cannot convert ‘char*’ to ‘zend_string* {aka
_zend_string*}’ for argument ‘1’ to ‘zend_class_entry*
zend_lookup_class(zend_string*)’
         result = zend_lookup_class((char *)type_name, type_name_len, &ce
TSRMLS_CC);


Which doesn't get compiled successfully. Can anyone let me know what i am
doing wrong here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20191226/b8a70aba/attachment.html>


More information about the FreeSWITCH-users mailing list