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

Build failure related to fontdatabase / fontconfig

XMLWordPrintable

    • macOS
    • ccdeb2cfa (dev), 5a795793e (6.8), 324b8e042 (6.7), ee64ffc0f (tqtc/lts-6.5)

      On our KDE macOS builder the build of QtBase 6.5.0 fails with the following error:

      /Users/gitlab/ws/builds/GZwHuM5x/0/sysadmin/ci-management/macos-arm-clang/build/libs/qt6/qtbase/work/qtbase-everywhere-src-6.5.0/src/plugins/platforms/minimal/qminimalintegration.cpp:24:12: fatal error: 'QtGui/private/qgenericunixfontdatabase_p.h' file not found
      # include <QtGui/private/qgenericunixfontdatabase_p.h>
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
      [2401/2750] Building CXX object src/opengl/CMakeFiles/OpenGL.dir/qopenglcustomshaderstage.cpp.o

      I had quick look at the source code and it seems to me like a bug, rather than a misuse on our side. However don't take that this evaluation to serious.

       

      I was able to fix the build with the following patch:

      diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
      index 5b8bc278e9..2d0c84bfb8 100644
      --- a/src/gui/CMakeLists.txt
      +++ b/src/gui/CMakeLists.txt
      @@ -684,12 +684,12 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_freetype
               WrapFreetype::WrapFreetype
       )
       
      -qt_internal_extend_target(Gui CONDITION UNIX AND NOT APPLE
      +qt_internal_extend_target(Gui CONDITION UNIX
           SOURCES
               text/unix/qgenericunixfontdatabase_p.h
       )
       
      -qt_internal_extend_target(Gui CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_freetype AND UNIX AND NOT APPLE
      +qt_internal_extend_target(Gui CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_freetype AND UNIX
           SOURCES
               text/unix/qfontconfigdatabase.cpp text/unix/qfontconfigdatabase_p.h
               text/unix/qfontenginemultifontconfig.cpp text/unix/qfontenginemultifontconfig_p.h

      As I said, it fixes the build, but I don't know if it makes sense (to enable fontconfig on macOS) and I did not test if it causes any runtime issues.

      Note: This is my first Qt bug report, I hope I did it correct. Let me know if I can improve anything.

        For Gerrit Dashboard: QTBUG-116083
        # Subject Branch Project Status CR V

            semlanik Alexey Edelev
            jlskuz Julius Künzel
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes