php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70899 php 7 RC 7 buildconf failure
Submitted: 2015-11-12 09:25 UTC Modified: 2015-12-04 19:25 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: admin at dunkleallianz dot net Assigned: bwoebi (profile)
Status: Closed Package: Compile Failure
PHP Version: 7.0.0RC7 OS: Debian 8.3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: admin at dunkleallianz dot net
New email:
PHP Version: OS:

 

 [2015-11-12 09:25 UTC] admin at dunkleallianz dot net
Description:
------------
I have the problem that I can not integrate Imagick from an RC version of php7
I used the Master Branch of Imagick an the phpseven 



Test script:
---------------
wget https://github.com/mkoppanen/imagick/archive/phpseven.zip
wget https://downloads.php.net/~ab/php-7.0.0RC7.tar.gz

tar xvf php-7.0.0RC7.tar.gz
unzip phpseven.zip

mv imagick-phpseven imagick 
cp imagick php-7.0.0RC7/ext/

rm php-7.0.0RC7/configure 
./buildconf --force 

autoconf (GNU Autoconf) 2.69
m4 (GNU M4) 1.4.17
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09)

Expected result:
----------------
This comes during rebuild of the conf


Forcing buildconf
Removing configure caches
buildconf: checking installation...
buildconf: autoconf version 2.69 (ok)
rebuilding configure
/usr/bin/m4:ext/imagick/config.m4:14: cannot open `$config_m4_dir/imagemagick.m4': No such file or directory
autom4te: /usr/bin/m4 failed with exit status: 1
rebuilding main/php_config.h.in
/usr/bin/m4:ext/imagick/config.m4:14: cannot open `$config_m4_dir/imagemagick.m4': No such file or directory
autom4te: /usr/bin/m4 failed with exit status: 1
autoheader: '/usr/bin/autom4te' failed with exit status: 1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-12 09:29 UTC] admin at dunkleallianz dot net
The problem has existed since the PHP 7 RC 2 version, there was this once a report and after that it went again, but be the PHP7 in RC status is, it is no longer
 [2015-11-12 14:58 UTC] reeze@php.net
-Assigned To: +Assigned To: reeze
 [2015-11-12 17:06 UTC] reeze@php.net
-Assigned To: reeze +Assigned To: bwoebi
 [2015-11-12 17:06 UTC] reeze@php.net
Hey bob.

This breaks start from this commit: 
https://github.com/php/php-src/commit/82b73fd1e3c53228bb31b75a446114b5fd0cd240

After the diff PHP_EXT_DIR will not able to locate other extension's path, there should no one that I think, but it is a break.


This patch (the first one of the gist) should fix the problem: https://gist.github.com/reeze/89fd045f1d0960d2add3

The second is working in m4 1.4.16 but not 1.4.6, so I have to take the dirty one.
 [2015-11-12 17:19 UTC] bwoebi@php.net
-Assigned To: bwoebi +Assigned To: reeze
 [2015-11-12 17:19 UTC] bwoebi@php.net
I'm not an expert here… but where is PHP_EXT_CONFIG_M4_DIR and PHP_CURRENT_CONFIG_M4_DIR defined? (the first diff)
Not sure what you did there…

Second patch looks more coherent, but what's PHP_CURRENT_CONFIG_M4_SRC doing?
 [2015-11-12 17:43 UTC] admin at dunkleallianz dot net
reeze the newest version of m4 ist 1.4.17  i can't see something about 1.4.6

if you have Patch it ;) i can test it again
 [2015-11-12 17:52 UTC] admin at dunkleallianz dot net
ah ok i find the version but this is a really old one (Version 1.4.6) 
m4-1.4.17          2013-09-22 09:11
m4-1.4.9           2007-03-23 21:39
 [2015-11-13 02:37 UTC] reeze@php.net
Hi bob,

The first patch is incorrect, I just updated it. I moved the macros: `PHP_EXT_DIR` from configure.in to  `build/config-stubs` so every time we include a m4 file from extension the `PHP_EXT_DIR` is redefined to the proper one (the same as previous hehavior, but it done in "autoconf-time", or we can only get the proper path at "configure time" which triggered this bug report).

Yes the second patch looks better  but I tested it with m4 1.4.6, it didn't work. (Mac shipped 1.4.6 with Xcode, so we might need to compatible with it).

@dunkleallianz could you please try the first patch?
 [2015-11-13 02:41 UTC] reeze@php.net
Hi bob. the second patch's PHP_CURRENT_CONFIG_M4_DIR is a macro to retrive current extension's dir which is initialized before evaluate every extension, this could be though as the variable $config_m4_dir but is "autoconf time",  imagick requires preprocess time path to include another m4 file.
 [2015-11-13 05:42 UTC] laruence@php.net
-Assigned To: reeze +Assigned To: bwoebi
 [2015-11-13 05:42 UTC] laruence@php.net
@bwoebi since the origin change break things, I suggest we revert it, it's not a critical change anyway.

thanks
 [2015-11-13 06:16 UTC] laruence@php.net
and about the webhelper one, maybe you can introduce a new NEW_EXTENSION_EX, which accpet arguamnets as build_dir, source_dir, it will be more safe than the current one
 [2015-11-13 08:17 UTC] admin at dunkleallianz dot net
