Compiling phpmod issue

bhrugu

New Member
Aug 1, 2024
4
0
1
33
I have download the latest Freeswitch 1.10.12-release.
make and make install works perfectly.
I can run freeswitch and tested various features. All works.
Now I want to compile/build esl phpmod.
so I just go to src/libs/esl and fire make phpmod but getting bellow error.

I have php 8.1.29 version and using ubuntu 22

make MYLIB=".././.libs/libesl.a" SOLINK="-shared -Xlinker -x" CFLAGS="-I/usr/local/src/freeswitch-1.10.12.-release/libs/esl/src/include -I/usr/include/uuid -I/usr/local/src/freeswitch-1.10.12.-release/src/include -I/usr/local/src/freeswitch-1.10.12.-release/src/include -I/usr/local/src/freeswitch-1.10.12.-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/local/src/freeswitch-1.10.12.-release/libs/esl/src/include -I/usr/local/src/freeswitch-1.10.12.-release/src/include -I/usr/local/src/freeswitch-1.10.12.-release/src/include -I/usr/local/src/freeswitch-1.10.12.-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/local/src/freeswitch-1.10.12.-release/libs/esl/php'
g++ -I/usr/local/src/freeswitch-1.10.12.-release/libs/esl/src/include -I/usr/local/src/freeswitch-1.10.12.-release/src/include -I/usr/local/src/freeswitch-1.10.12.-release/src/include -I/usr/local/src/freeswitch-1.10.12.-release/libs/libteletone/src -fPIC -ffast-math -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DCJSON_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -I/usr/local/src/freeswitch-1.10.12.-release/libs/esl/src/include -I/usr/local/src/freeswitch-1.10.12.-release/src/include -I/usr/local/src/freeswitch-1.10.12.-release/src/include -I/usr/local/src/freeswitch-1.10.12.-release/libs/libteletone/src -fPIC -ffast-math -fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DCJSON_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -Wno-unused-label -Wno-unused-function -c esl_wrap.cpp -o esl_wrap.o
esl_wrap.cpp: In function ‘int SWIG_ConvertPtr(zval*, void**, swig_type_info*, int)’:
esl_wrap.cpp:938:54: error: cannot convert ‘zval*’ {aka ‘_zval_struct*’} to ‘zend_object*’ {aka ‘_zend_object*’} in argument passing
938 | HashTable * ht = Z_OBJ_HT_P(z)->get_properties(z);
| ^
| |
| zval* {aka _zval_struct*}
esl_wrap.cpp: At global scope:
esl_wrap.cpp:3076:2: error: ‘ZEND_ARG_PASS_INFO’ was not declared in this scope; did you mean ‘ZEND_ARG_OBJ_INFO’?
3076 | ZEND_ARG_PASS_INFO(0)
| ^~~~~~~~~~~~~~~~~~
| ZEND_ARG_OBJ_INFO
esl_wrap.cpp:3077:2: error: expected ‘}’ before ‘ZEND_ARG_PASS_INFO’
3077 | ZEND_ARG_PASS_INFO(0)
| ^~~~~~~~~~~~~~~~~~
In file included from esl_wrap.cpp:749:
/usr/include/php/20230831/Zend/zend_API.h:211:54: note: to match this ‘{’
211 | static const zend_internal_arg_info name[] = { \
| ^
esl_wrap.cpp:3075:1: note: in expansion of macro ‘ZEND_BEGIN_ARG_INFO_EX’
3075 | ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_00, 0, 0, 0)
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/20230831/Zend/zend_API.h:215:41: error: expected declaration before ‘}’ token
215 | #define ZEND_END_ARG_INFO() };
| ^
esl_wrap.cpp:3078:1: note: in expansion of macro ‘ZEND_END_ARG_INFO’
3078 | ZEND_END_ARG_INFO()
| ^~~~~~~~~~~~~~~~~
esl_wrap.cpp:3080:2: error: ‘ZEND_ARG_PASS_INFO’ was not declared in this scope; did you mean ‘ZEND_ARG_OBJ_INFO’?
3080 | ZEND_ARG_PASS_INFO(0)
| ^~~~~~~~~~~~~~~~~~
| ZEND_ARG_OBJ_INFO
esl_wrap.cpp:3083:2: error: ‘ZEND_ARG_PASS_INFO’ was not declared in this scope; did you mean ‘ZEND_ARG_OBJ_INFO’?
3083 | ZEND_ARG_PASS_INFO(0)
| ^~~~~~~~~~~~~~~~~~
| ZEND_ARG_OBJ_INFO
esl_wrap.cpp:3084:2: error: expected ‘}’ before ‘ZEND_ARG_PASS_INFO’
3084 | ZEND_ARG_PASS_INFO(0)
| ^~~~~~~~~~~~~~~~~~
In file included from esl_wrap.cpp:749:
/usr/include/php/20230831/Zend/zend_API.h:211:54: note: to match this ‘{’
211 | static const zend_internal_arg_info name[] = { \
| ^
esl_wrap.cpp:3082:1: note: in expansion of macro ‘ZEND_BEGIN_ARG_INFO_EX’
3082 | ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_000, 0, 0, 0)
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/20230831/Zend/zend_API.h:215:41: error: expected declaration before ‘}’ token
215 | #define ZEND_END_ARG_INFO() };
| ^
esl_wrap.cpp:3086:1: note: in expansion of macro ‘ZEND_END_ARG_INFO’
3086 | ZEND_END_ARG_INFO()
| ^~~~~~~~~~~~~~~~~
esl_wrap.cpp:3088:2: error: ‘ZEND_ARG_PASS_INFO’ was not declared in this scope; did you mean ‘ZEND_ARG_OBJ_INFO’?
3088 | ZEND_ARG_PASS_INFO(0)
| ^~~~~~~~~~~~~~~~~~
| ZEND_ARG_OBJ_INFO
esl_wrap.cpp:3089:2: error: expected ‘}’ before ‘ZEND_ARG_PASS_INFO’
3089 | ZEND_ARG_PASS_INFO(0)
| ^~~~~~~~~~~~~~~~~~
In file included from esl_wrap.cpp:749:
/usr/include/php/20230831/Zend/zend_API.h:211:54: note: to match this ‘{’
211 | static const zend_internal_arg_info name[] = { \
| ^
esl_wrap.cpp:3087:1: note: in expansion of macro ‘ZEND_BEGIN_ARG_INFO_EX’
3087 | ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_0000, 0, 0, 0)
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/20230831/Zend/zend_API.h:215:41: error: expected declaration before ‘}’ token
215 | #define ZEND_END_ARG_INFO() };
| ^
esl_wrap.cpp:3092:1: note: in expansion of macro ‘ZEND_END_ARG_INFO’
3092 | ZEND_END_ARG_INFO()
| ^~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:720: esl_wrap.o] Error 1