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

PostgreSQL test can not pass when cross compiling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.8
    • Build System
    • None
    • Raspberry Pi from Ubuntu 16.04

    Description

      When cross compiling the PostgreSQL test uses the host system's pkgconfig rules to get the include and libs values. This can been seen in the custom rule in qt_configure.prf:

      defineTest(qtConfTest_psqlCompile) {
          pg_config = $$config.input.psql_config
          isEmpty(pg_config): \
              pg_config = $$qtConfFindInPath("pg_config")
          !win32:!isEmpty(pg_config) {
              libdir = $$system("$$pg_config --libdir")
              libdir -= $$QMAKE_DEFAULT_LIBDIRS
              !isEmpty(libdir): libs = "-L$$libdir"
              libs += "-lpq"
              $${1}.libs = $$libs
              $${1}.includedir = $$system("$$pg_config --includedir")
              $${1}.includedir -= $$QMAKE_DEFAULT_INCDIRS
              !isEmpty($${1}.includedir): \
                  $${1}.cflags = "-I$$eval($${1}.includedir)"
          }
      
          # Respect PSQL_LIBS if set
          PSQL_LIBS = $$getenv(PSQL_LIBS)
          !isEmpty($$PSQL_LIBS): $${1}.libs = $$PSQL_LIBS
      
          export($${1}.libs)
          export($${1}.includedir)
          export($${1}.cflags)
      
          qtConfTest_compile($${1}): return(true)
          return(false)
      }
      

      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
              janichol Andy Nichols
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes