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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 13:01:30 2025 UTC