PDA

View Full Version : qt4.6.2 embedded 'cannot connect to XServer.' at runtime



guest1
17th February 2010, 06:32
Hello,

I have a problem when running qt embedded programs like demos:

application cannot connect to XServer.

This should not happen because i compiled specifically to use linuxfb without using X11. (although the documentation seems to suggest this is redundant)
could someone kindly tell me my the problem?
This should not happen if I use the embedded switch, does it?

I used the demo 'textedit" provided. And others, too. All show the same error.

Additional info:
qt version: Qt libraries 4.6.2 for embedded Linux
host OS: Ubuntu 9.1 Karmic
device platform : arm926ejs, Linux debian 2.6.31
Cross Compiler: Sourcery G++ Lite Edition for ARM (arm-none-linux-gnueabi-g++, ....)
Configure :
./configure -embedded armel -xplatform qws/linux-arm-gnueabi-g++ -no-qt3support -depths 1 -little-endian -no-qvfb -qt-gfx-linuxfb -D__ARM_ARCH_5TEJ__ -opensource

Thanks in advance.

guest1
18th February 2010, 05:49
I found out the cause of the problem. It seems that this has nothing to do with the configure switches, but rather with QT libraries being present on the linux distribution (debian in my case) which are used probably for QT/X11 version. It was present in the /usr/lib directory and the QT executable was probably looking for them there.

Solution:
1. Place the correct QT libraries on the embedded platform and specify the path using LD_LIBRARY_PATH (I havent tried this)
2. use -static switch in the QT library ./configure. This will pretent the executable from looking for the QT libraries. (I tried this and it works). However this will still ask for /lib/fonts, which i had to copy from the host environment.

I hope this helps people.

Regards