Project

Profile

Help

Bug #5764

closed

compiling PHP extension fails

Added by franz kelnreiter over 1 year ago. Updated over 1 year ago.

Status:
Duplicate
Priority:
Low
Category:
-
Start date:
2022-12-14
Due date:
% Done:

0%

Estimated time:
Found in version:
11.4
Fixed in version:
Platforms:

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

Is duplicate of SaxonC - Feature #4842: PHP 8ClosedO'Neil Delpratt2020-11-26

Actions
Actions #1

Updated by Michael Kay over 1 year ago

  • Project changed from Saxon-CE to SaxonC
  • Assignee set to O'Neil Delpratt
Actions #2

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

Actions #3

Updated by O'Neil Delpratt over 1 year ago

Actions #4

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.

Actions #5

Updated by O'Neil Delpratt over 1 year ago

  • Status changed from New to Duplicate
Actions #6

Updated by O'Neil Delpratt over 1 year ago

  • Tracker changed from Support to Bug
  • Found in version set to 11.4
Actions #7

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

Also available in: Atom PDF