Edit report at https://bugs.php.net/bug.php?id=76324&edit=1
ID: 76324
Updated by: cmb@php.net
Reported by: eschwartz at archlinux dot org
Summary: [ext/gd] cannot detect recent versions of freetype
with pkg-config
Status: Open
Type: Bug
Package: Compile Failure
Operating System: unix-like
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This is related to bug #76310 â at least I presume that issue
would be resolved by switching to pkg-config. I've practically no
experience with pkg-config, so a patch or preferably a pull
request would be welcome. I'm not sure which PHP version to
target; 5.6 and 7.0 are for security fixes only, and to avoid
issues with stable versions (7.1 and 7.2) it might be best to
target master only.
Previous Comments:
------------------------------------------------------------------------
[2018-05-10 15:54:07] eschwartz at archlinux dot org
Description:
------------
To be more specific, it's using freetype-config to detect freetype, and doesn't try using
pkg-config at all.
This is wrong, as pkg-config is a comprehensive standard which should be used whenever possible, as
in fact php tries to do in other areas *before* falling back on legacy "foo-config" style
shellscripts.
This is also problematic, since https://savannah.nongnu.org/bugs/?53093 removed
the freetype-config script by default, meaning that for the current version of freetype and all
future versions it cannot be relied upon to exist.
Meanwhile, it has been available via pkg-config for approximately 15 years. Since https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=1c513fbb8872bfac5631964963b6a751169a1ce6
freetype-config will even do its best to invoke pkg-config on your behalf (but not entirely
successfully in all cases, see the referenced bug).
There's no good reason to continue using the -config wrapper at all.
Expected result:
----------------
php versions 5.6 through 7.2 (any and all supported versions) should compile on Arch Linux with
freetype >= 2.9.1
Actual result:
--------------
No versions of php will compile, aborting with the error message:
configure: error: freetype-config not found.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76324&edit=1