bukka / php-fann

PHP wrapper for FANN (Fast Artificial Neural Network Library)
Other
213 stars 35 forks source link

Installation from PECL: Compilation fails for PHP 8 because TSRM macros were removed #46

Closed kuzmaka closed 8 months ago

kuzmaka commented 2 years ago

When installing from PECL compilation fails for PHP 8 because TSRM macros removed from PHP 8. Installation from Github works fine.

Compilation error looks like:

In file included from /private/tmp/pear/temp/fann/fann.c:31:
/private/tmp/pear/temp/fann/php_fann.h:229:40: error: a parameter list without types is only allowed in a function definition
void php_fannconnection_register_class(TSRMLS_D);
                                       ^

See https://github.com/php/php-src/blob/PHP-8.0/UPGRADING.INTERNALS:

c. The following things have been removed from TSRM:

  • TSRMLS_DC
  • TSRMLS_D
  • TSRMLS_CC
  • TSRMLS_C
  • TSRMLS_FETCH
  • TSRMLS_FETCH_FROM_CTX
  • TSRMLS_SET_CTX
  • tsrm_new_interpreter_context
  • tsrm_set_interpreter_context
  • tsrm_free_interpreter_context
  • support for GNUPTH, SGI ST, and BETHREADS
VoDmAl commented 1 year ago

+1

bukka commented 8 months ago

Apology for very long silence. This has been actually available for some time as RC2. I just released stable version which should work with all PHP 8 versions.