php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70049 gmagick does not compile on php7/master
Submitted: 2015-07-11 21:58 UTC Modified: 2015-12-30 15:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: mail at cebe dot cc Assigned: vito (profile)
Status: Closed Package: gmagick (PECL)
PHP Version: master-Git-2015-07-11 (Git) OS: Debian jessie
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mail at cebe dot cc
New email:
PHP Version: OS:

 

 [2015-07-11 21:58 UTC] mail at cebe dot cc
Description:
------------
compiling php7 with gmagick results in the following error:

Test script:
---------------
on a fresh clone of php master:

# download gmagick:
cd ext
pecl download gmagick-1.1.7RC3
tar xzvf gmagick-1.1.7RC3.tgz
mv gmagick-* gmagick
cd ..

./buildconf --force
./configure --prefix=/opt/php/php-dist/gmagick-bug --with-gmagick
make

Actual result:
--------------
/bin/bash /opt/php/php-src/libtool --silent --preserve-dup-deps --mode=compile cc  -Iext/gmagick/ -I/opt/php/php-src/ext/gmagick/ -DPHP_ATOM_INC -I/opt/php/php-src/include -I/opt/php/php-src/main -I/opt/php/php-src -I/opt/php/php-src/ext/date/lib -I/usr/include/libxml2 -I/usr/include/GraphicsMagick -I/opt/php/php-src/ext/sqlite3/libsqlite -I/opt/php/php-src/TSRM -I/opt/php/php-src/Zend    -I/usr/include -g -O2 -fvisibility=hidden   -c /opt/php/php-src/ext/gmagick/gmagick_helpers.c -o ext/gmagick/gmagick_helpers.lo 

/opt/php/php-src/ext/gmagick/gmagick_helpers.c: In function 'get_pointinfo_array':
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:339:57: error: macro "zend_hash_get_current_data" passed 2 arguments, but takes just 1
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:339:7: error: 'zend_hash_get_current_data' undeclared (first use in this function)
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:339:7: note: each undeclared identifier is reported only once for each function it appears in
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:355:18: error: invalid type argument of '->' (have 'int')
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:366:13: warning: assignment makes pointer from integer without a cast [enabled by default]
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:369:3: warning: passing argument 2 of 'zend_hash_find' from incompatible pointer type [enabled by default]
In file included from /opt/php/php-src/Zend/zend.h:36:0,
                 from /opt/php/php-src/main/php.h:35,
                 from /opt/php/php-src/ext/gmagick/php_gmagick.h:52,
                 from /opt/php/php-src/ext/gmagick/gmagick_helpers.c:20:
/opt/php/php-src/Zend/zend_hash.h:152:30: note: expected 'struct zend_string *' but argument is of type 'char *'
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:369:3: error: too many arguments to function 'zend_hash_find'
In file included from /opt/php/php-src/Zend/zend.h:36:0,
                 from /opt/php/php-src/main/php.h:35,
                 from /opt/php/php-src/ext/gmagick/php_gmagick.h:52,
                 from /opt/php/php-src/ext/gmagick/gmagick_helpers.c:20:
/opt/php/php-src/Zend/zend_hash.h:152:30: note: declared here
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:369:67: warning: comparison between pointer and integer [enabled by default]
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:384:3: warning: passing argument 2 of 'zend_hash_find' from incompatible pointer type [enabled by default]
In file included from /opt/php/php-src/Zend/zend.h:36:0,
                 from /opt/php/php-src/main/php.h:35,
                 from /opt/php/php-src/ext/gmagick/php_gmagick.h:52,
                 from /opt/php/php-src/ext/gmagick/gmagick_helpers.c:20:
/opt/php/php-src/Zend/zend_hash.h:152:30: note: expected 'struct zend_string *' but argument is of type 'char *'
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:384:3: error: too many arguments to function 'zend_hash_find'
In file included from /opt/php/php-src/Zend/zend.h:36:0,
                 from /opt/php/php-src/main/php.h:35,
                 from /opt/php/php-src/ext/gmagick/php_gmagick.h:52,
                 from /opt/php/php-src/ext/gmagick/gmagick_helpers.c:20:
/opt/php/php-src/Zend/zend_hash.h:152:30: note: declared here
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:384:67: warning: comparison between pointer and integer [enabled by default]
/opt/php/php-src/ext/gmagick/gmagick_helpers.c: In function 'get_double_array_from_zval':
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:466:53: error: macro "zend_hash_get_current_data" passed 2 arguments, but takes just 1
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:466:7: error: 'zend_hash_get_current_data' undeclared (first use in this function)
/opt/php/php-src/ext/gmagick/gmagick_helpers.c: In function 'php_gmagick_zval_to_double_array':
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:645:94: error: macro "zend_hash_get_current_data" passed 2 arguments, but takes just 1
/opt/php/php-src/ext/gmagick/gmagick_helpers.c:645:25: error: 'zend_hash_get_current_data' undeclared (first use in this function)
make: *** [ext/gmagick/gmagick_helpers.lo] Error 1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-09 20:54 UTC] wcgallego at gmail dot com
I've got a port of pecl gmagick on my personal github repo, forked from vitoc's.

https://github.com/wcgallego/gmagick

I'd love to get more eyes on this to continue pushing this forward. It's not battle hardened yet so caveat emptor. Please submit feedback!
 [2015-12-12 08:48 UTC] vito@php.net
Thanks for the PR @wcgallego. Will test further.

Does anyone else have any opinion on the PECL package being compatible only with PHP 7 and above going forward?
 [2015-12-20 14:14 UTC] danack@php.net
Vito, how about asking to become the maintainer of the Pecl GMagick library, if you're going to be maintaining it for yourself anyway?


> Does anyone else have any opinion on the PECL package being compatible only with PHP 7 and above going forward?

For Imagick I choose not to do this; instead having a large number of #ifdefs in the code. While that choice is ok for me, it's not universally correct.

What I would recommend, if you are going to make a library be for PHP 7+ only, is to do a final release for PHP 5.6 with a new minor version number e.g. 1.2.0  and then release the new 7+ versions as 2.0.0. This allows you to release bug fixe versions for both releases, without any "clashing".
 [2015-12-20 14:59 UTC] vito@php.net
-Assigned To: +Assigned To: vito
 [2015-12-20 14:59 UTC] vito@php.net
Thanks for the recommendation Dan. I’d tested Will’s fork, looks good to go.
 [2015-12-30 15:22 UTC] vito@php.net
-Status: Assigned +Status: Closed
 [2015-12-30 15:22 UTC] vito@php.net
Please see Gmagick 2.0.0RC2.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 17 23:01:27 2024 UTC