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

Postgres include dir not recognoized when specified via command line

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.2
    • 5.9.1
    • Build System
    • None
    • 7cbd13b76ae79186848b946bd0cbfe4042fcf4dd

    Description

      When I try to set PSQL_INCDIR or PSQL_LIBDIR as described in config_help.txt ( http://code.qt.io/cgit/qt/qtbase.git/tree/config_help.txt ), those settings are not used when checking for the postgres libraries/headers inside qtConfLibrary_psqlEnv().

      It looks like qtConfLibrary_inline() needs two parameters ($$1 and $$2) but qtConfLibrary_psqlEnv() only passes one:

      http://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/features/qt_configure.prf#n493

      defineTest(qtConfLibrary_inline) {
          lib = $$eval($${1}.library)
          !defined($${1}.libs, var): \
              error("'inline' source in library '$$lib' does not specify 'libs'.")
      
          # if multiple libraries provide the same export, it makes sense
          # to make them recognize the same input variables.
          input = $$eval($${2}.alias)  <<-- here the second parameter is needed
      ...
          incdir = $$val_escape(config.input.$${input}.incdir) <<--- and here the passed incdir is read
      

      http://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/sqldrivers/configure.pri#n33

       

      defineTest(qtConfLibrary_psqlEnv) {
          # Respect PSQL_LIBS if set
          PSQL_LIBS = $$getenv(PSQL_LIBS)
          !isEmpty(PSQL_LIBS) {
              $${1}.libs = $$PSQL_LIBS
              export($${1}.libs)
          } else {
              !qtConfLibrary_inline($$1): \<<-- only one parameter passed to the function
                  return(false)
          }
          return(true)
      }
      

      When I change it to qtConfLibrary_inline($$1, $$2) all works fine but I'm unsure if this is the right fix ...

       

       

      Attachments

        1. config_fail.log
          10 kB
        2. config_success.log
          10 kB

        Issue Links

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

          Activity

            People

              jarekk Jaroslaw Kubik
              chehrlic Christian Ehrlicher
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes