You need to build the QIBASE plugin in Ubuntu 16.10 x64 for qt.5x. My actions are described here .

  • Only under ubuntu? The label is linux. - 0xdb
  • @ 0xdb I only have ubuntu, I looked in the internet that it was working in suse, now I’ll add the label, we’ve noticed. - shaman888
  • one
    @ shaman888 The question should also be short and to the point. Now it is completely incomprehensible what you are trying to do. Collect under 5.7? Find out why you have no paths that are listed in faq for 5.8? Collect for a specific earlier version? - PashaPash
  • one
    “I don’t know under which version I’ll be able to build the plugin in the first place” - compile the version you need, not the version you’ll get. Why do not you listen to the advice and do not edit the question to make it more specific. You asked the question at 5.7, and do not try to save humanity. You can keep the canvas for yourself, if it helps you, you do not need to publish it in full here. - 0xdb
  • one
    By the way, why 5.7, and not the recommended 5.8? - 0xdb

1 answer 1

The build was tested on Ubuntu 16.10 and Debian jessie. Under Debian, the sudo commands are executed in the terminal with root .
Wiki was used to build QT

Source /etc/apt/source.list must be included in /etc/apt/source.list - deb-src .

 sudo apt-get build-dep qt5-default sudo apt-get install libxcb-xinerama0-dev sudo apt-get install firebird-dev 

Cloned from the gita and collected QT5.7:

 cd /usr/src # или любую другую папку по-усмотрению с правами на запись git clone git://code.qt.io/qt/qt5.git cd qt5; git checkout 5.7 perl init-repository ./configure -developer-build -opensource -nomake examples -nomake tests 

The configurator did not find anything for InterBase:

  SQL drivers: DB2 .................. no InterBase ............ no MySQL ................ yes (plugin) OCI .................. no ODBC ................. yes (plugin) PostgreSQL ........... yes (plugin) SQLite 2 ............. no SQLite ............... yes (plugin, using bundled copy) TDS .................. yes (plugin) make -j4 # make install # т.к. developers-build, нет необходимости 

Collected plugin for firebird from this source

 export QTDIR=/usr/src/qt5 export PATH=$QTDIR/qtbase/bin:$PATH cd $QTDIR/qtbase/src/plugins/sqldrivers/ibase # для обхода ошибки: /usr/bin/ld.gold: error: cannot find -lgds sudo ln -s /usr/lib/x86_64-linux-gnu/libfbclient.so /usr/lib/libgds.so qmake "INCLUDEPATH+=/usr/include" "LIBS+=-L/usr/lib/x86_64-linux-gnu -lfbclient" ibase.pro make 

The next error is already known and is awaiting treatment of the bug.

/ usr / include / c ++ / 6 / cstdlib: 75: 25: fatal error: stdlib.h: No such file or directory #include_next ^

Correct the generated Makefile and repeat make :

 INCPATH = -I. -isystem /usr/include --> меняем на INCPATH = -I. -I/usr/include 

Conclusion:

 rm -f libqsqlibase.so g++ -Wl,--no-undefined -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath,/usr/src/qt5/qtbase/lib -shared -o libqsqlibase.so .obj/main.o .obj/qsql_ibase.o .obj/moc_qsql_ibase_p.o -L/usr/lib/x86_64-linux-gnu -lfbclient -lgds -L/usr/src/qt5/qtbase/lib -lQt5Sql -lQt5Core -lpthread mv -f libqsqlibase.so ../../../../plugins/sqldrivers/ -rwxr-xr-x 1 db src 1241008 May 1 23:55 ../../../../plugins/sqldrivers/libqsqlibase.so 

Look like that's it. Gathered without any errors. The test program shows that the ibase plugin is now available:

 #include <QCoreApplication> #include <QtSql> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); qDebug() << "drivers available:" << QSqlDatabase::drivers(); QCoreApplication::exit(0); } 

drivers available: ("QIBASE", "QSQLITE", "QMYSQL", "QMYSQL3", "QODBC", "QODBC3", "QPSQL", "QPSQL7", "QTDS", "QTDS7")

  • Comments are not intended for extended discussion; conversation moved to chat . - Nick Volynkin
  • The library was compiled, but it does not connect to the project, I do not understand what the problem is. - shaman888
  • figured out, the error disappeared. thank. - shaman888
  • Please glad that worked out. If you have a little time, correct all the same question, there are a lot of things superfluous. - 0xdb