php-lua icon indicating copy to clipboard operation
php-lua copied to clipboard

PHP8

Open iNiSiRe opened this issue 2 years ago • 3 comments

Few years ago I was modified some files for PHP 8 support for own needs. Seems like it could be helpful for someone.

iNiSiRe avatar Jun 18 '23 16:06 iNiSiRe

Bumping since PECL returned to deliver compiled Windows DLL's

AnrDaemon avatar Jul 21 '24 22:07 AnrDaemon

Pre build DLL available here : https://phpext.phptools.online/extension/languages/lua-416

macintoshplus avatar Jul 23 '24 05:07 macintoshplus

The prebuild is only for windows. Most servers running on linux.

I have the same issue on building:

/bin/bash /root/lua-2.0.7/libtool --tag=CC --mode=compile cc -I. -I/root/lua-2.0.7 -I/usr/include/php/20240924 -I/usr/include/php/20240924/main -I/usr/include/php/20240924/TSRM -I/usr/include/php/20240924/Zend -I/usr/include/php/20240924/ext -I/usr/include/php/20240924/ext/date/lib -I/usr/include/lua  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE    -DZEND_COMPILE_DL_EXT=1 -c /root/lua-2.0.7/lua.c -o lua.lo  -MMD -MF lua.dep -MT lua.lo
libtool: compile:  cc -I. -I/root/lua-2.0.7 -I/usr/include/php/20240924 -I/usr/include/php/20240924/main -I/usr/include/php/20240924/TSRM -I/usr/include/php/20240924/Zend -I/usr/include/php/20240924/ext -I/usr/include/php/20240924/ext/date/lib -I/usr/include/lua -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /root/lua-2.0.7/lua.c -MMD -MF lua.dep -MT lua.lo  -fPIC -DPIC -o .libs/lua.o
In file included from /usr/include/php/20240924/main/php.h:35,
                 from /root/lua-2.0.7/lua.c:24:
/root/lua-2.0.7/lua.c:825:107: error: 'ZEND_ACC_ALLOW_STATIC' undeclared here (not in a function); did you mean 'ZEND_ACC_STATIC'?
  825 |         PHP_ME(lua, getVersion,                 NULL,                                   ZEND_ACC_PUBLIC | ZEND_ACC_ALLOW_STATIC)
      |                                                                                                           ^~~~~~~~~~~~~~~~~~~~~
/usr/include/php/20240924/Zend/zend_API.h:80:201: note: in definition of macro 'ZEND_RAW_FENTRY'
   80 | _RAW_FENTRY(zend_name, name, arg_info, flags, frameless_function_infos, doc_comment)   { zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags, frameless_function_infos, doc_comment },
      |                                                                                                                                                                                             ^~~~~

/usr/include/php/20240924/main/php.h:373:25: note: in expansion of macro 'ZEND_ME'
  373 | #define PHP_ME          ZEND_ME
      |                         ^~~~~~~
/root/lua-2.0.7/lua.c:825:9: note: in expansion of macro 'PHP_ME'
  825 |         PHP_ME(lua, getVersion,                 NULL,                                   ZEND_ACC_PUBLIC | ZEND_ACC_ALLOW_STATIC)
      |         ^~~~~~
/root/lua-2.0.7/lua.c: In function 'zm_startup_lua':
/root/lua-2.0.7/lua.c:859:44: warning: assignment to 'zend_object_write_property_t' {aka 'struct _zval_struct * (*)(struct _zend_object *, struct _zend_string *, struct _zval_struct *, void **)'} from incompatible pointer type 'void (*)(zval *, zval *, zval *, void **)' {aka 'void (*)(struct _zval_struct *, struct _zval_struct *, struct _zval_struct *, void **)'} [-Wincompatible-pointer-types]
  859 |         lua_object_handlers.write_property = php_lua_write_property;
      |                                            ^
/root/lua-2.0.7/lua.c:860:44: warning: assignment to 'zend_object_read_property_t' {aka 'struct _zval_struct * (*)(struct _zend_object *, struct _zend_string *, int,  void **, struct _zval_struct *)'} from incompatible pointer type 'zval * (*)(zval *, zval *, int,  void **, zval *)' {aka 'struct _zval_struct * (*)(struct _zval_struct *, struct _zval_struct *, int,  void **, struct _zval_struct *)'} [-Wincompatible-pointer-types]
  860 |         lua_object_handlers.read_property  = php_lua_read_property;
      |                                            ^
make: *** [Makefile:204: lua.lo] Fehler 1

Bizarrus avatar Dec 30 '24 01:12 Bizarrus