php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67365 imagick 3.2 branch fails to build as shared extension on Windows
Submitted: 2014-05-31 20:11 UTC Modified: 2014-07-01 16:34 UTC
From: ch1902a at gmail dot com Assigned:
Status: Not a bug Package: imagick (PECL)
PHP Version: 5.5.13 OS: Windows 8.1 64-bit
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: ch1902a at gmail dot com
New email:
PHP Version: OS:

 

 [2014-05-31 20:11 UTC] ch1902a at gmail dot com
Description:
------------
Trying to build imagick as a shared extension fails with 3 "definition of dllimport function not allowed" errors. Comparing the 3.1 and 3.2 branches it seems the #define MY_IMAGICK_EXPORTS __declspec(dllexport) got lost. 

Expected result:
----------------
Build should work and produce php_imagick.dll

Actual result:
--------------
C:\dev\php-sdk\phpdev\vc11\x86\5.5.12>configure --disable-all --enable-cli --enable-object-out-dir=../obj/ --with-imagick=shared
Saving configure options to config.nice.bat
Checking for cl.exe ...  <in default path>
  Detected compiler MSVC11 (Visual C++ 2012)
  Detected 32-bit compiler
Checking for link.exe ...  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN
Checking for nmake.exe ...  <in default path>
Checking for lib.exe ...  <in default path>
Checking for bison.exe ...  <in default path>
Checking for re2c.exe ...  <in default path>
  Detected re2c version 0.13.5
Checking for zip.exe ...  <in default path>
Checking for lemon.exe ...  <not found>
Checking for mc.exe ...  C:\Program Files (x86)\Windows Kits\8.0\bin\x86
Checking for mt.exe ...  C:\Program Files (x86)\Windows Kits\8.0\bin\x86

Build dir: C:\dev\php-sdk\phpdev\vc11\x86\obj\Release_TS
PHP Core:  php5ts.dll and php5ts.lib

Checking for wspiapi.h ...  <in default path>
Enabling IPv6 support
Enabling SAPI sapi\cli
Enabling extension ext\date
Enabling extension ext\ereg
Enabling extension ext\pcre
Enabling extension ext\reflection
Enabling extension ext\spl
Checking for timelib_config.h ...  ext/date/lib
Enabling extension ext\standard
Checking for wand/MagickWand.h ...  C:\dev\php-sdk\phpdev\vc11\x86\deps\include\imagemagick
Checking for library CORE_RL_wand_.lib ... ..\deps\lib\imagemagick\CORE_RL_wand_.lib
Checking for library CORE_RL_magick_.lib ... ..\deps\lib\imagemagick\CORE_RL_magick_.lib
Enabling extension ..\pecl\imagick [shared]

Creating build dirs...
Generating files...
Generating Makefile
Generating main/internal_functions.c
        [content unchanged; skipping]
Generating main/config.w32.h
Generating phpize
Done.



Enabled extensions:
-----------------------
| Extension  | Mode   |
-----------------------
| date       | static |
| ereg       | static |
| imagick    | shared |
| pcre       | static |
| reflection | static |
| spl        | static |
| standard   | static |
-----------------------


Enabled SAPI:
-------------
| Sapi Name |
-------------
| cli       |
-------------


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


Type 'nmake' to build PHP

C:\dev\php-sdk\phpdev\vc11\x86\5.5.12>nmake

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

Recreating build dirs
Recreating build dirs
imagick.c
MagickWand lib static interface
MagickWand module static interface
MagickCore lib static interface
MagickCore module static interface
..\pecl\imagick\imagick.c(57) : error C2491: 'php_imagick_get_class_entry' : definition of dllimport function not allowed
..\pecl\imagick\imagick.c(62) : error C2491: 'php_imagickdraw_get_class_entry' : definition of dllimport function not allowed
..\pecl\imagick\imagick.c(67) : error C2491: 'php_imagickpixel_get_class_entry' : definition of dllimport function not allowed
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\cl.exe"' : return code '0x2'
Stop.

C:\dev\php-sdk\phpdev\vc11\x86\5.5.12>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-01 16:34 UTC] ab@php.net
-Status: Open +Status: Not a bug
 [2014-07-01 16:34 UTC] ab@php.net
Are you sure to be using the current sources? In the current it's PHP_IMAGICK_API. Please check the current master.

Thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 17:01:32 2024 UTC