bugThe FreeType Project - Bugs: bug #53093, Please drop freetype-config


You are not allowed to post comments on this tracker with your current authentication level.

bug #53093: Please drop freetype-config

Submitter:  Hugh McMaster <hmc>
Submitted:  Thu 08 Feb 2018 10:42:53 AM UTC
Severity:  3 - Normal Item Group:  Wishlist
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.9.1

( Jump to the original submission )

Thu 08 Mar 2018 05:39:37 AM UTC, comment #10: 

Thanks a lot, committed!

Werner LEMBERG <wl>
Project Administrator
Wed 07 Mar 2018 11:48:53 AM UTC, comment #9: 

Hi Werner,

Please see patch #9580.


Hugh McMaster <hmc>
Sat 24 Feb 2018 05:59:44 AM UTC, comment #8: 

I'm still quite busy, so yes, if you could prepare a patch this would be a big help.

Werner LEMBERG <wl>
Project Administrator
Fri 23 Feb 2018 06:49:14 AM UTC, comment #7: 

Hi Werner,

Just checking in. Do you need help with patches or testing for the new ‘configure’ option?


Hugh McMaster <hmc>
Thu 15 Feb 2018 10:31:31 AM UTC, comment #6: 

Hi Werner,

I don't believe there is a way to deprecate freetype-config in a backwards-compatible way.
That said, your suggestion of allowing users to choose whether to install freetype-config via `configure' is a very good first step.

Debian, Ubuntu and Linux Mint will obviously choose to not install freetype-config for the reasons outlined in earlier posts.

This change, though, will help to shift developers away from freetype-config, perhaps allowing full removal of the script at some point in the future.

Thank you for your consideration with this request.

Hugh McMaster <hmc>
Thu 15 Feb 2018 06:30:07 AM UTC, comment #5: 

Thanks for the detailed information.

Perhaps a misunderstanding: I fully agree with your analysis, but I'm not sure how to deprecate `freetype-config' in a backwards-compatible way.

I'm quite sure that I won't remove the script.  Instead, I'll probably add a configuration option that will install `freetype-config`.

Werner LEMBERG <wl>
Project Administrator
Tue 13 Feb 2018 11:36:45 AM UTC, comment #4: 

For background information:

Debian has been working to make all of its packages multi-arch compatible for several years. Multi-arch support allows packages from foreign architectures to be installed on the native architecture  host and used for cross-compiling or running non-native programs. So users can co-install i386 packages and programs on their native amd64 system, for example.

As part of the multi-arch process, maintainers must ensure that header files and executables (binaries, scripts, etc.) do not conflict.

Freetype-config conflicts across architectures, due to the hard-coded libdir path. In Debian, the path output of '--libs' is not used, so I patched the source to remove it.

While the patch resolved the conflict, allowing the package to become multi-arch installable, we encountered unresolvable problems that prevent cross-compiling.

For example, when freetype is installed for a foreign architecture (and pkg-config is installed), freetype-config does not function as expected.

Wrapper calls to "pkg-config ... freetype2" either fail because freetype2.pc is not found (because pkg-config is looking in the native architecture's PKG_CONFIG_PATH), or the script returns output for the native architecture instead.

In these cases, freetype-config is returning success or failure for the native architecture, never the foreign architecture. For cross-building to work, pkg-config must be prefixed with the GNU triplet, e.g. i686-linux-gnu-pkg-config, but freetype-config is incapable of doing this. Plus, Debian will not support such a change, since it would break multi-arch support in the package.

Cross-building also fails when freetype is installed for both native and foreign architectures. In this case, freetype-config outputs values for the native architecture, not the foreign architecture, due to a lack of multi-arch awareness.

In addition, Debian cannot use the autoconf-substituted values, because these are limited to the architecture for which freetype-config was first installed (typically native).

For these reasons, Debian has decided to remove freetype-config from its freetype package. We are also actively removing legacy foo-config scripts in favour of pkg-config.

Given freetype's strong support of pkg-config (as noted in my original post), we urge you to drop freetype-config from your releases as well.

Thank you

Hugh McMaster <hmc>
Mon 12 Feb 2018 09:58:05 PM UTC, comment #3: 

Thanks, Werner. I’ll post some background to Debian’s decision when I finish work later today.

Hugh McMaster <hmc>
Mon 12 Feb 2018 07:04:53 PM UTC, comment #2: 

I've seen it, thanks, but I'm still not sure how to proceed.  Please stay tuned.

Werner LEMBERG <wl>
Project Administrator
Mon 12 Feb 2018 11:33:30 AM UTC, comment #1: 


Have you had any time to consider my request to drop freetype-config? Or is this a topic I need to raise on the freetype-devel mailing list?

I am happy to provide patches for this request, if you would prefer.

Kind regards,

Hugh McMaster <hmc>
Thu 08 Feb 2018 10:42:53 AM UTC, original submission:  

The freetype-config interface has been deprecated for many years, with pkg-config being the preferred method of obtaining CFLAGS and libs for several years now.

The interface has also been a wrapper for pkg-config since February 2017.

FreeType has had pkg-config support since 2.1.5 was released in 2003, so it is comfortably available everywhere.

In addition, freetype-config(1) has recommended developers use pkg-config since March 2014.

Debian will drop freetype-config in its next freetype2 package release. We ask you to consider doing the same.

In preparing for this change, freetype.m4 will need to be patched (or dropped as well). Something like the following should work:

   PKG_CHECK_MODULES([FT2], [freetype2 >= $1], [$2], m4_if([$3], [], [:], [$3]))

Thank you


Hugh McMaster <hmc>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by hmc (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-08 wl StatusNone Fixed
        Assigned toNone wl
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.9.1

    Back to the top

    Powered by Savane 3.11