PDA

View Full Version : Qt5 prebuilt Linux 64-bit libraries segfaults with "QFontDatabase: Cannot find font d



JPNaude
26th September 2013, 12:19
The message we are seeing is:



QFontDatabase: Cannot find font directory /opt/Qt5.1.0//5.1.0/gcc_64/lib/fonts - is Qt installed correctly?
Aborted (core dumped)

We've tested with numerous -platform plugins so it does not seem to be platform specific. To get around the issue we simply create that directory and the application launches fine and we don't see any font related issues etc.

The problem now comes when we are deploying the application. When running our deployed application it crashes again if that directory does not exist. The installers can create that directory but it feels a bit silly to do that and it requires sudo rights to create it.

ChrisW67
27th September 2013, 07:39
The only reference I can see to a fatal warning with a path like the one you see should only be invoked under exceptional circumstances.
This simple program neither fails nor searches anything like the default path you are seeing:


#include <QtGui>
int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
QFontDatabase db;
qDebug() << db.families();
return 0;
}

Qt 5.1.0 binaries from project on Gentoo Linux.

Does the target machine have fontconfig libraries and a good configuration? Does fc-list work from a command line?

Can you post a minimal program that fails in this way?
You should also provide a failing test case on the bug you have raised (https://bugreports.qt-project.org/browse/QTBUG-33674) because there is far too little information to be useful as it stands. The problem is almost certainly environment and not related the Qt binary packaging.

JPNaude
16th October 2013, 12:56
Hi ChrisW67

Thanks for the response. We've had a busy time with deployment etc, so my response has been delayed as a result. We determined the root cause of the issue, but I think further discussion should move to the bug report (https://bugreports.qt-project.org/browse/QTBUG-33674) where I've added our latest findings.

Cheers