php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77641 [PECL] “Latest Tarball” should download selected version
Submitted: 2019-02-19 23:43 UTC Modified: 2019-02-20 23:48 UTC
From: office at vargapeter dot net Assigned:
Status: Re-Opened Package: Website problem
PHP Version: 7.2.15 OS: SLES 12.4
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: office at vargapeter dot net
New email:
PHP Version: OS:

 

 [2019-02-19 23:43 UTC] office at vargapeter dot net
Description:
------------
stats extension doesn't compile with gcc 8.2.0 in the default configuration.



Expected result:
----------------
No errors.

Actual result:
--------------
/bin/sh /builds/stats-1.0.5/libtool --mode=compile cc  -I. -I/builds/stats-1.0.5 -DPHP_ATOM_INC -I/builds/stats-1.0.5/include -I/builds/stats-1.0.5/main -I/builds/stats-1.0.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /builds/stats-1.0.5/php_stats.c -o php_stats.lo 
 cc -I. -I/builds/stats-1.0.5 -DPHP_ATOM_INC -I/builds/stats-1.0.5/include -I/builds/stats-1.0.5/main -I/builds/stats-1.0.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /builds/stats-1.0.5/php_stats.c  -fPIC -DPIC -o .libs/php_stats.o
/builds/stats-1.0.5/php_stats.c: In function ‘stats_array_data_compare’:
/builds/stats-1.0.5/php_stats.c:173:23: error: ‘Bucket’ {aka ‘struct _Bucket’} has no member named ‘pData’
  first = *((zval **) f->pData);
                       ^~
/builds/stats-1.0.5/php_stats.c:174:24: error: ‘Bucket’ {aka ‘struct _Bucket’} has no member named ‘pData’
  second = *((zval **) s->pData);
                        ^~
/builds/stats-1.0.5/php_stats.c:176:6: error: too many arguments to function ‘numeric_compare_function’
  if (numeric_compare_function(&result, first, second TSRMLS_CC) == FAILURE) {
      ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/Zend/zend.h:328,
                 from /usr/include/php/main/php.h:35,
                 from /builds/stats-1.0.5/php_stats.c:26:
/usr/include/php/Zend/zend_operators.h:339:28: note: declared here
 ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2);
                            ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/Zend/zend.h:29,
                 from /usr/include/php/main/php.h:35,
                 from /builds/stats-1.0.5/php_stats.c:26:
/builds/stats-1.0.5/php_stats.c: In function ‘zif_stats_rand_phrase_to_seeds’:
/usr/include/php/Zend/zend_types.h:399:39: warning: passing argument 1 of ‘zval_get_type’ from incompatible pointer type [-Wincompatible-pointer-types]
 #define Z_TYPE(zval)    zval_get_type(&(zval))
                                       ^~~~~~~
/usr/include/php/Zend/zend_types.h:400:28: note: in expansion of macro ‘Z_TYPE’
 #define Z_TYPE_P(zval_p)   Z_TYPE(*(zval_p))
                            ^~~~~~
