php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71399 Can't compile when using PHP7.0
Submitted: 2016-01-17 16:46 UTC Modified: 2017-07-22 03:03 UTC
Votes:23
Avg. Score:4.8 ± 0.5
Reproduced:22 of 22 (100.0%)
Same Version:19 (86.4%)
Same OS:10 (45.5%)
From: hello at sebastiaanluca dot com Assigned: cataphract (profile)
Status: Closed Package: rar (PECL)
PHP Version: 7.0.2 OS: Ubuntu 14.04
Private report: No CVE-ID: None
 [2016-01-17 16:46 UTC] hello at sebastiaanluca dot com
Description:
------------
`sudo pecl install rar` throws an exception, can't compile on Ubuntu 14.04 for PHP7.0.

Actual result:
--------------
/usr/include/php/20151012/Zend/zend_hash.h:154:30: note: expected 'struct zend_string *' but argument is of type 'const char *'
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/tmp/pear/temp/rar/rar.c:645:2: error: too many arguments to function 'zend_hash_find'
  zend_hash_find(cc->data, key, key_len, (void **) &element);
  ^
In file included from /usr/include/php/20151012/Zend/zend.h:36:0,
                 from /usr/include/php/20151012/main/php.h:36,
                 from /tmp/pear/temp/rar/rar.c:47:
/usr/include/php/20151012/Zend/zend_hash.h:154:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/tmp/pear/temp/rar/rar.c:649:3: warning: passing argument 1 of 'zval_add_ref' from incompatible pointer type [enabled by default]
   zval_add_ref(element);
   ^
In file included from /usr/include/php/20151012/Zend/zend.h:39:0,
                 from /usr/include/php/20151012/main/php.h:36,
                 from /tmp/pear/temp/rar/rar.c:47:
/usr/include/php/20151012/Zend/zend_variables.h:141:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
 ZEND_API void zval_add_ref(zval *p);
               ^
/tmp/pear/temp/rar/rar.c: At top level:
cc1: warning: unrecognized command line option "-Wno-logical-op-parentheses" [enabled by default]
make: *** [rar.lo] Error 1
ERROR: `make' failed

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-29 18:08 UTC] willfitch@php.net
Rar hasn't been updated since 2013 - thus the PHP/Zend APIs aren't updated and likely won't compile against 7.0.
 [2016-01-29 18:09 UTC] willfitch@php.net
-Assigned To: +Assigned To: cataphract
 [2016-01-29 19:49 UTC] hello at sebastiaanluca dot com
What's a possible next step here? I'm surely not the only one using the rar package?
 [2016-02-01 16:05 UTC] willfitch@php.net
I've assigned this to cataphract as they're the author of the PECL extension. I'll email and see if they're available to update to PHP 7.  If not, I'll take a look at it.
 [2016-03-12 20:51 UTC] hello at sebastiaanluca dot com
I'm not that familiar with the bug reporting here, but has there been any updates regarding this issue?
 [2016-07-22 03:24 UTC] miles dot t dot prower at gmail dot com
Any update? This needs to be removed from the assigned person if they are not going to work on it, and be assigned to someone who will.
 [2016-09-27 18:04 UTC] dlloyd at ocremix dot org
Perhaps reassign to Antony Dovgal?

I'd love to see this bug fixed, as it is currently preventing me from moving to 7.X...
 [2016-11-06 06:20 UTC] miles dot t dot prower at gmail dot com
Well, seems that since it will not ever be resolved, this package should be removed so that people know that 'PHP can't do that' and to just drop php and move to Ruby on Rails or some other framework that can.
 [2016-11-16 20:50 UTC] willfitch@php.net
I'll look at it this weekend. I don't think the maintainers are working on it any longer.
 [2016-11-20 22:20 UTC] emu dot sas at gmail dot com
willfitch, any news?

This issue also reproduced on PHP 7.1 too.
 [2016-11-28 18:47 UTC] dlloyd at ocremix dot org
Also eagerly awaiting any updates - nothing's changed, still need it :)

If someone else takes this over, maybe they could also do a native 7zip PHP extension... I can dream, can't I?
 [2016-11-29 00:12 UTC] miles dot t dot prower at gmail dot com
Lol, if they did that then they wouldn't need this.

7Zip does many formats, including rar and rar5.
 [2016-12-31 02:13 UTC] yovkov at gmail dot com
There is a guy who has already made it available for PHP 7.1

You can check here: https://github.com/esminis/php_pecl_rar/tree/PhpNg

Already tried it and it installed beautifully without any problems.
 [2017-03-09 05:03 UTC] no at no dot no
FIX THIS SH!T YOU LAZY FUQZ
 [2017-07-22 03:03 UTC] cataphract@php.net
-Status: Assigned +Status: Closed
 [2017-07-22 03:03 UTC] cataphract@php.net
Fixed in 4.0.0
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 05 22:01:26 2024 UTC