php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78027 Compile failure due to PCRE API changes with PHP 7.4
Submitted: 2019-05-17 10:30 UTC Modified: 2021-04-20 12:56 UTC
Votes:4
Avg. Score:4.5 ± 0.9
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:4 (100.0%)
From: derick@php.net Assigned: cmb (profile)
Status: Closed Package: oauth (PECL)
PHP Version: master-Git-2019-05-17 (Git) OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: derick@php.net
New email:
PHP Version: OS:

 

 [2019-05-17 10:30 UTC] derick@php.net
Description:
------------
"pecl install oauth" fails with PHP 7.4 from Git, with:

 cc -I. -I/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-dericksbH0O6/oauth-2.0.3/include -I/tmp/pear/temp/pear-build-dericksbH0O6/oauth-2.0.3/main -I/tmp/pear/temp/oauth -I/usr/local/php/7.4dev/include/php -I/usr/local/php/7.4dev/include/php/main -I/usr/local/php/7.4dev/include/php/TSRM -I/usr/local/php/7.4dev/include/php/Zend -I/usr/local/php/7.4dev/include/php/ext -I/usr/local/php/7.4dev/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O0 -Wall -g -c /tmp/pear/temp/oauth/oauth.c  -fPIC -DPIC -o .libs/oauth.o
/tmp/pear/temp/oauth/provider.c: In function ‘oauth_provider_parse_auth_header’:
/tmp/pear/temp/oauth/provider.c:228:3: warning: passing argument 2 of ‘php_pcre_match_impl’ from incompatible pointer type [-Wincompatible-pointer-types]
   auth_header,
   ^~~~~~~~~~~
In file included from /tmp/pear/temp/oauth/php_oauth.h:47,
                 from /tmp/pear/temp/oauth/provider.c:13:
/usr/local/php/7.4dev/include/php/ext/pcre/php_pcre.h:44:70: note: expected ‘zend_string *’ {aka ‘struct _zend_string *’} but argument is of type ‘char *’
 PHPAPI void  php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value,
                                                         ~~~~~~~~~~~~~^~~~~~~~~~~
/tmp/pear/temp/oauth/provider.c:229:3: warning: passing argument 3 of ‘php_pcre_match_impl’ makes pointer from integer without a cast [-Wint-conversion]
   strlen(auth_header),
   ^~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/oauth/php_oauth.h:47,
                 from /tmp/pear/temp/oauth/provider.c:13:
/usr/local/php/7.4dev/include/php/ext/pcre/php_pcre.h:44:89: note: expected ‘zval *’ {aka ‘struct _zval_struct *’} but argument is of type ‘size_t’ {aka ‘long unsigned int’}
 PHPAPI void  php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value,
                                                                                   ~~~~~~^~~~~~~~~~~~
/tmp/pear/temp/oauth/provider.c:231:3: warning: passing argument 5 of ‘php_pcre_match_impl’ makes integer from pointer without a cast [-Wint-conversion]
   &subpats,
   ^~~~~~~~
In file included from /tmp/pear/temp/oauth/php_oauth.h:47,
                 from /tmp/pear/temp/oauth/provider.c:13:
/usr/local/php/7.4dev/include/php/ext/pcre/php_pcre.h:45:21: note: expected ‘int’ but argument is of type ‘zval *’ {aka ‘struct _zval_struct *’}
  zval *subpats, int global, int use_flags, zend_long flags, zend_off_t start_offset);
                 ~~~~^~~~~~
/tmp/pear/temp/oauth/provider.c:226:2: error: too many arguments to function ‘php_pcre_match_impl’
  php_pcre_match_impl(
  ^~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/oauth/php_oauth.h:47,
                 from /tmp/pear/temp/oauth/provider.c:13:
/usr/local/php/7.4dev/include/php/ext/pcre/php_pcre.h:44:14: note: declared here
 PHPAPI void  php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value,
              ^~~~~~~~~~~~~~~~~~~
make: *** [Makefile:195: provider.lo] Error 1
make: *** Waiting for unfinished jobs....
/tmp/pear/temp/oauth/oauth.c: In function ‘make_req_streams’:
/tmp/pear/temp/oauth/oauth.c:785:18: warning: passing argument 1 of ‘smart_string_0’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   smart_string_0(payload);
                  ^~~~~~~
In file included from /usr/local/php/7.4dev/include/php/ext/standard/php_smart_string.h:21,
                 from /tmp/pear/temp/oauth/php_oauth.h:35,
                 from /tmp/pear/temp/oauth/oauth.c:14:
/usr/local/php/7.4dev/include/php/Zend/zend_smart_string.h:75:61: note: expected ‘smart_string *’ {aka ‘struct <anonymous> *’} but argument is of type ‘const smart_string *’ {aka ‘const struct <anonymous> *’}
 static zend_always_inline void smart_string_0(smart_string *str) {
                                               ~~~~~~~~~~~~~~^~~
/tmp/pear/temp/oauth/oauth.c: In function ‘zm_startup_oauth’:
/tmp/pear/temp/oauth/oauth.c:2718:36: 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 ‘void (*)(zval *, zval *, zval *, void **)’ {aka ‘void (*)(struct _zval_struct *, struct _zval_struct *, struct _zval_struct *, void **)’} [-Wincompatible-pointer-types]
  so_object_handlers.write_property = oauth_write_member;
                                    ^
ERROR: `make' failed



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-10-22 08:16 UTC] langemeijer@php.net
This commit by 	Remi Collet fixed this issue:
http://git.php.net/?p=pecl/web_services/oauth.git;a=commit;h=e27ff18ac768aae1cf955111179ec68307d37475

All the oauth package needs is a new package release.
 [2021-04-20 12:56 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-04-20 12:56 UTC] cmb@php.net
This is supposed to be fixed as of oauth 2.0.4[1].

[1] <https://pecl.php.net/package-info.php?package=oauth&version=2.0.4>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 21:01:26 2024 UTC