I am trying to run a Qt application under EGLFS with Linux Mint on a Macbook Pro.
I have:
Configured and compiled Qt with all the needed flags and dependences.
Tried to run the app with X11 turned off.
Used kms integration.
Installed all the Mesa drivers ( I have an intel GPU ).
Even compiled EGL myself.
But it keeps saying "Unable to create EGL Display".
Does anyone knows what am I missing ?
P.S For example I can run weston-launch which I believe it runs over drm-egl.
I had the same problem like you. I have solved it by:
Building Qt with "-opengl desktop" switch.
Making conf file with my displays (look at: http://doc.qt.io/qt-5/embedded-linux.html at section "eglfs with eglfs_kms backend") inside application directory
Exporting QT_QPA_EGLFS_KMS_CONFIG=conf
Then switch to free tty and run application with -platform eglfs argument.
Related
I am trying create a qt5 application on yocto using qtwayland. When I run my application, the 'Apllication Output' displays this error
"Failed to create display (No such file or directory) Application
finished with exit code 1." .
However, the bin file actually has successfully been deployed and I can run it on my board by opening the file manually. I can't debug on my board,either.
How can I figure it out, thank you.
I assume you are trying to create a Qt client application and run it on a wayland server?
On Wayland, Failed to create display (No such file or directory) means that a Wayland client couldn't connect to the compositor/display server.
So you should verify that your compositor is running. Which one are you using?
The environment variable, XDG_RUNTIME_DIR, also needs to be set both when the compositor is started and when your client is started.
If clients start when you run them on the device, it might be that the default platform for your qt installation is eglfs, not Wayland. In order to run the applications on Wayland, start it like this:
./myapp -platform wayland
or set
export QT_QPA_PLATFORM=wayland
Note that if you are running a Qt-based compositor, then the compositor should probably still be run with the eglfs backend
I have built a static x86 Qt5.5 library with VS2013 using:
configure -static -prefix D:\Qt\qt-5.5.0-x86-static -opensource -release -static-runtime -nomake examples -no-compile-examples -static-runtime -nomake tools -no-iconv -qt-zlib -skip qtwebkit -confirm-license -qmake -opengl desktop -no-angle -nomake tests -target xp
After that I used this static library build a static-link exe of my Qml App. It can run everywhere in my windows which has been installed Qt5.5.
Then I used VMware Workstation to install a pure Windows XP SP3 only installed VC2008 runtime not VC2013 runtime.
Firstly, I copy the exe into this XP. It can run but had nothing to show. I need kill it in taskmgr.
Second, I copy all folders in D:\Qt\qt-5.5.0-x86-static\qml to the root dir of my exe, it can run. But it shows me only a blank window with correct window title.
I think I have listen all the advise in Deploying Qt 5 App on Windows. But why the qml parts cannot be compiled into static library? How can I let my app not show blank?
P.S. Even if I use windeployqt to deploy share-link library version of app. It also shows me blank window. But it can run on Windows 7.
The output of qtdiag on my virtual XP:
Qt 5.5.0 (i386-little_endian-ilp32 static release build; by MSVC 2013)
on "windo ws" OS: Windows XP [winnt version 5.1.2600]
Architecture: i386; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
Library info: PrefixPath: D:\Qt\qt-5.5.0-x86-static
DocumentationPath: D:\Qt\qt-5.5.0-x86-static\doc HeadersPath:
D:\Qt\qt-5.5.0-x86-static\include LibrariesPath:
D:\Qt\qt-5.5.0-x86-static\lib LibraryExecutablesPath:
D:\Qt\qt-5.5.0-x86-static\bin BinariesPath:
D:\Qt\qt-5.5.0-x86-static\bin PluginsPath:
D:\Qt\qt-5.5.0-x86-static\plugins ImportsPath:
D:\Qt\qt-5.5.0-x86-static\imports Qml2ImportsPath:
D:\Qt\qt-5.5.0-x86-static\qml ArchDataPath:
D:\Qt\qt-5.5.0-x86-static DataPath: D:\Qt\qt-5.5.0-x86-static
TranslationsPath: D:\Qt\qt-5.5.0-x86-static\translations
ExamplesPath: D:\Qt\qt-5.5.0-x86-static\examples TestsPath:
D:\Qt\qt-5.5.0-x86-static\tests SettingsPath:
Standard paths [... denote writable entry]: DesktopLocation:
"Desktop" *C:\Documents and Settings\Administrator\
The final conclusion:
The problem is the graphic driver in my virtual Windows XP. It can run on other real PCs.
But there is a sad problem to static build of QML.
I have found this:
https://forum.qt.io/topic/22035/qml-apps-not-runnable-using-static-build-up-to-qt-5-0-1-release/24
The reason why I need copy such folders Qt QtQuick.2 QtQuick is that those lib cannot be compile-loaded. Even if I add them into .pro file. From Qt 5.0 to Qt 5.5. The official side seems do not like people use QML by static-link. So, it is waste of time to do static build of QML app.
Qt Quick applications need 3d acceleration in order to work. This is based on either OpenGL, DirectX via Angle or some kind of software renderer that comes with the commercial version of Qt. Since you specifically exclude Angle in your config, you need a proper OpenGL driver. Make sure that OpenGL works on your machine. You'll find tools for that.
I don't think that is has something to do with missing C++ standard libraries (VC2013 runtime), because in this case your application would crash during start and not run. Qt Quick graphic issues however often lead to a running black app that is writing warnings to the console.
Further debugging can be done using the qtdiag.exe command line tool that comes with Qt (It comes with the online installer. I don't know where it is when you build from source). It checks for you which graphic driver is used and often can show error messages.
I am not able to run programs from Qt Creator, I am always getting error:
Starting C:\path\to\executable\program.exe...
Failed to start program. Path or permissions wrong?
C:\path\to\executable\program.exe exited with code -1
It happened after I built Qt statically. What I did:
Installed Qt 5.2.0 with MinGW from official site (including source component), then installed Python 2.7.6 and Perl. Then built Qt statically from path\to\qt\5.2.0\Src and it showed no errors. After this everything was fine. But when I added new path to qmake.exe (in Qt Versions tab, Build & Run Options section) and added new Kit (Kits tab) with this version I started getting this error. Moreover, now all .exe files have yellow shield near the icon in the Explorer (no matter they were built statically or not). It means that they use administrative privileges, but before I added new Kit executables had no yellow shield! For statically built programs it is fine that Creator can't run them because of administrative privileges that the use, but what happened to dynamically linked programs? I didn't touch any other settings except for adding new Kit.
Edit:
I am using MinGW on Windows 8.1,
qt was configured with this line:
configure.exe -release -opensource -c++11 -static -no-opengl -no-angle -no-vcproj -platform win32-g++ -nomake examples -nomake tests
I seem to have exactly the same problem as iamnp.
In my case, this is an application that compiles and runs smoothly on Windows 7 with Qt 4.8. Adding to the issue is that I'm switching both operating system (Windows 8.1) and Qt version (Qt 5.2) at the same time. But, I wouldn't be surprised that I and iamnp are actually not the only people having this issue.
I have tried the solution of Guilherme (i.e. run QT Creator as administrator), but this didn't resolve the problem.
If somebody has some other idea on what I should try, let me know. In the meantime, I'll try to test this in a minimal application to see what happens.
I have installed Qt 5.0.1 - 32-bit Version on Ubuntu 12.04. All the programs crash at startup with the following messages :
The program has unexpectedly finished.
/home/manager/Qt5.0.1/5.0.1/gcc/examples/opengl/2dpainting-build-Desktop_Qt_5_0_1_GCC_32bit-Debug/2dpainting
exited with code 0
I tried:
Making the default Qml Application
Running a few example applications.
I switched between the debug and release modes as well, but all crashed with similar message. Surprisingly 'Animated Tiles example' works fine. Any suggestions ?
Edit:
In debug mode this is what i get:
Debugging starts
&"warning: GDB: Failed to set controlling terminal: Inappropriate ioctl for device\n"
RTTI symbol not found for class 'QGLWidget'
RTTI symbol not found for class 'QGLWidget'
RTTI symbol not found for class 'QGLWidget'
RTTI symbol not found for class 'QGLWidget'
I have same problem on Windows with Qt5. As i understood, in qt5 window subsystem moved into plugins and when application start, QApplication object can't find this libraries.
On windows I step-trace my app into Qt code, and find that plugins try to load from folder ./plugins/system where . is folder with our app binary. Also it was a problem with
dependence. Windows specific plugin dependence from libGLES.dll or libGLES2.dll. But GL libs must place in the same folder as app binary, not with plugins.
Correct file tree on Windows look like this
plugins
system
platform.dll
windows.dll
libGLES.dll
MyApp.exe
Try to look in this way.
Firstly check your graphics driver is installed.
Qt5 or higher version supports OpenGL 3.0 or higher, if your system is old one, i think you need to check the graphics card can support OPENGL verion as i mentioned above.
If above things are fine, then i think you need to install some opengl libraries that can be easily downloadable from Ubuntu.
Regards
Ansif
I'm trying to get Qt applications running on QNX 4.5. I've compiled Qt 4.6.3 on a linux box with this configuration:
./configure -xplatform unsupported/qws/qnx-i386-g++ -embedded i386 -no-gfx-linuxfb -no-mouse-linuxtp -no-kbd-tty -no-qt3support -qt-gfx-qnx -qt-mouse-qnx -qt-kbd-qnx -no-exceptions -little-endian -nomake demos -nomake examples
"make" required certain tweaking of environment and commenting out one function, but worked in the end. I've copied fonts and compiled Qt libraries onto QNX running in VMware, and created a sample Qt app (it just displays a button) which I compiled on my linux box and copied over to QNX.
I have a little script to launch the app:
io-display -d vid=0x15adh,did=0x405h
/usr/photon/bin/devi-hid -Pr kbd mouse
./app
Which runs the application, enabling experimental input drivers. With this script I was able to get somewhere by running the Qt app in Photon - screen rendering gets all screwed up, but I do see my Qt application.
However, if I exit Photon into a text mode, and try to run the application from there (using a slightly modified script with different vid and did values for launching the graphics server), I just see a blank screen.
I'm completely new to QNX and Qt, so I'm a bit stuck right now. I'm trying to read up on how Photon works and what kind of environment it sets up, to find what I might be missing in the text mode. However, I'm not sure this is even a right direction, so I thought I'd ask good folks on SO, in case somebody went through this before :)
cheers!
Have you tried adding "-qws" after you app? It tells the Qt app to initialize it's windowing system (qws). Only 1 qt app needs (or may have) the option specified.
I would also add a couple of environment variables to help Qt to know where to find your keyboard and mouse. (I also am not sure if you really need the first line.)
io-display -d vid=0x15adh,did=0x405h
/usr/photon/bin/devi-hid -Pr kbd mouse
export QWS_DISPLAY=qnx
export QWS_MOUSE_PROTO=qnx
export QWS_KEYBOARD=qnx
./app -qws
BTW, QNX has just released a port of Qt 4.7.1 for QNX 6.5. It can be found on the Foundry 27 Qt Project site.