Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654792 (freetype-config) - [tracker] Packages failing with >=media-libs/freetype-2.9.1-r2 because of missing /usr/bin/freetype-config
Summary: [tracker] Packages failing with >=media-libs/freetype-2.9.1-r2 because of mis...
Status: RESOLVED FIXED
Alias: freetype-config
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
: 654962 (view as bug list)
Depends on: 654752 654758 654770 654788 654794 654814 654828 654884 654886 654894 654902 654978 654984 655032 655036 655040 655042 655052 655130 655132 655240 655272 655358 655374 655530 655798 655884 656448 656770 657998 658424 658534 659374 661590 661668 662206 664818 670436 764902 783375 788136
Blocks:
  Show dependency tree
 
Reported: 2018-05-04 06:17 UTC by Milos Ivanovic
Modified: 2021-05-19 21:16 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Ivanovic 2018-05-04 06:17:07 UTC
After a routine `emerge -avuDN world` I noticed my PHP packages (5.6, 7.0 and 7.2) failed to complete the configure phase for the same reason:

...snip...
checking for FreeType 2... /usr
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
If configure fails try --with-webp-dir=<DIR>
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
configure: error: freetype-config not found.
...snip...

I checked my freetype version and noticed it was bumped from 2.9 to 2.9.1 during my previously-mentioned world update. I didn't suspect breaking changes due to semantic versioning, but when I checked the project's website (https://sourceforge.net/projects/freetype/files/freetype2/2.9.1) I was surprised to find that it did in fact contain breaking changes:

- Use  of  the `freetype-config'  script  to  get compilation  and
  linking  options   is  deprecated   since  it   doesn't  support
  cross-compiling, among other  deficiencies.  Instead, you should
  use the `pkg-config' interface.

  The `configure'  script no longer installs  `freetype-config' by
  default.  For  backwards compatibility,  a new  configure option
  `--enable-freetype-config'   is  provided   that  reverts   this
  decision.

We can either enable this new configure option `--enable-freetype-config' in the freetype-2.9.1 ebuild, or perhaps this should be filed with PHP to use pkg-config instead so that the build does not fail when trying to use freetype 2.9.1, since freetype-config is deprecated after all.

Other packages which are expecting the older interface might also be failing to build, however I've only experienced this with PHP thus far.

I have temporarily reverted to 2.9 to fix the problem until a permanent solution is introduced.
Comment 1 Seong-ho Cho 2018-05-04 06:38:04 UTC
*** Bug 654794 has been marked as a duplicate of this bug. ***
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-05-04 06:38:46 UTC
Let's turn this into a tracker bug. Packages should really use pkg-config to find freetype.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2018-05-04 14:05:12 UTC
We see failing packages because you choose to set --disable-freetype-config and you have a security issue that requires this tracker to be resolved? Why can't you add USE=freetype-config, mask that for now, and resolve the blockers later?
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-05-04 16:25:55 UTC
(In reply to Jeroen Roovers from comment #3)
> We see failing packages because you choose to set --disable-freetype-config

Wrong. Even if I hadn't set that configure option the freetype-config file would not have been installed. This has been made an opt-in option as can be seen here:

https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=a7833f26c4ac45cafe1dffdcd7f7dcfd6493161c

and I chose to use this opportunity to get rid of this ancient crap.
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-05-05 20:25:20 UTC
*** Bug 654962 has been marked as a duplicate of this bug. ***
Comment 6 Larry the Git Cow gentoo-dev 2018-05-10 19:15:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c6cbca69804ed1334671fc3a62feae93943dc6d

commit 7c6cbca69804ed1334671fc3a62feae93943dc6d
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-05-10 19:14:44 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-05-10 19:15:29 +0000

    media-libs/freetype: Add back freetype-config to -r1
    
    in order to have a sane stable candidate.
    Added -r2 which - again - lacks freetype-config.
    
    Bug: https://bugs.gentoo.org/654792
    Package-Manager: Portage-2.3.36, Repoman-2.3.9

 media-libs/freetype/freetype-2.9.1-r1.ebuild |   2 +-
 media-libs/freetype/freetype-2.9.1-r2.ebuild | 234 +++++++++++++++++++++++++++
 2 files changed, 235 insertions(+), 1 deletion(-)
Comment 7 Greg Turner 2018-08-07 21:19:02 UTC
The script is clearly stupid and over engineered (not to mention deprecated) but it does try to call pkg-config, which kinda seems like it could be worse.

If and when freetype gets around to eliminating all the other projects will deal with it.  Until then, I predict quasi-abandonware high-inertia projects won't budge, forcing half of the maintainers of the above ebuilds to carry a bunch of autocruft, and forcing end-users to implement overlays or /etc/portage/env hacks to revert this (which happens to be how I spent the last hour or so, hence my coming here to bitch and moan...)

In your opinion, is there reason to believe freetype-config removal is imminent?  Or will it more likely take years or even conceivably outlive freetype entirely?  You likely know better than I...  If the former, OK.

But if the latter, why not just set

  MULTILIB_CHOST_TOOLS=(/usr/bin/freetype-config)

Instead of drop?  It's purpose built gentoo automagic for exactly these foo-config hassles and should really work OK for cross-compiles, multilib, what-have-you, after all...
Comment 8 Another Mortal 2019-01-19 18:13:37 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #4)
> (In reply to Jeroen Roovers from comment #3)
> > We see failing packages because you choose to set --disable-freetype-config
> 
> Wrong. Even if I hadn't set that configure option the freetype-config file
> would not have been installed.

Actually, that's only partially wrong.
If you change 'dis' to 'en' in that line of the ebuild,
freetype-config will get build and installed.

That's all I had to do to get netsurf to build.

I second the motion for a USE flag, until we still
have ebuild that fail due to freetype-config missing.