problems with php7.4
shilik opened this issue · 2 comments
shilik commented
When I upgraded ubuntu 18.04 to ubuntu 20.04,the php version is also upgrade from 7.2 to 7.4.
However php-mecab no more worked. Have tried various methods but none of them worked. any suggestion?
plutocrat commented
Can't compile on PHP 7.4. When running the 'make' stage, I get a heap of error messages.
make
/bin/bash /root/php-mecab-master/mecab/libtool --mode=compile cc -I. -I/root/php-mecab-master/mecab -I/root/php-mecab-master/mecab/include -I/root/php-mecab-master/mecab/main -I/root/php-mecab-master/mecab -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/php-mecab-master/mecab/mecab7.c -o mecab7.lo
libtool: compile: cc -I. -I/root/php-mecab-master/mecab -I/root/php-mecab-master/mecab/include -I/root/php-mecab-master/mecab/main -I/root/php-mecab-master/mecab -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/php-mecab-master/mecab/mecab7.c -fPIC -DPIC -o .libs/mecab7.o
/root/php-mecab-master/mecab/mecab7.c:157:1: warning: parameter names (without types) in function declaration
157 | php_mecab_ctor(TSRMLS_D);
| ^~~~~~~~~~~~~~
/root/php-mecab-master/mecab/mecab7.c:161:33: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
161 | php_mecab_dtor(php_mecab *mecab TSRMLS_DC);
| ^~~~~~~~~
/root/php-mecab-master/mecab/mecab7.c:165:57: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
165 | php_mecab_set_string(php_mecab *mecab, zend_string *str TSRMLS_DC);
| ^~~~~~~~~
/root/php-mecab-master/mecab/mecab7.c:169:1: warning: parameter names (without types) in function declaration
169 | php_mecab_node_ctor(TSRMLS_D);
| ^~~~~~~~~~~~~~~~~~~
/root/php-mecab-master/mecab/mecab7.c:173:42: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
173 | php_mecab_node_dtor(php_mecab_node *node TSRMLS_DC);
| ^~~~~~~~~
..... etc. Until
/root/php-mecab-master/mecab/mecab7.c:148:8: note: in expansion of macro ‘PHP_METHOD’
148 | static PHP_METHOD(MeCab_Path, __get);
| ^~~~~~~~~~
/usr/include/php/20200930/Zend/zend_API.h:73:58: warning: ‘zim_MeCab_Path___isset’ used but never defined
73 | #define ZEND_METHOD(classname, name) ZEND_NAMED_FUNCTION(zim_##classname##_##name)
| ^~~~
/usr/include/php/20200930/Zend/zend_API.h:71:55: note: in definition of macro ‘ZEND_NAMED_FUNCTION’
71 | #define ZEND_NAMED_FUNCTION(name) void ZEND_FASTCALL name(INTERNAL_FUNCTION_PARAMETERS)
| ^~~~
/usr/include/php/20200930/main/php.h:382:24: note: in expansion of macro ‘ZEND_METHOD’
382 | #define PHP_METHOD ZEND_METHOD
| ^~~~~~~~~~~
/root/php-mecab-master/mecab/mecab7.c:149:8: note: in expansion of macro ‘PHP_METHOD’
149 | static PHP_METHOD(MeCab_Path, __isset);
| ^~~~~~~~~~
make: *** [Makefile:209: mecab7.lo] Error 1