Bug #5764
closed![Author: franz kelnreiter](https://www.gravatar.com/avatar/48837a19c3c8da1c11eda97d741fe60a?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: O'Neil Delpratt](https://www.gravatar.com/avatar/a0bc1766b412d8fecb16f7d304916359?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
compiling PHP extension fails
0%
Description
Hi, I am trying to compile the libsaxon-11.4 PHP extension on a CentOS machine with gcc 11.2.1 20210728 (Red Hat 11.2.1-1). Following the steps on https://www.saxonica.com/saxon-c/doc1.1/html/index.html#Installation the make script fails with the following errors:
/libsaxon-HEC-11.4/Saxon.C.API/php7_Xslt30Processor.cpp:418:73: error: 'TSRMLS_C' was not declared in this scope; did you mean 'TSRM_H'?
418 | zend_throw_exception(zend_exception_get_default(TSRMLS_C), exception->getMessage(), 0 TSRMLS_CC)
| ~ ^~~~~~~~~~
/libsaxon-HEC-11.4/Saxon.C.API/php7_Xslt30Processor.cpp:418:110: error: expected ')' before 'TSRMLS_CC'
418 | zend_throw_exception(zend_exception_get_default(TSRMLS_C), exception->getMessage(), 0 TSRMLS_CC);
| ~ ^~~~~~~~~~
/libsaxon-HEC-11.4/Saxon.C.API/php7_Xslt30Processor.cpp:542:77: error: 'ZEND_ACC_DTOR' was not declared in this scope; did you mean 'ZEND_ACC_CTO '?
542 | PHP_ME(Xslt30Processor, __destruct, nullptr, ZEND_ACC_PUBLIC | ZEND_ACC_DTOR)
| ^~~~~~~~~~~~~
The compilation process fails permanently. How can I get rid of these errors? I'd very much appreciate to get some input pointing me to the right direction. Thank you! --franz
Related issues
Updated by Michael Kay over 1 year ago
- Project changed from Saxon-CE to SaxonC
- Assignee set to O'Neil Delpratt
Updated by franz kelnreiter over 1 year ago
mybe I forgot an important information. The php running on the host is:
PHP 8.1.3 (cli) (built: Feb 16 2022 01:00:24) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.3, Copyright (c) Zend Technologies
with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans
Updated by O'Neil Delpratt over 1 year ago
- Is duplicate of Feature #4842: PHP 8 added
Updated by O'Neil Delpratt over 1 year ago
Hi, there is a bug issue against SaxonC 11 for PHP 8. Details and patch are given in the bug issue #4842.
You will need to download the zip file mentioned here: https://saxonica.plan.io/issues/4842#note-24
The zip file contains all the files needed for the PHP8 patch. Copy the files in the Saxon.C.API directory. Notice here we replace the config.m4 file.
For this PHP8 patch, the XSLT user-defined extension for PHP does not work. I am still investigating a solution for this, but it should affect you.
Please test it and let me know how it goes.
Updated by O'Neil Delpratt over 1 year ago
- Tracker changed from Support to Bug
- Found in version set to 11.4
Updated by franz kelnreiter over 1 year ago
Thank you so much, O'Neill. I got
Build complete.
Don't forget to run 'make test'.
You saved my day 😉
Please register to edit this issue