Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57436

[MSYS2] fontconfig detection fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • None
    • 5.8.0 Beta, 5.12.0 RC
    • Build System
    • None
    • MSYS2 32bit
    • 69f6d3bd44e4e2d36ef741a1914227f804504141

    Description

      Hi, this is the first of a series of reports aiming to build Qt on MSYS2 without extra patches.
      As you probably already know, MSYS2 is a Windows build system, but with Linux-like features that might confuse the Qt build system.

      After cloning the current 5.8 GIT cources, if I invoke configure like this:

      ./configure -release -opensource -confirm-license -platform win32-g++ -prefix /opt/qt5-git -opengl desktop -pkg-config -system-freetype -fontconfig

      I get an error at the end that says:

      ERROR: Feature 'fontconfig' was enabled, but the pre-condition '!config.win32 && !config.darwin && features.system-freetype && libs.fontconfig' failed.

      The issue is in qtbase/src/gui/configure.json where fontconfig is considered to be a linux package only.
      Instead, on MSYS2 (and on macOS macports/homebrew), fontconfig could be present and can be detected via pkg-config

      Allowing Windows to use fontconfig has reflections also on qtbase/src/platformsupport/fontdatabases/fontdatabases.pro and on qtbase/src/plugins/platforms/minimal/qminimalintegration.cpp.
      Patch attached

      Attachments

        1. config.log
          95 kB
        2. configure_report.txt
          15 kB
        3. fontconfig.patch
          1 kB
        4. pkg-config_list-all.txt
          11 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              mcallegari79 Massimo Callegari
              mcallegari79 Massimo Callegari
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes