[SOLVED] Qt on Slackware Linux
-
using the qt-installer and it's .run file, solved my problem :) thank you
compiler is doing fine, but it shows a few errors:
libGL error: failed to load driver: i965
libGL error: Try again with LIBGL_DEBUG=verbose for more details.any solution for this ?
-
btw: the error only appears with a QT GUI project
console application works fine -
Qt tries to use opengl and looks like your video setup does not have it.
Check what LIBGL_DEBUG tells.
Maybe you will need to update video drivers and or install mesa libraries.
I have not seen this problem on my linux boxes (fedora and ubuntu) so I can not tell much here. -
oh, i'm working on a hp workstation here, could be the reason for this error, because it has no graphic card(just intel xeon integraded graphics) which normally provides opengl.
-
It can be the reason.
- Do you use opengl in your application? If so, then you may need to install mesa libraries and use software opengl.
- What messages LIBGL_DEBUG=verbose gives ?
- Does qtcreator from downloaded Qt gives the same error?
- If you try to build Qt examples do they provide the same error?
-
Actually i don't need OpenGL on this pc,
the error message just appears(application output) in a GUI(mainwindow etc.) project when I compile it, but the application itself works fine.the console application works perfectly.
-
sry for the question, but where you want me to write this down?
-
Run these commands in a shell command prompt.
Run it in separate directory from your project directory.
For example if your .pro file is located in
/home/user/workspace/myproject
then
@
cd /home/user/workspace/
mkdir build-myproject
cd build-myproject
export LIBGL_DEBUG=verbose
qmake -recursive ../myproj
make
@ -
it says: bash: qmake-recursive: command not found
-
it says: qmake command not found,
also can't find a qmake or qmake-qt5 withwhich qmake
or
which qmake-qt5
btw: i used the online installer straight from the qt website(.run)
-
thats the output in the terminal:
@
bash-4.2$ make
/home/reidom1994/Qt/5.2.1/gcc_64/bin/uic ../GUI_Hello_World/mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../Qt/5.2.1/gcc_64/mkspecs/linux-g++ -I../GUI_Hello_World -I../../Qt/5.2.1/gcc_64/include -I../../Qt/5.2.1/gcc_64/include/QtWidgets -I../../Qt/5.2.1/gcc_64/include/QtGui -I../../Qt/5.2.1/gcc_64/include/QtCore -I. -I. -I. -o main.o ../GUI_Hello_World/main.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../Qt/5.2.1/gcc_64/mkspecs/linux-g++ -I../GUI_Hello_World -I../../Qt/5.2.1/gcc_64/include -I../../Qt/5.2.1/gcc_64/include/QtWidgets -I../../Qt/5.2.1/gcc_64/include/QtGui -I../../Qt/5.2.1/gcc_64/include/QtCore -I. -I. -I. -o mainwindow.o ../GUI_Hello_World/mainwindow.cpp
/home/reidom1994/Qt/5.2.1/gcc_64/bin/moc -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../Qt/5.2.1/gcc_64/mkspecs/linux-g++ -I../GUI_Hello_World -I../../Qt/5.2.1/gcc_64/include -I../../Qt/5.2.1/gcc_64/include/QtWidgets -I../../Qt/5.2.1/gcc_64/include/QtGui -I../../Qt/5.2.1/gcc_64/include/QtCore -I. -I. -I. ../GUI_Hello_World/mainwindow.h -o moc_mainwindow.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../Qt/5.2.1/gcc_64/mkspecs/linux-g++ -I../GUI_Hello_World -I../../Qt/5.2.1/gcc_64/include -I../../Qt/5.2.1/gcc_64/include/QtWidgets -I../../Qt/5.2.1/gcc_64/include/QtGui -I../../Qt/5.2.1/gcc_64/include/QtCore -I. -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
g++ -Wl,-O1 -Wl,-rpath,/home/reidom1994/Qt/5.2.1/gcc_64 -Wl,-rpath,/home/reidom1994/Qt/5.2.1/gcc_64/lib -o GUI_Hello_World main.o mainwindow.o moc_mainwindow.o -L/home/reidom1994/Qt/5.2.1/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread @ -
It still appears in the application output :
Starting /home/user/QT C++/myproject/myproject...
libGL error: failed to load driver: i965
libGL error: Try again with LIBGL_DEBUG=verbose for more details.Application still works fine.
I have no idea, but it's working so doesn't matter i think xD
-
What if you will run your app with LIBGL_DEBUG=verbose
something like
@
export LIBGL_DEBUG=verbose
/home/user/QT C++/myproject/myproject…
@If it does not bother you then you can run your app and redirect all output to /dev/null
@
/home/user/QT C++/myproject/myproject… > /dev/null 2>&1
@ -
first one without root:
libGL: OpenDriver: trying /usr/lib64/xorg/modules/dri/i965_dri.so
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
libGL: OpenDriver: trying /usr/lib64/xorg/modules/dri/swrast_dri.sowith root:
Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
libGL: OpenDriver: trying /usr/lib64/xorg/modules/dri/i965_dri.so
libGL: Can't open configuration file /root/.drirc: No such file or directory.I also tried the second one.
Whats the reason, to redirect the output to /dev/null ^^ -
About /dev/null.
It will hide your error messages and you will not worry about it. :-)Some GNU/Linuxes have a "video" group and only members of that group are allowed to use opengl.
Could you check if Slackware has such restriction. If so then add your self to that video group re-login and try to run your app again. -
i just added my self with $usermod -aG video <username>
-> in /etc/group its says video:x:18:but same error still appears.