Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.25.0RC1] build broken with PHP 7.x #14436

Closed
remicollet opened this issue Oct 17, 2023 · 2 comments
Closed

[3.25.0RC1] build broken with PHP 7.x #14436

remicollet opened this issue Oct 17, 2023 · 2 comments
Assignees

Comments

@remicollet
Copy link

package.xml still claims minimal supported version is 7.0.0 but build is broken, lot of macro are only defined in 8.x

  • RETURN_COPY
  • RETURN_COPY_VALUE
  • ZVAL_OBJ_COPY
  • RETURN_OBJ_COPY

And there is also a lot of incompatible pointer warning

otection -fcf-protection -c /home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/array.c  -fPIC -DPIC -o .libs/array.o
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/array.c: In function 'Array_ModuleInit':
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/array.c:661:14: warning: assignment to 'zend_object_compare_zvals_t' {aka 'int (*)(struct _zval_struct *, struct _zval_struct *, struct _zval_struct *)'} from incompatible pointer type 'int (*)(zval *, zval *)' {aka 'int (*)(struct _zval_struct *, struct _zval_struct *)'} [-Wincompatible-pointer-types]
  661 |   h->compare = RepeatedField_compare_objects;
      |              ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/array.c:662:16: warning: assignment to 'zend_object_clone_obj_t' {aka 'struct _zend_object * (*)(struct _zval_struct *)'} from incompatible pointer type 'zend_object * (*)(zend_object *)' {aka 'struct _zend_object * (*)(struct _zend_object *)'} [-Wincompatible-pointer-types]
  662 |   h->clone_obj = RepeatedField_clone_obj;
      |                ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/array.c:663:21: warning: assignment to 'zend_object_get_properties_t' {aka 'struct _zend_array * (*)(struct _zval_struct *)'} from incompatible pointer type 'HashTable * (*)(zend_object *)' {aka 'struct _zend_array * (*)(struct _zend_object *)'} [-Wincompatible-pointer-types]
  663 |   h->get_properties = RepeatedField_GetProperties;
      |                     ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/array.c:664:27: warning: assignment to 'zend_object_get_property_ptr_ptr_t' {aka 'struct _zval_struct * (*)(struct _zval_struct *, struct _zval_struct *, int,  void **)'} from incompatible pointer type 'zval * (*)(zend_object *, zend_string *, int,  void **)' {aka 'struct _zval_struct * (*)(struct _zend_object *, struct _zend_string *, int,  void **)'} [-Wincompatible-pointer-types]
  664 |   h->get_property_ptr_ptr = RepeatedField_GetPropertyPtrPtr;
      |                           ^


/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/map.c: In function 'Map_ModuleInit':
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/map.c:658:14: warning: assignment to 'zend_object_compare_zvals_t' {aka 'int (*)(struct _zval_struct *, struct _zval_struct *, struct _zval_struct *)'} from incompatible pointer type 'int (*)(zval *, zval *)' {aka 'int (*)(struct _zval_struct *, struct _zval_struct *)'} [-Wincompatible-pointer-types]
  658 |   h->compare = MapField_compare_objects;
      |              ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/map.c:659:16: warning: assignment to 'zend_object_clone_obj_t' {aka 'struct _zend_object * (*)(struct _zval_struct *)'} from incompatible pointer type 'zend_object * (*)(zend_object *)' {aka 'struct _zend_object * (*)(struct _zend_object *)'} [-Wincompatible-pointer-types]
  659 |   h->clone_obj = MapField_clone_obj;
      |                ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/map.c:660:21: warning: assignment to 'zend_object_get_properties_t' {aka 'struct _zend_array * (*)(struct _zval_struct *)'} from incompatible pointer type 'HashTable * (*)(zend_object *)' {aka 'struct _zend_array * (*)(struct _zend_object *)'} [-Wincompatible-pointer-types]
  660 |   h->get_properties = Map_GetProperties;
      |                     ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/map.c:661:27: warning: assignment to 'zend_object_get_property_ptr_ptr_t' {aka 'struct _zval_struct * (*)(struct _zval_struct *, struct _zval_struct *, int,  void **)'} from incompatible pointer type 'zval * (*)(zend_object *, zend_string *, int,  void **)' {aka 'struct _zval_struct * (*)(struct _zend_object *, struct _zend_string *, int,  void **)'} [-Wincompatible-pointer-types]
  661 |   h->get_property_ptr_ptr = Map_GetPropertyPtrPtr;
      |                           ^


