Hello,
I currently try to deploy my Qt 5.2.1 application on my embedded i686 target System.
I’m shipping all required libs from my development system which is also an i686 architecture.
The application is an cli tool without graphical interface.
It runs fine up to the point where I have to initialize the database connection.
I really need some help here because I run out of Ideas what might be wrong with my deployment.
QString driver = this->core->getSettingsHandlder()->getSettingByKey("db-driver");
qDebug() << "init database connection with driver: " << driver;
this->database = QSqlDatabase::addDatabase(driver);
QString dbhost = this->core->getSettingsHandlder()->getSettingByKey("db-host");
QString dbname = this->core->getSettingsHandlder()->getSettingByKey("db-name");
QString dbpass = this->core->getSettingsHandlder()->getSettingByKey("db-password");
QString dbuser = this->core->getSettingsHandlder()->getSettingByKey("db-user");
qDebug() << this->database.drivers();
qDebug() << this->database.driverName();
qDebug() << "setting database param";
this->database.setHostName(dbhost);
this->database.setDatabaseName(dbname);
this->database.setUserName(dbuser);
this->database.setPassword(dbpass);
qDebug() << "try to open database";
try {
if (!this->database.open())
{
throw eDatabaseException(this->database.lastError().text());
}
} catch (...) {
throw eDatabaseException("error on opening Database");
}
qDebug() << "Database is open";
This is the log i get from this code:
init database connection with driver: "QOCI"
("QOCI", "QOCI8") //this->database.drivers()
"QOCI" //this->database.driverName();
setting database param
try to open database
And thats it. After a delay of a few seconds the application crashes and I’m back at the prompt.
I get no error from the QSqlDatabase object and even the the catch block fails.
What do i have to do to get the database driver to run correctly ?
What might cause this crash ?
I started deploying my development driver from my host.
Now I compiled the driver on the target system itself and it keeps crashing.
I installed the oracle-instantclient packages
All dependencies seem to be available:
ldd /opt/controller/plugins/sqldrivers/libqsqloci.so
linux-gate.so.1 => (0xb77de000)
libclntsh.so.11.1 => /usr/lib/oracle/11.2/client/lib/libclntsh.so.11.1 (0xb5ab9000)
libQt5Sql.so.5 => /opt/Qt/5.2.1/gcc/lib/libQt5Sql.so.5 (0xb5a7a000)
libQt5Core.so.5 => /opt/Qt/5.2.1/gcc/lib/libQt5Core.so.5 (0xb55b0000)
libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb5590000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb54a4000)
libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb547e000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb5461000)
libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb52fc000)
libnnz11.so => /usr/lib/oracle/11.2/client/lib/libnnz11.so (0xb50af000)
libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb50ab000)
libnsl.so.1 => /lib/i386-linux-gnu/i686/cmov/libnsl.so.1 (0xb5094000)
libaio.so.1 => /lib/i386-linux-gnu/libaio.so.1 (0xb5091000)
libicui18n.so.51 => /opt/LiteRechner/libicui18n.so.51 (0xb4e6e000)
libicuuc.so.51 => /opt/LiteRechner/libicuuc.so.51 (0xb4cf5000)
libgthread-2.0.so.0 => /usr/lib/i386-linux-gnu/libgthread-2.0.so.0 (0xb4cf2000)
librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xb4ce9000)
libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb4bec000)
/lib/ld-linux.so.2 (0xb77df000)
libicudata.so.51 => /opt/LiteRechner/libicudata.so.51 (0xb36a2000)
libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb3664000)
Thank you guys
↧