Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Trouble building QPSQL from Qt 5.0.2 on Linux
QtWS25 Last Chance

[SOLVED] Trouble building QPSQL from Qt 5.0.2 on Linux

Scheduled Pinned Locked Moved General and Desktop
11 Posts 2 Posters 5.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    ybailly
    wrote on last edited by
    #1

    Greetings all,

    I've just downloaded and installed Qt 5.0.2 using the installer provided on qt-project.org. Did a full install, including all the sources.

    I then need to build the PostgreSQL driver. The documentation from $INSTALL/5.0.2/gcc_64/doc/qtsql/sql-driver.html#qpsql tells me about a project file $QTDIR/src/plugins/sqldrivers/psql/psql.pro... but no luck, this file no longer exists, there's only a qsql_psql.pri file in this directory (by the way, I had to guess $QTDIR refers to $INSTALL/5.0.2/Src/qtbase/...)

    Reading the README.module file two folders up tells me to use "configure", but I really don't want to rebuild the whole Qt for a single, small driver...

    So how can I build the PostgreSQL driver?

    Thanks for any hint.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbnoimi
      wrote on last edited by
      #2

      [quote author="ybailly" date="1367070506"]Greetings all,

      I've just downloaded and installed Qt 5.0.2 using the installer provided on qt-project.org. Did a full install, including all the sources.[/quote]

      Yes, you can choose to install the full source code through installer wizard.

      bq. I then need to build the PostgreSQL driver. The documentation from $INSTALL/5.0.2/gcc_64/doc/qtsql/sql-driver.html#qpsql tells me about a project file $QTDIR/src/plugins/sqldrivers/psql/psql.pro... but no luck, this file no longer exists, there's only a qsql_psql.pri file in this directory (by the way, I had to guess $QTDIR refers to $INSTALL/5.0.2/Src/qtbase/...)

      Reading the README.module file two folders up tells me to use "configure", but I really don't want to rebuild the whole Qt for a single, small driver...

      So how can I build the PostgreSQL driver?

      Thanks for any hint.

      For building PostgreSQL driver in case you installer Qt (in this path /opt/Qt5.0.2/)

      @cd /opt/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/sqldrivers/psql/
      qmake "INCLUDEPATH+=/usr/include/postgresql" "LIBS+=-L/usr/lib -lpq" psql.pro
      make@

      In case you're using any ubuntu based distro you've to be sure that libpq-dev already installed.

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        ybailly
        wrote on last edited by
        #3

        This is what is written in the documentation. But as I have stated in my initial post, the file "psql.pro" is simply not here, I only have a qsql_psql.pri file in the directory /opt/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/sqldrivers/psql/.

        Is there something wrong in the archive I downloaded??

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mbnoimi
          wrote on last edited by
          #4

          [quote author="ybailly" date="1367141056"]Is there something wrong in the archive I downloaded??[/quote]

          Did you've downloaded the installer or the Zipped source code?

          1 Reply Last reply
          0
          • Y Offline
            Y Offline
            ybailly
            wrote on last edited by
            #5

            As I said, I used the installer. URL: http://download.qt-project.org/official_releases/qt/5.0/5.0.2/qt-linux-opensource-5.0.2-x86_64-offline.run

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mbnoimi
              wrote on last edited by
              #6

              re-install it once again to the same old path and check to install all the source code.

              1 Reply Last reply
              0
              • Y Offline
                Y Offline
                ybailly
                wrote on last edited by
                #7

                I re-did what I did already... reinstalled everything, keeping the suggested default path, clicking "select all" and double-checking all components are selected for installation... still no "psql.pro" file in the directory "$HOME/Qt5.0.2/5.0.2/Src/qtbase/src/sql/drivers/psql".

                So it seems to me the installer is broken, at least the source code part. I'll try by downloading the source code itself.

                1 Reply Last reply
                0
                • Y Offline
                  Y Offline
                  ybailly
                  wrote on last edited by
                  #8

                  Even in the source archive, taken from http://download.qt-project.org/official_releases/qt/5.0/5.0.2/single/qt-everywhere-opensource-src-5.0.2.tar.gz, there's no "psql.pro" file in the directory qtbase/src/sql/drivers/psql.

                  So how am I supposed to build the PostgreSQL driver?

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mbnoimi
                    wrote on last edited by
                    #9

                    [quote author="ybailly" date="1367163809"]I re-did what I did already... reinstalled everything, keeping the suggested default path, clicking "select all" and double-checking all components are selected for installation... still no "psql.pro" file in the directory "$HOME/Qt5.0.2/5.0.2/Src/qtbase/src/sql/drivers/psql".

                    So it seems to me the installer is broken, at least the source code part. I'll try by downloading the source code itself.[/quote]

                    I don't think that so, try to search into Qt's folders because in case the installer is broken it will not run at all.

                    1 Reply Last reply
                    0
                    • Y Offline
                      Y Offline
                      ybailly
                      wrote on last edited by
                      #10

                      ok my bad... I was looking in
                      qtbase/src/sql/drivers/psql/
                      instead of
                      qtbase/src/plugins/sqldrivers/psql/

                      Sorry for the noise.

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mbnoimi
                        wrote on last edited by
                        #11

                        Could you please add [SOLVED] tag to thread's title?

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved