php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81639 GD does not allow to import exported symbols on Windows
Submitted: 2021-11-19 15:11 UTC Modified: 2021-11-19 16:00 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Wont fix Package: GD related
PHP Version: 7.4Git-2021-11-19 (Git) OS: Windows
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cmb@php.net
New email:
PHP Version: OS:

 

 [2021-11-19 15:11 UTC] cmb@php.net
Description:
------------
External extension (e.g. PECL/ps) may want to link to GD, but that
is not possible on Windows, because the PHP_GD_API symbols are not
declared as __declspec(import) when building these extensions,
resulting in LNK2019 errors[1].

This is particularly surprising, since there is even a respective
comment in the GD sources, claiming that phpi_get_le_gd() is
needed for cpdf[2].

[1] <https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2019?view=msvc-170>
[2] <https://github.com/php/php-src/blob/php-7.4.26/ext/gd/gd.c#L1414>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-11-19 15:11 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2021-11-19 16:00 UTC] cmb@php.net
-Status: Assigned +Status: Wont fix
 [2021-11-19 16:00 UTC] cmb@php.net
Argh!  That has already been done for PHP-8.0[1], and given the
unfortunate naming of php_gd2.dll we can't use ADD_EXTENSION_DEP()
anyway for PHP 7, so I'm closing this as WONTFIX.

[1] <https://github.com/php/php-src/commit/340e2ead7719266bd54ec16f1740d5b862cf11f8>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 08:01:28 2024 UTC