Do you have a link to the patch or I can simply load the https://github.com/php/php-src/tree/php-7.0.0RC7 again?


Currently I have reloaded the Branch.
same error
Forcing buildconf
Removing configure caches
buildconf: checking installation...
buildconf: autoconf version 2.69 (ok)
rebuilding aclocal.m4
rebuilding configure
/usr/bin/m4:ext/imagick/config.m4:14: cannot open `$config_m4_dir/imagemagick.m4': No such file or directory
autom4te: /usr/bin/m4 failed with exit status: 1
rebuilding main/php_config.h.in
/usr/bin/m4:ext/imagick/config.m4:14: cannot open `$config_m4_dir/imagemagick.m4': No such file or directory
autom4te: /usr/bin/m4 failed with exit status: 1
autoheader: '/usr/bin/autom4te' failed with exit status: 1

or something i do wrong ?
 [2015-11-13 09:59 UTC] admin at dunkleallianz dot net
-PHP Version: 7.0.0RC6 +PHP Version: 7.0.0RC7
 [2015-11-13 09:59 UTC] admin at dunkleallianz dot net
So i have test this patch https://gist.github.com/reeze/89fd045f1d0960d2add3#file-more-compatible-patch-diff

so i have test it 
wget https://github.com/mkoppanen/imagick/archive/phpseven.zip
wget https://downloads.php.net/~ab/php-7.0.0RC7.tar.gz

tar xvf php-7.0.0RC7.tar.gz
unzip phpseven.zip

mv imagick-phpseven imagick 
cp imagick php-7.0.0RC7/ext/

Edit patch the 2 files 
rm php-7.0.0RC7/configure 

./buildconf --force 


./configure '--prefix=/usr/share/php7' '--datadir=/usr/share/php7' '--mandir=/usr/share/man' '--bindir=/usr/bin/php7' '--with-libdir=lib/x86_64-linux-gnu' '--includedir=/usr/include/php7' '--sysconfdir=/etc/php7/apache2' '--with-config-file-path=/etc/php7/apache2' '--with-config-file-scan-dir=/etc/php7/conf.d' '--enable-libxml' '--enable-session' '--with-pcre-regex=/usr' '--enable-xml' '--enable-simplexml' '--enable-filter' '--disable-debug' '--enable-inline-optimization' '--disable-rpath' '--disable-static' '--enable-shared' '--with-pic' '--with-gnu-ld' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-xpm-dir' '--enable-exif' '--with-zlib' '--with-bz2' '--with-curl' '--with-ldap' '--with-freetype-dir' '--enable-soap' '--enable-sockets' '--enable-calendar' '--enable-ftp' '--enable-mbstring' '--enable-gd-native-ttf' '--enable-bcmath' '--enable-zip' '--with-pear' '--with-openssl' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-phar' '--enable-pdo' '--with-mysqli' '--with-mysql-sock' '--with-mcrypt' '--with-pdo-mysql' '--enable-mysqlnd' '--with-imagick' 


now it works
 [2015-11-13 10:36 UTC] laruence@php.net
@amind instead of waitting for final fix of php7, you can also fix this in imagick side by move whole contents of imagemagick.m4 into config.m4 as it only define some AF_FUNCS, I don't think it's necessary to keep it in a separted file.

thanks
 [2015-11-17 20:07 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4dee0c4a14a00f353d982a470694f907aa7f5239
Log: Fixed bug #70899 (buildconf failure in extensions)
 [2015-11-17 20:07 UTC] bwoebi@php.net
-Status: Assigned +Status: Closed
 [2015-11-17 20:08 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4dee0c4a14a00f353d982a470694f907aa7f5239
Log: Fixed bug #70899 (buildconf failure in extensions)
 [2015-11-26 22:06 UTC] admin at dunkleallianz dot net
do you forgot something in the rc8 ?
 [2015-11-26 22:07 UTC] admin at dunkleallianz dot net
-Status: Closed +Status: Assigned
 [2015-11-26 22:07 UTC] admin at dunkleallianz dot net
*the some failure in rc8
 [2015-11-26 22:10 UTC] bwoebi@php.net
-Status: Assigned +Status: Closed
 [2015-11-26 22:10 UTC] bwoebi@php.net
Anatol told me it were not critical enough; feel free to complain…
 [2015-12-04 18:02 UTC] danack@php.net
Hi admin at dunkleallianz,

I can't reproduce this issue for the RC version of Imagick that supports PHP 7 that has just been tagged.

Please could you let me know if it's still an issue for you with the released version of PHP 7. If so I guess I'll could make a change to support it before 7.0.1 is released.

Either here, or it's easier for me to get notifications at https://github.com/mkoppanen/imagick/issues
 [2015-12-04 19:25 UTC] admin at dunkleallianz dot net
https://github.com/mkoppanen/imagick/issues/128
 [2016-07-20 11:35 UTC] davey@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4dee0c4a14a00f353d982a470694f907aa7f5239
Log: Fixed bug #70899 (buildconf failure in extensions)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 01 23:01:29 2024 UTC