[Freeswitch-users] PHP ESL Installation

Ciprian Dosoftei ciprian.dosoftei at gmail.com
Thu Dec 26 18:40:29 UTC 2019


You're using the PHP 7+ development packages against an extension designed
for PHP 5 (deprecated).

This has been addressed after 1.10.1 was released so you can try building
the PHP extension against the latest master or any commit
after 93691c60cea1c2e873b0507134815500401ca9cb.

On Thu, 26 Dec 2019 at 13:24, Vishal Pai <vishalmpai at gmail.com> wrote:

> 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.
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time
> https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://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
> https://freeswitch.com



-- 
Best Regards,
Ciprian Dosoftei

The information transmitted is intended only for the addressee and may
contain privileged and/or confidential material. If you are not the
intended recipient, kindly contact the sender and delete the message.

Any disclosure, distribution or copying of this message is strictly
prohibited without the expressed permission of the sender.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20191226/1c4a0d8d/attachment-0001.html>


More information about the FreeSWITCH-users mailing list