componere icon indicating copy to clipboard operation
componere copied to clipboard

Install from sources error with PHP 8.1.0

Open themaric opened this issue 3 years ago • 2 comments

Tried to install Componere from sources with the latest PHP version, but it looks like not compatible.

➜  componere git:(develop) ✗ make
/bin/bash /home/vagrant/componere/libtool --mode=compile cc -I. -I/home/vagrant/componere -I/home/vagrant/componere/include -I/home/vagrant/componere/main -I/home/vagrant/componere -I/usr/include/php/20210902 -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext -I/usr/include/php/20210902/ext/date/lib -I/home/vagrant/componere  -DHAVE_CONFIG_H  -g -O2    -c /home/vagrant/componere/src/definition.c -o src/definition.lo  -MMD -MF src/definition.dep -MT src/definition.lo
libtool: compile:  cc -I. -I/home/vagrant/componere -I/home/vagrant/componere/include -I/home/vagrant/componere/main -I/home/vagrant/componere -I/usr/include/php/20210902 -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext -I/usr/include/php/20210902/ext/date/lib -I/home/vagrant/componere -DHAVE_CONFIG_H -g -O2 -c /home/vagrant/componere/src/definition.c -MMD -MF src/definition.dep -MT src/definition.lo  -fPIC -DPIC -o src/.libs/definition.o
/home/vagrant/componere/src/definition.c: In function ‘zim_Componere_Abstract_Definition_addTrait’:
/home/vagrant/componere/src/definition.c:852:9: error: too few arguments to function ‘zend_do_link_class’
  852 |         zend_do_link_class(o->ce, NULL);
      |         ^~~~~~~~~~~~~~~~~~
In file included from /home/vagrant/componere/src/definition.c:30:
/usr/include/php/20210902/Zend/zend_inheritance.h:33:28: note: declared here
   33 | ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_name, zend_string *key);
      |                            ^~~~~~~~~~~~~~~~~~
/home/vagrant/componere/src/definition.c: In function ‘zim_Componere_Definition_addProperty’:
/home/vagrant/componere/src/definition.c:970:11: error: too few arguments to function ‘zend_do_link_class’
  970 |           zend_do_link_class(o->ce, NULL);
      |           ^~~~~~~~~~~~~~~~~~
In file included from /home/vagrant/componere/src/definition.c:30:
/usr/include/php/20210902/Zend/zend_inheritance.h:33:28: note: declared here
   33 | ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_name, zend_string *key);
      |                            ^~~~~~~~~~~~~~~~~~
make: *** [Makefile:207: src/definition.lo] Error 1

I would be more than grateful if you could check this compatibility issue when you can grab some time.

Thanks!

themaric avatar Dec 16 '21 10:12 themaric

I also met issue on pecl install. ( PHP 8.1.2 )

$ sudo pecl install componere
downloading componere-3.1.2.tgz ...
/tmp/pear/temp/componere/src/definition.c:852:9: error: too few arguments to function ‘zend_do_link_class’
  852 |         zend_do_link_class(o->ce, NULL);
      |         ^~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/componere/src/definition.c:30:
/usr/include/php/20210902/Zend/zend_inheritance.h:33:28: note: declared here
   33 | ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_name, zend_string *key);
      |                            ^~~~~~~~~~~~~~~~~~
/tmp/pear/temp/componere/src/definition.c: In function ‘zim_Componere_Definition_addProperty’:
/tmp/pear/temp/componere/src/definition.c:970:25: error: too few arguments to function ‘zend_do_link_class’
  970 |                         zend_do_link_class(o->ce, NULL);
      |                         ^~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/componere/src/definition.c:30:
/usr/include/php/20210902/Zend/zend_inheritance.h:33:28: note: declared here
   33 | ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_name, zend_string *key);
      |                            ^~~~~~~~~~~~~~~~~~
make: *** [Makefile:207: src/definition.lo] Error 1
ERROR: `make' failed

sasezaki avatar Aug 11 '22 08:08 sasezaki

ZEND_API zend_do_link_class was changed at this commit. ( 10 Feb 2021 ) https://github.com/php/php-src/commit/4b79dba93202ed5640dff317046ce2fdd42e1d82#diff-3b8454f5974b06776ddcaea3563b410a25238313653c28a0cdfcd6f93645aa3cR33

I don't have idea how to update against this api change.

sasezaki avatar Aug 11 '22 08:08 sasezaki