php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58040 imagick won't build with ImageMagick 6.3.8-5
Submitted: 2008-02-12 17:22 UTC Modified: 2008-02-24 11:24 UTC
From: sleeperseven at hotmail dot com Assigned:
Status: Closed Package: imagick (PECL)
PHP Version: 5.2.5 OS: Linux
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: sleeperseven at hotmail dot com
New email:
PHP Version: OS:

 

 [2008-02-12 17:22 UTC] sleeperseven at hotmail dot com
Description:
------------
Configure fails when building imagick 2.1.0 against ImageMagick 6.3.8-5 because ImageMagick's include directories and library filenames have been changed.

Reproduce code:
---------------
tar xzf imagick-2.1.0.tar.gz
phpize
./configure
make
sudo make install

Expected result:
----------------
Package should configure, compile and install

Actual result:
--------------
Configure fails.  The following patch fixes the issue (though it's ugly).

--- config.m4.orig      2008-02-12 16:38:51.120757605 -0500
+++ config.m4   2008-02-12 17:10:26.228753701 -0500
@@ -36,8 +36,17 @@
                WAND_DIR=`$WAND_CONFIG_PATH/Wand-config --prefix`
                AC_MSG_CHECKING(for magick-wand.h header file)

-               if test -r $WAND_DIR/include/wand/magick-wand.h; then
-                               AC_MSG_RESULT(found in $WAND_DIR/include/wand/magick-wand.h)
+               WAND_SUBDIR=""
+               MAGICK_LIB="Magick"
+               WAND_LIB="Wand"
+               if test -d $WAND_DIR/include/ImageMagick/wand ; then
+                       WAND_SUBDIR="/ImageMagick"
+                       MAGICK_LIB="MagickCore"
+                       WAND_LIB="MagickWand"
+               fi
+
+               if test -r $WAND_DIR/include$WAND_SUBDIR/wand/magick-wand.h; then
+                               AC_MSG_RESULT(found in $WAND_DIR/include$WAND_SUBDIR/wand/magick-wand.h)
                else
                                AC_MSG_ERROR(Cannot locate header file magick-wand.h)
                fi
@@ -95,9 +104,9 @@
                                                        AC_DEFINE(HAVE_IMAGEMAGICK6364ORLATER, 1, [ ])
                                                        ],,-L$WAND_DIR/lib)

-               PHP_ADD_LIBRARY_WITH_PATH(Magick, $WAND_DIR/lib, IMAGICK_SHARED_LIBADD)
-               PHP_ADD_LIBRARY_WITH_PATH(Wand, $WAND_DIR/lib, IMAGICK_SHARED_LIBADD)
-               PHP_ADD_INCLUDE($WAND_DIR/include)
+               PHP_ADD_LIBRARY_WITH_PATH($MAGICK_LIB, $WAND_DIR/lib, IMAGICK_SHARED_LIBADD)
+               PHP_ADD_LIBRARY_WITH_PATH($WAND_LIB, $WAND_DIR/lib, IMAGICK_SHARED_LIBADD)
+               PHP_ADD_INCLUDE($WAND_DIR/include${WAND_SUBDIR})
                PHP_SUBST(IMAGICK_SHARED_LIBADD)
                PHP_NEW_EXTENSION(imagick, imagick.c, $ext_shared)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-12 18:52 UTC] mkoppanen@php.net
Verified and should be fixed in CVS. Can you test the current CVS version? And thanks for the heads up!
 [2008-02-14 12:18 UTC] sleeperseven at hotmail dot com
Make still fails.  Line 133 of config.m4 should read:

PHP_ADD_INCLUDE($WAND_DIR/include/ImageMagick)

Once this change is made, build is successful.
 [2008-02-24 10:59 UTC] philipp dot feigl at gmail dot com
PLEASE try to get this into the downloadable area as soon as possible. Cost my around 4h to find out about this, trying to link the header files with no luck and so on.

So checking out from CVS and compiling from hand worked like a charm!
 [2008-02-24 11:24 UTC] mkoppanen@php.net
I'll put a new RC out today.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 05:01:30 2024 UTC