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

external dependencies for building Qt5

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.0 Beta 1
    • 5.0.1
    • Build System
    • None
    • Windows

    • 59a3abd1f1429eef19e178e880070c3c1d902fba

    Description

      Qt5 is dependent on a variety of external libraries for various modules/projects/examples etc. Unfortunately, Qt's build system provides little control over the linked libraries on Windows. Furthermore, it proceeds to take decisions about the location, naming and flavor of the libraries it links against, or links each and every binary generated against all those libraries due to limitations of the building system. I think there are many many bugs being reported that are relevant to this broader problem and I think if this is addressed it will solve a large number of bugs that are the source of this, as well as save us end-users an immense amount of time and frustration.

      I will point you to two recent bugs I have been trying to resolve, in hope of properly building Qt5 statically: QTBUG-29478 & QTBUG-29985

      To solve this once and for good I suggest for each library Qt is linked against on Windows to provide configure-time options such as:

      -library-<shared/static>
      LIBRARY_LIBS="-llibrary_a -llibrary_b ..."
      LIBRARY_HEADERS="-I<path\to\headers>"
      LIBRARY_LFLAGS="-L<library\search\path>"

      These could then be mapped to qmake variables:

      QT_LIBRARY_LIBS="-llibrary_a -llibrary_b ..."
      QT_LIBRARY_HEADERS="-I<path\to\headers>"
      QT_LIBRARY_LFLAGS="-L<library\search\path>"

      and therefore each project/module requiring any of the libraries can just read the values of these variables as they are (no automatic detection of lib name and directories is needed!!). This would provide maximum flexibility allowing the user to choose the libraries he wants to link against.

      The premise is that each library will be isolated within the build system living entirely into the respective variables, without poisoning binaries that shouldn't even know about them. It will also allow proper documentation to be provided for each library separately, as well as limitation on which modules can be build and what they require.

      Currently, there are problems with examples being built assuming the built is shared, as well as various libraries (mysql, openssl, icu) that are linked from every binary, which is apparently not necessary (e.g. not every module/example requires ICU's headers and they shouldn't be present when building one of those).

      It would be great if even a plan is laid out to rectify this and apologies for the lengthy post.

      Attachments

        Issue Links

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

          Activity

            People

              buddenha Oswald Buddenhagen
              sigmoidal sigma
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes