[SOLVED] Trouble building QPSQL from Qt 5.0.2 on Linux
-
[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.
-
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??
-
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
-
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.
-
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?
-
[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.