Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Slackware Qt4.3.2 postgres8.4
mike_bassett last edited by
I have a commercial version of Qt4.3.2 which compiles on slackware 12.2 very well except for postgres. Slackware comes with 3.3.b loaded and I cannot remove it as it supports KDE etc. I compiled both Qt and Postgres from source. Default install of 4.3.2 goes to /usr/local/Trolltech etc and default postgres install goes to /usr/local/pgsql etc. All source code for both sits on my desktop. If I run ./configure -release -static and ./configure -release then only the shared version picks up mysql and sqlite plugins which I detect via the Qtsqlbrowser example. Following advice in assistant, sql drivers, create sqlplugins I can run qmake -o Makefile etc and find that I get a psql.so file created in /local/usr/Trolltech etc but when I try to run sqlbrowser it is not found. In the Qtsqltable example I substituted psql for sqlite and I get the run time message driver not found (it says I have mysql & sqlite but makes no reference to psql). I tried ./configure -plugin-sql-psql (with include & lib paths) but that gives problems. With mysql I have no problems whatsoever - it seems impossible for it to fail - but I really need postgres. I have googled all over and although many people have this problem the solutions are linked to qt3.3 or for current versions of an automatically installed GNU Qt4. I want to have the commercial version installed in parallel with other Qt variants - any ideas would be welcome. I have rebuilt Qt and Postgres dozens of times and tried reinstalling slackware without Qt (unsuccessfully) but I cannot solve this problem.
harryF last edited by
Run "qmake" with the correct -I flags in src/plugins/sqldrivers/psql. Make sure libqsqlpsql.so is created. Run "make install" as well to install the Qt SQL plugin into the destination dir. Make sure libqsqlplsql.so ends up in plugins/sqldrivers in your destination directory. Then, make sure you run the sqlbrowser that is linked against your version of Qt, not the installed one. The PostgreSQL driver should now show up.
If not, set the QT_DEBUG_PLUGINS environment variable to "1" and check the debug output.