Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Nov 2024 12:05:19 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 9635e50da80b - 2024Q4 - devel/pecl-vld: Fix build with PHP 8.1
Message-ID:  <202411151205.4AFC5Jt8066288@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2024Q4 has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9635e50da80b2d8a88349a6084e87de92284189f

commit 9635e50da80b2d8a88349a6084e87de92284189f
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-11-15 10:09:07 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-11-15 12:05:12 +0000

    devel/pecl-vld: Fix build with PHP 8.1
    
    /bin/sh /wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0/libtool --mode=compile cc -I. -I/wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0 -I/wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0/include -I/wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0/main -I/wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DHAVE_CONFIG_H  -O2 -pipe -fstack-protector-strong -fno-strict-aliasing     -DZEND_COMPILE_DL_EXT=1 -c /wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0/srm_oparray.c -o srm_oparray.lo  -MMD -MF srm_oparray.dep -MT srm_oparray.lo
     cc -I. -I/wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0 -I/wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0/include -I/wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0/main -I/wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -DZEND_COMPILE_DL_EXT=1 -c /wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0/srm_oparray.c -MMD -MF srm_oparray.dep -MT srm_oparray.lo  -fPIC -DPIC -o .libs/srm_oparray.o
    /wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0/srm_oparray.c:1132:7: error: member reference base type 'void' is not a structure or union
     1132 |                 if (zend_string_equals_literal(Z_PTR_P(func_name), "exit")) {
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/php/Zend/zend_string.h:372:3: note: expanded from macro 'zend_string_equals_literal'
      372 |         (ZSTR_LEN(str) == sizeof(literal)-1 && !memcmp(ZSTR_VAL(str), literal, sizeof(literal) - 1))
          |          ^~~~~~~~~~~~~
    /usr/local/include/php/Zend/zend_string.h:67:31: note: expanded from macro 'ZSTR_LEN'
       67 | #define ZSTR_LEN(zstr)  (zstr)->len
          |                         ~~~~~~^ ~~~
    /wrkdirs/usr/ports/devel/pecl-vld/work-php81/vld-0.18.0/srm_oparray.c:1132:7: error: member reference base type 'void' is not a structure or union
     1132 |                 if (zend_string_equals_literal(Z_PTR_P(func_name), "exit")) {
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/include/php/Zend/zend_string.h:372:49: note: expanded from macro 'zend_string_equals_literal'
      372 |         (ZSTR_LEN(str) == sizeof(literal)-1 && !memcmp(ZSTR_VAL(str), literal, sizeof(literal) - 1))
          |                                                        ^~~~~~~~~~~~~
    /usr/local/include/php/Zend/zend_string.h:66:31: note: expanded from macro 'ZSTR_VAL'
       66 | #define ZSTR_VAL(zstr)  (zstr)->val
          |                         ~~~~~~^ ~~~
    2 errors generated.
    
    Reference:      https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/pea7acb655568_s65a4daeaf32/logs/php81-pecl-vld-0.18.0.log
                    https://pkg-status.freebsd.org/beefy22/data/141amd64-default/dfee61567d9e/logs/php81-pecl-vld-0.18.0.log
                    https://pkg-status.freebsd.org/beefy16/data/133amd64-default/ea7acb655568/logs/php81-pecl-vld-0.18.0.log
    (cherry picked from commit a40cc64580d732608c8f98931b6866b2430ea071)
---
 devel/pecl-vld/files/patch-php84 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/devel/pecl-vld/files/patch-php84 b/devel/pecl-vld/files/patch-php84
index 13d955a790ba..96c47096e8c6 100644
--- a/devel/pecl-vld/files/patch-php84
+++ b/devel/pecl-vld/files/patch-php84
@@ -65,10 +65,11 @@ Obtained from:	https://github.com/derickr/vld/commit/df1c52c4cb62e5ff31e1b72e3f1
  		opcode.opcode == ZEND_THROW ||
  #if PHP_VERSION_ID >= 80000
  		opcode.opcode == ZEND_MATCH_ERROR ||
-@@ -1094,6 +1125,48 @@ int vld_find_jumps(zend_op_array *opa, unsigned int po
+@@ -1094,6 +1125,49 @@ int vld_find_jumps(zend_op_array *opa, unsigned int po
  		jumps[0] = VLD_JMP_EXIT;
  		*jump_count = 1;
  		return 1;
++#if PHP_VERSION_ID >= 80200
 +	} else if (
 +		opcode.opcode == ZEND_INIT_FCALL
 +	) {
@@ -110,11 +111,11 @@ Obtained from:	https://github.com/derickr/vld/commit/df1c52c4cb62e5ff31e1b72e3f1
 +			*jump_count = 1;
 +			return 1;
 +		}
-+
++# endif
  #if PHP_VERSION_ID >= 70200
  	} else if (
  # if PHP_VERSION_ID >= 80000
-@@ -1233,6 +1306,7 @@ void vld_analyse_branch(zend_op_array *opa, unsigned i
+@@ -1233,6 +1307,7 @@ void vld_analyse_branch(zend_op_array *opa, unsigned i
  			break;
  		}
  
@@ -122,7 +123,7 @@ Obtained from:	https://github.com/derickr/vld/commit/df1c52c4cb62e5ff31e1b72e3f1
  		/* See if we have an exit instruction */
  		if (opa->opcodes[position].opcode == ZEND_EXIT) {
  			VLD_PRINT(1, "Exit found\n");
-@@ -1240,6 +1314,7 @@ void vld_analyse_branch(zend_op_array *opa, unsigned i
+@@ -1240,6 +1315,7 @@ void vld_analyse_branch(zend_op_array *opa, unsigned i
  			branch_info->branches[position].start_lineno = opa->opcodes[position].lineno;
  			break;
  		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411151205.4AFC5Jt8066288>