/usr/include/php/Zend/zend_operators.h:375:6: note: in expansion of macro ‘Z_TYPE_P’
  if (Z_TYPE_P(pzv)!=upper_type) {     \
      ^~~~~~~~
/usr/include/php/Zend/zend_operators.h:417:35: note: in expansion of macro ‘convert_to_ex_master’
 #define convert_to_string_ex(pzv) convert_to_ex_master(pzv, string, IS_STRING)
                                   ^~~~~~~~~~~~~~~~~~~~
/builds/stats-1.0.5/php_stats.c:2498:2: note: in expansion of macro ‘convert_to_string_ex’
  convert_to_string_ex(par1);
  ^~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_types.h:389:64: note: expected ‘const zval *’ {aka ‘const struct _zval_struct *’} but argument is of type ‘zval **’ {aka ‘struct _zval_struct **’}
 static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
                                                    ~~~~~~~~~~~~^~
/usr/include/php/Zend/zend_types.h:399:39: warning: passing argument 1 of ‘zval_get_type’ from incompatible pointer type [-Wincompatible-pointer-types]
 #define Z_TYPE(zval)    zval_get_type(&(zval))
                                       ^~~~~~~
/usr/include/php/Zend/zend_types.h:400:28: note: in expansion of macro ‘Z_TYPE’
 #define Z_TYPE_P(zval_p)   Z_TYPE(*(zval_p))
                            ^~~~~~
/usr/include/php/Zend/zend_operators.h:281:35: note: in expansion of macro ‘Z_TYPE_P’
 #define convert_to_string(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_string((op) ZEND_FILE_LINE_CC); }
                                   ^~~~~~~~
/usr/include/php/Zend/zend_operators.h:376:3: note: in expansion of macro ‘convert_to_string’
   convert_to_##lower_type(pzv);      \
   ^~~~~~~~~~~
/usr/include/php/Zend/zend_operators.h:417:35: note: in expansion of macro ‘convert_to_ex_master’
 #define convert_to_string_ex(pzv) convert_to_ex_master(pzv, string, IS_STRING)
                                   ^~~~~~~~~~~~~~~~~~~~
/builds/stats-1.0.5/php_stats.c:2498:2: note: in expansion of macro ‘convert_to_string_ex’
  convert_to_string_ex(par1);
  ^~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_types.h:389:64: note: expected ‘const zval *’ {aka ‘const struct _zval_struct *’} but argument is of type ‘zval **’ {aka ‘struct _zval_struct **’}
 static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
                                                    ~~~~~~~~~~~~^~


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-20 18:46 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2019-02-20 18:46 UTC] cmb@php.net
From the changelog:

| 2.0.0	PHP 7 Support

So yes, it is expected that stats-1.0.5 doesn't compile
under PHP 7.
 [2019-02-20 18:58 UTC] office at vargapeter dot net
I downloaded it from http://pecl.php.net/package/stats/2.0.3 under "Latest tarball". Please check it out. Where is the latest source?
 [2019-02-20 19:07 UTC] office at vargapeter dot net
OK. I downloaded the wrong version even it was from the latest site. Now I got the correct version 2.0.3 and it works. You can close the file. Maybe you check the mentioned links/sites.
 [2019-02-20 19:34 UTC] cmb@php.net
> I downloaded it from http://pecl.php.net/package/stats/2.0.3
> under "Latest tarball".

See <https://pecl.php.net/package/stats> which shows that  1.0.5
and 2.0.3 have been released on the same day, so yeah, while 1.0.5
is the latest release, it is not necessarily the suitable one.
 [2019-02-20 19:40 UTC] office at vargapeter dot net
Yes, I could have be more accurate - this was definitely my fault.

Check the time when I posted it. It was late in the night - I wasn't anymore that concentrated.

BUT, honestly, can you admit that when somebody clicks on "Latest Tarball" on a 2.0.3 page he doesn't really expect to get the wrong version.

For me the logic was that I get delivered the latest 2.0.3 tarball.
 [2019-02-20 23:48 UTC] cmb@php.net
-Summary: Does NOT compile +Summary: “Latest Tarball” should download selected version -Status: Not a bug +Status: Re-Opened -Package: stats +Package: Website problem -Assigned To: cmb +Assigned To:
 [2019-02-20 23:48 UTC] cmb@php.net
> BUT, honestly, can you admit that when somebody clicks on
> "Latest Tarball" on a 2.0.3 page he doesn't really expect to get
> the wrong version.

On further consideration, I think this link is wrong, given that
the following Changelog link explicitly refers to the 2.0.3
version.  "Latest Tarball" should point to
<https://pecl.php.net/get/stats-2.0.3.tgz> in this case.  This is
a general issue for the PECL Website, not particularly to stats.
 [2019-02-20 23:48 UTC] cmb@php.net
-Summary: “Latest Tarball” should download selected version +Summary: [PECL] “Latest Tarball” should download selected version
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 13:01:30 2025 UTC