php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65823 Cant compile VC9 and IM 6.8.7.0 Q8
Submitted: 2013-10-03 06:31 UTC Modified: 2013-10-03 06:54 UTC
From: tomkrawc at gmail dot com Assigned: mkoppanen (profile)
Status: Closed Package: imagick (PECL)
PHP Version: Irrelevant OS: Winsows XP
Private report: No CVE-ID: None
 [2013-10-03 06:31 UTC] tomkrawc at gmail dot com
Description:
------------
During compilation PHP 5.3.26 and imagick 3.1.2 and 3.1.1 with VC9 and headers and libraries from ImageMagick 6.8.7.0 Q8 I get this errors:

-------------------------------------------
|               |                         |
-------------------------------------------
| Build type    | Release                 |
| Thread Safety | Yes                     |
| Compiler      | MSVC9 (Visual C++ 2008) |
| Architecture  | x86                     |
-------------------------------------------


Type 'nmake' to build PHP

D:\dev\php-5.3.26\vc9\x86\php-5.3.26>nmake

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

Recreating build dirs
        type ext\pcre\php_pcre.def > Release_TS\php5ts.dll.def
        "C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\mc.exe" -h win32\ -r Release_TS\ -x Release_TS\ win32\build\wsyslog.mc
MC: Compiling win32\build\wsyslog.mc
imagick.c
D:\dev\php-5.3.26\vc9\x86\deps\include\magick/magick-baseconfig.h(179) : warning C4005: 'inline' : macro redefinition
        d:\dev\php-5.3.26\vc9\x86\php-5.3.26\zend\zend_config.w32.h(67) : see previous definition of 'inline'
MagickWand lib static interface
MagickWand module static interface
MagickCore lib static interface
MagickCore module static interface
imagick_class.c
D:\dev\php-5.3.26\vc9\x86\deps\include\magick/magick-baseconfig.h(179) : warning C4005: 'inline' : macro redefinition
        d:\dev\php-5.3.26\vc9\x86\php-5.3.26\zend\zend_config.w32.h(67) : see previous definition of 'inline'
MagickWand lib static interface
MagickWand module static interface
MagickCore lib static interface
MagickCore module static interface
ext\imagick\imagick_class.c(6144) : warning C4101: 'status' : unreferenced local variable
ext\imagick\imagick_class.c(6636) : warning C4090: 'function' : different 'const' qualifiers
ext\imagick\imagick_class.c(6669) : error C2143: syntax error : missing ';' before 'type'
ext\imagick\imagick_class.c(6670) : error C2065: 'found' : undeclared identifier
ext\imagick\imagick_class.c(6674) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6674) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6674) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6675) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6675) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6677) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6677) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6677) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6678) : error C2065: 'found' : undeclared identifier
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\Bin\cl.exe"' : return code '0x2'
Stop.

The same with PHP 5.4.16

-------------------------------------------
|               |                         |
-------------------------------------------
| Build type    | Release                 |
| Thread Safety | Yes                     |
| Compiler      | MSVC9 (Visual C++ 2008) |
| Architecture  | x86                     |
-------------------------------------------


Type 'nmake' to build PHP

D:\dev\php-5.4.16\vc9\x86\php-5.4.16>nmake

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

Recreating build dirs
        type ext\pcre\php_pcre.def > Release_TS\php5ts.dll.def
        "C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\mc.exe" -h win32\ -r Release_TS\ -x Release_TS\ win32\build\wsyslog.mc
MC: Compiling win32\build\wsyslog.mc
imagick.c
D:\dev\php-5.4.16\vc9\x86\deps\include\magick/magick-baseconfig.h(179) : warning C4005: 'inline' : macro redefinition
        d:\dev\php-5.4.16\vc9\x86\php-5.4.16\zend\zend_config.w32.h(67) : see previous definition of 'inline'
MagickWand lib static interface
MagickWand module static interface
MagickCore lib static interface
MagickCore module static interface
imagick_class.c
D:\dev\php-5.4.16\vc9\x86\deps\include\magick/magick-baseconfig.h(179) : warning C4005: 'inline' : macro redefinition
        d:\dev\php-5.4.16\vc9\x86\php-5.4.16\zend\zend_config.w32.h(67) : see previous definition of 'inline'
MagickWand lib static interface
MagickWand module static interface
MagickCore lib static interface
MagickCore module static interface
ext\imagick\imagick_class.c(6144) : warning C4101: 'status' : unreferenced local variable
ext\imagick\imagick_class.c(6636) : warning C4090: 'function' : different 'const' qualifiers
ext\imagick\imagick_class.c(6669) : error C2143: syntax error : missing ';' before 'type'
ext\imagick\imagick_class.c(6670) : error C2065: 'found' : undeclared identifier
ext\imagick\imagick_class.c(6674) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6674) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6674) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6675) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6675) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6677) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6677) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6677) : error C2065: 'i' : undeclared identifier
ext\imagick\imagick_class.c(6678) : error C2065: 'found' : undeclared identifier
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\Bin\cl.exe"' : return code '0x2'
Stop.


Test script:
---------------
Compiling using PHP steb by step build.

Expected result:
----------------
Compilation with no "undeclared identifier" errors.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-03 06:47 UTC] tomkrawc at gmail dot com
I solved this. It's VC9 supported C standard issue.

Complilation goes when 

#6669  int i, found = 0;

is just bellow

#6645  size_t num_keys;

So, just move line 6669 to line 6645.
 [2013-10-03 06:54 UTC] mkoppanen@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: mkoppanen
 [2013-10-03 06:54 UTC] mkoppanen@php.net
I think Windows issues are fixed in current master: https://github.com/mkoppanen/imagick/
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 17:01:34 2024 UTC