Bug #76324 [Com]: [ext/gd] cannot detect recent versions of freetype with pkg-config

From: Date: Wed, 04 Jul 2018 12:10:47 +0000
Subject: Bug #76324 [Com]: [ext/gd] cannot detect recent versions of freetype with pkg-config
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216133@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76324&edit=1 ID: 76324 Comment by: fred5 at originsystems dot co dot za 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: Hi Eli? :o) At the outset I should acknowledge that I'm very unfamiliar with the patching process as have never had to do before. I opened bug #76310 because our PHP build - which has always worked perfectly - "suddenly" started applying the incorrect, older OS native freetype version 2.4.11 (instead of 2.7.1). I am under some pressure to get this sorted out as we need to release a new build, so have attempted to use your provided patch as follows: 1. downloaded php-7.2.7.tar.gz release from http://uk3.php.net/distributions 2. extract 3. download your patch (called 0001.patch from now on) to the extracted PHP directory 4. cd to the extracted PHP directory 5. run the command "patch < 0001.patch" (with no switches at all) .... got the errors shown in previous post. I acknowledge this may be completely wrong due to my lack of knowledge and am explaining above simply to make sure the use case is clear when looking at the output. Thanks again for your help on this. Previous Comments: ------------------------------------------------------------------------ [2018-07-03 23:27:13] cmb@php.net Yeah, I'd prefer a PR for visibility and mergability (I've tried to git -am the patch, but that failed for PHP-7.1, PHP-7.2 and master). Regarding the target branch: if in doubt, target master – this can still be adjusted. In this case it might have been a good idea to switch to pkg-config long ago (see also PR 3341[1]), so treating this as bug fix and targeting PHP-7.1 accordingly, might be sensible as well. Anyway, thanks for your efforts, Eli! :) [1] <https://github.com/php/php-src/pull/3341> ------------------------------------------------------------------------ [2018-07-03 23:04:01] eschwartz at archlinux dot org @cmb, if you'd prefer a pull request to a patch, I can open a pull request on Github... which branch should I target? CONTRIBUTING.md suggests, since I'm fixing a bug, I should submit it to PHP-7.1 and let it be cherry-picked upwards? Or is it an RFC which should be submitted to master? I'm used to projects where everything is always submitted to master, no matter what, and only afterward will commits be cherry-picked for older branches, so I'm not really sure what I should do here as the CONTRIBUTING.md is giving me mixed messages. ------------------------------------------------------------------------ [2018-07-03 22:23:27] eschwartz at archlinux dot org I have no idea what that was... ------------------------------------------------------------------------ [2018-07-03 22:22:33] eschwartz at archlinux dot org The patch was generated from git format-patch, and git am should apply it when run from a source checkout on git master. Though actually, it does contain some whitespace changes, because my editor auto-cleans trailing whitespace when saving files... this explains the one rejected hunk in acinclude.m4 (the hunk did not matter) but does not explain how patch was unable to find some files. Did you forget to use -p1 which is required when applying git patches (and many others) to remove the base directories used when diffing two large trees? I'm a bit confused, since patch found acinclude.m4 but not configure.ac... ------------------------------------------------------------------------ [2018-07-03 20:53:38] fred5 at originsystems dot co dot za ================================================================== Output when running against 7.1.18 PHP source tree ================================================================== patching file acinclude.m4 Hunk #9 succeeded at 889 (offset 4 lines). Hunk #10 succeeded at 946 (offset 4 lines). Hunk #11 succeeded at 999 (offset 11 lines). Hunk #12 succeeded at 1029 (offset 11 lines). Hunk #13 succeeded at 1191 (offset 11 lines). Hunk #14 succeeded at 1256 (offset 11 lines). Hunk #15 succeeded at 1293 (offset 11 lines). Hunk #16 succeeded at 1315 (offset 11 lines). Hunk #17 succeeded at 1353 (offset 11 lines). Hunk #18 succeeded at 1374 (offset 11 lines). Hunk #19 succeeded at 1411 (offset 11 lines). Hunk #20 succeeded at 1514 (offset 11 lines). Hunk #21 succeeded at 1522 (offset 11 lines). Hunk #22 succeeded at 1629 (offset 11 lines). Hunk #23 succeeded at 1670 (offset 11 lines). Hunk #24 succeeded at 1716 (offset 11 lines). Hunk #25 succeeded at 1810 (offset 11 lines). Hunk #26 succeeded at 1847 (offset 11 lines). Hunk #27 succeeded at 1937 (offset 11 lines). Hunk #28 succeeded at 2012 (offset 11 lines). Hunk #29 succeeded at 2082 (offset 11 lines). Hunk #30 succeeded at 2119 (offset 11 lines). Hunk #31 succeeded at 2149 (offset 11 lines). Hunk #32 succeeded at 2183 (offset 11 lines). Hunk #33 succeeded at 2312 (offset 5 lines). Hunk #34 succeeded at 2359 (offset 5 lines). Hunk #35 succeeded at 2398 (offset 5 lines). Hunk #36 succeeded at 2433 (offset 5 lines). Hunk #37 succeeded at 2497 (offset 5 lines). Hunk #38 succeeded at 2531 (offset 5 lines). Hunk #39 succeeded at 2613 (offset 5 lines). Hunk #40 succeeded at 2624 (offset 5 lines). Hunk #41 succeeded at 2632 (offset 5 lines). Hunk #42 succeeded at 2655 (offset 5 lines). Hunk #43 succeeded at 2717 (offset 5 lines). Hunk #44 succeeded at 2785 (offset 5 lines). Hunk #45 succeeded at 2867 (offset 5 lines). Hunk #46 succeeded at 2877 (offset 5 lines). Hunk #47 succeeded at 2889 (offset 5 lines). Hunk #48 FAILED at 3317. 1 out of 48 hunks FAILED -- saving rejects to file acinclude.m4.rej patching file pkg.m4 can't find file to patch at input line 775 Perhaps you should have used the -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/configure.ac b/configure.ac |index e18e1de2ef..655e06837b 100644 |--- a/configure.ac |+++ b/configure.ac -------------------------- File to patch: ================================================================== Output when running against 7.2.7 PHP source tree ================================================================== patching file acinclude.m4 Hunk #33 succeeded at 2301 (offset -6 lines). Hunk #34 succeeded at 2348 (offset -6 lines). Hunk #35 succeeded at 2387 (offset -6 lines). Hunk #36 succeeded at 2422 (offset -6 lines). Hunk #37 succeeded at 2486 (offset -6 lines). Hunk #38 succeeded at 2520 (offset -6 lines). Hunk #39 succeeded at 2602 (offset -6 lines). Hunk #40 succeeded at 2613 (offset -6 lines). Hunk #41 succeeded at 2621 (offset -6 lines). Hunk #42 succeeded at 2644 (offset -6 lines). Hunk #43 succeeded at 2706 (offset -6 lines). Hunk #44 succeeded at 2774 (offset -6 lines). Hunk #45 succeeded at 2856 (offset -6 lines). Hunk #46 succeeded at 2866 (offset -6 lines). Hunk #47 succeeded at 2878 (offset -6 lines). Hunk #48 FAILED at 3317. 1 out of 48 hunks FAILED -- saving rejects to file acinclude.m4.rej patching file pkg.m4 patching file configure.ac Hunk #3 succeeded at 689 (offset -17 lines). Hunk #4 succeeded at 711 (offset -17 lines). Hunk #5 succeeded at 798 (offset -31 lines). Hunk #6 succeeded at 808 (offset -31 lines). Hunk #7 succeeded at 841 (offset -31 lines). Hunk #8 succeeded at 931 (offset -31 lines). Hunk #9 succeeded at 1029 (offset -31 lines). Hunk #10 succeeded at 1116 (offset -31 lines). Hunk #11 succeeded at 1235 (offset -31 lines). can't find file to patch at input line 884 Perhaps you should have used the -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 |index c3ff5ece24..2a9d8e3570 100644 |--- a/ext/gd/config.m4 |+++ b/ext/gd/config.m4 -------------------------- File to patch: ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=76324 -- Edit this bug report at https://bugs.php.net/bug.php?id=76324&edit=1

« previous php.bugs (#216133) next »