/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/message.c: In function 'Message_ModuleInit':
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/message.c:1406:14: warning: assignment to 'zend_object_compare_zvals_t' {aka 'int (*)(struct _zval_struct *, struct _zval_struct *, struct _zval_struct *)'} from incompatible pointer type 'int (*)(zval *, zval *)' {aka 'int (*)(struct _zval_struct *, struct _zval_struct *)'} [-Wincompatible-pointer-types]
 1406 |   h->compare = Message_compare_objects;
      |              ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/message.c:1407:20: warning: assignment to 'zend_object_read_property_t' {aka 'struct _zval_struct * (*)(struct _zval_struct *, struct _zval_struct *, int,  void **, struct _zval_struct *)'} from incompatible pointer type 'zval * (*)(zend_object *, zend_string *, int,  void **, zval *)' {aka 'struct _zval_struct * (*)(struct _zend_object *, struct _zend_string *, int,  void **, struct _zval_struct *)'} [-Wincompatible-pointer-types]
 1407 |   h->read_property = Message_read_property;
      |                    ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/message.c:1408:21: warning: assignment to 'zend_object_write_property_t' {aka 'struct _zval_struct * (*)(struct _zval_struct *, struct _zval_struct *, struct _zval_struct *, void **)'} from incompatible pointer type 'zval * (*)(zend_object *, zend_string *, zval *, void **)' {aka 'struct _zval_struct * (*)(struct _zend_object *, struct _zend_string *, struct _zval_struct *, void **)'} [-Wincompatible-pointer-types]
 1408 |   h->write_property = Message_write_property;
      |                     ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/message.c:1409:19: warning: assignment to 'zend_object_has_property_t' {aka 'int (*)(struct _zval_struct *, struct _zval_struct *, int,  void **)'} from incompatible pointer type 'int (*)(zend_object *, zend_string *, int,  void **)' {aka 'int (*)(struct _zend_object *, struct _zend_string *, int,  void **)'} [-Wincompatible-pointer-types]
 1409 |   h->has_property = Message_has_property;
      |                   ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/message.c:1410:21: warning: assignment to 'zend_object_unset_property_t' {aka 'void (*)(struct _zval_struct *, struct _zval_struct *, void **)'} from incompatible pointer type 'void (*)(zend_object *, zend_string *, void **)' {aka 'void (*)(struct _zend_object *, struct _zend_string *, void **)'} [-Wincompatible-pointer-types]
 1410 |   h->unset_property = Message_unset_property;
      |                     ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/message.c:1411:21: warning: assignment to 'zend_object_get_properties_t' {aka 'struct _zend_array * (*)(struct _zval_struct *)'} from incompatible pointer type 'HashTable * (*)(zend_object *)' {aka 'struct _zend_array * (*)(struct _zend_object *)'} [-Wincompatible-pointer-types]
 1411 |   h->get_properties = Message_get_properties;
      |                     ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/message.c:1412:27: warning: assignment to 'zend_object_get_property_ptr_ptr_t' {aka 'struct _zval_struct * (*)(struct _zval_struct *, struct _zval_struct *, int,  void **)'} from incompatible pointer type 'zval * (*)(zend_object *, zend_string *, int,  void **)' {aka 'struct _zval_struct * (*)(struct _zend_object *, struct _zend_string *, int,  void **)'} [-Wincompatible-pointer-types]
 1412 |   h->get_property_ptr_ptr = Message_get_property_ptr_ptr;
      |                           ^
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/message.c:1413:16: warning: assignment to 'zend_object_clone_obj_t' {aka 'struct _zend_object * (*)(struct _zval_struct *)'} from incompatible pointer type 'zend_object * (*)(zend_object *)' {aka 'struct _zend_object * (*)(struct _zend_object *)'} [-Wincompatible-pointer-types]
 1413 |   h->clone_obj = Message_clone_obj;
      |                ^


/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/protobuf.c: In function 'NameMap_GetMessage':
/home/rpmbuild/SPECS/remirepo/php/pecl/php-pecl-protobuf/protobuf-3.25.0RC1/protobuf.c:247:36: warning: passing argument 1 of 'zend_call_method' from incompatible pointer type [-Wincompatible-pointer-types]
  247 |     zend_call_method_with_0_params(tmp, ce, NULL, "__construct", &zv);
      |                                    ^~~
      |                                    |
      |                                    zend_object * {aka struct _zend_object *}
/opt/remi/php74/root/usr/include/php/Zend/zend_interfaces.h:43:26: note: in definition of macro 'zend_call_method_with_0_params'
   43 |         zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 0, NULL, NULL)
      |                          ^~~
/opt/remi/php74/root/usr/include/php/Zend/zend_interfaces.h:40:39: note: expected 'zval *' {aka 'struct _zval_struct *'} but argument is of type 'zend_object *' {aka 'struct _zend_object *'}
   40 | ZEND_API zval* zend_call_method(zval *object_pp, zend_class_entry *obj_ce, zend_function **fn_proxy, const char *function_name, size_t function_name_len, zval *retval, int param_count, zval* arg1, zval* arg2);
      |                                 ~~~~~~^~~~~~~~~

@remicollet remicollet added the untriaged auto added to all issues by default when created. label Oct 17, 2023
@remicollet
Copy link
Author

remicollet commented Oct 17, 2023

Perhaps you forgot to bump minimal supported version ?

see f881c8f

P.S. also nothing in changelog about this removal

@fowles
Copy link
Contributor

fowles commented Oct 17, 2023

Sorry about missing it in the release notes, we advertised it at https://protobuf.dev/news/2023-07-06/ but missed the release notes.

@fowles fowles self-assigned this Oct 17, 2023
@fowles fowles added php and removed untriaged auto added to all issues by default when created. labels Oct 17, 2023
copybara-service bot pushed a commit that referenced this issue Oct 17, 2023
Fixes #14436

PiperOrigin-RevId: 574150273
copybara-service bot pushed a commit that referenced this issue Oct 17, 2023
Fixes #14436

PiperOrigin-RevId: 574150273
@zhangskz zhangskz added the 25.x label Oct 17, 2023
fowles added a commit to fowles/protobuf that referenced this issue Oct 17, 2023
Fixes protocolbuffers#14436

PiperOrigin-RevId: 574168872
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants