|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74443 When building gd, the already installed headers interfere
Submitted: 2017-04-14 17:22 UTC Modified: 2021-09-05 04:22 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mi+php at aldan dot algebra dot com Assigned: cmb (profile)
Status: No Feedback Package: GD related
PHP Version: 7.0.18 OS: All
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-04-14 17:22 UTC] mi+php at aldan dot algebra dot com
This may well be a problem with other modules as well, but I've experienced it with gd, when trying to build the variant using the system-provided libgd, while the variant using bundled gd was already installed.

The problem is thus:

 . Extension code (such as gd.c) #includes global "php_config.h"
 . Because a version of gd-module is already installed, the php_config.h #includes "ext/gd/config.h"
 . The above causes the already-installed "ext/gd/config.h" to be included instead of the one just-generated in the build-directory

The attached patch prepends "-I../.." to the gd-module's CFLAGS, which causes the build-directory itself to be considered first.


patch-inc-dirs (last revision 2017-04-14 17:23 UTC by mi+php at aldan dot algebra dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-08-26 12:35 UTC]
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2021-08-26 12:35 UTC]
Is this still an issue with any of the actively supported PHP

[1] <>
 [2021-08-26 16:47 UTC]
-Status: Verified +Status: Feedback
 [2021-09-05 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Feb 05 16:05:48 2023 UTC