php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62034 gmagick does not compile with GraphicsMagick 1.3.14 or later
Submitted: 2012-05-15 00:40 UTC Modified: 2012-06-01 07:52 UTC
From: php-bugs-2012 at ryandesign dot com Assigned: vito (profile)
Status: Closed Package: gmagick (PECL)
PHP Version: 5.3.13 OS: OS X 10.6.8
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: php-bugs-2012 at ryandesign dot com
New email:
PHP Version: OS:

 

 [2012-05-15 00:40 UTC] php-bugs-2012 at ryandesign dot com
Description:
------------
I have GraphicsMagick 1.3.15, and the gmagick PECL extension does not compile 
anymore at all. It used to compile but something (probably the version of 
GraphicsMagick) changed.

Actual result:
--------------
In file included from 
/opt/local/var/macports/build/_Users_rschmidt_macports_dports_php_php5-
gmagick/php5-gmagick/work/gmagick-1.1.0RC2/gmagick_helpers.c:20:
In file included from ./php_gmagick.h:31:
In file included from /opt/local/include/GraphicsMagick/wand/wand_api.h:40:
/opt/local/include/GraphicsMagick/wand/magick_wand.h:180:66: warning: type 
specifier missing, defaults to 'int' [-Wimplicit-int]
  MagickExtentImage(MagickWand *,const size_t,const size_t,const ssize_t, const 
ssize_t),
                                                           ~~~~~ ^
/opt/local/include/GraphicsMagick/wand/magick_wand.h:180:81: warning: type 
specifier missing, defaults to 'int' [-Wimplicit-int]
  MagickExtentImage(MagickWand *,const size_t,const size_t,const ssize_t, const 
ssize_t),
                                                                          ~~~~~ 
^
/opt/local/include/GraphicsMagick/wand/magick_wand.h:180:81: error: redefinition 
of parameter 'ssize_t'
/opt/local/include/GraphicsMagick/wand/magick_wand.h:180:66: note: previous 
declaration is here
  MagickExtentImage(MagickWand *,const size_t,const size_t,const ssize_t, const 
ssize_t),
                                                                 ^
2 warnings and 1 error generated.
make: *** [gmagick_helpers.lo] Error 1


Patches

include-sys-types-h.diff (last revision 2012-05-16 06:22 UTC by php-bugs-2012 at ryandesign dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-15 06:45 UTC] php-bugs-2012 at ryandesign dot com
GraphicsMagick 1.3.14 is the first version with which PECL gmagick does not compile. The fix for this bug seems to be the problem:

<http://sourceforge.net/tracker/index.php?func=detail&aid=3471915&group_id=73485&atid=537940>

Reversing this revision of GraphicsMagick allows PECL gmagick to build:

<http://graphicsmagick.hg.sourceforge.net/hgweb/graphicsmagick/graphicsmagick/rev/9d89b1bb0826>
 [2012-05-16 06:23 UTC] php-bugs-2012 at ryandesign dot com
I've contacted the developer of GraphicsMagick who advises that gmagick must #include <sys/types.h> before including any GraphicsMagick headers. This fixed the problem for me. I've attached a patch.
 [2012-05-16 06:23 UTC] php-bugs-2012 at ryandesign dot com
-Summary: gmagick does not compile +Summary: gmagick does not compile with GraphicsMagick 1.3.14 or later
 [2012-06-01 07:46 UTC] vito@php.net
Automatic comment from SVN on behalf of vito
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=325921
Log: Fix compatibility with GraphicsMagick 1.3.14. Bug #62034. Added sampleimage, cloneimage, appendimages methods.
 [2012-06-01 07:52 UTC] vito@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: vito
 [2012-06-01 07:52 UTC] vito@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 [2012-06-13 07:03 UTC] carsten_sttgt at gmx dot de
> I've contacted the developer of GraphicsMagick who advises that
> gmagick must #include <sys/types.h> before including any
> GraphicsMagick headers. This fixed the problem for me. I've
> attached a patch.

This doesn't work on Windows.

- PHP-5.4.3
- PECL gmagick-1.1.0RC3 (includes the attached patch)
- GraphicsMagick-1.3.15

I can build the extension with GraphicsMagick-1.3.13. (of course, still have other problems with the extension...)


Actual result:
--------------
D:\build\php\php-5.4.3>nmake

Microsoft (R) Program Maintenance Utility, Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Recreating build dirs
gmagick.c
Magick lib DLL import interface
Magick module DLL export interface
D:\build\GraphicsMagick\include\wand/magick_wand.h(180) : error C2086: 'const in
t ssize_t': Neudefinition
        D:\build\GraphicsMagick\include\wand/magick_wand.h(180): Siehe Deklarati
on von 'ssize_t'
 [2013-09-24 23:55 UTC] ab@php.net
Automatic comment from SVN on behalf of ab
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=331481
Log: Fixed bug #62034 on Windows. Whereby still thinkable is to reorganize the header inclusions.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 23:01:29 2024 UTC