Failed to load driver: swrast ?
-
thank you :)
running both approaches with LIBGL_DEBUG=verbose i do not get any
error message.
This error message seems to appear only when i build and run the application in qt-creator.
This happens even on fresh Qt GUI Application without any additional code.
Any idea highly welcomethis error is only emitted when i use Qt 5.2.1 , not with 4.8.
-
[quote author="wally123" date="1398113331"]> LIBGL_DEBUG=verbose ./SizeGrip_q001
"Qt Warning - invalid keysym: dead_actute" [/quote]
Tells that you have broken "locale file":https://bugs.freedesktop.org/show_bug.cgi?id=69476
But it is not a problem here.[quote author="wally123" date="1398113331"]
The "libGL error: failed to load driver: swrast" i get in creator - Application output.
The application starts up and seems to work properly.
Anyway, this message is annooying [/quote]
LibGL tries to load software rendering library even if you have nvidia drivers.What does the following command says
@
LIBGL_DEBUG=verbose glxinfo >/dev/null
@ -
@> LIBGL_DEBUG=verbose glxinfo >/dev/null@
return nothing@> LIBGL_DEBUG=verbose glxinfo
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_multisample, GLX_EXT_create_context_es2_profile,
GLX_EXT_create_context_es_profile, GLX_EXT_swap_control,
GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_NV_float_buffer,
GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_swap_control,
GLX_SGI_video_sync
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_get_proc_address, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_fbconfig_packed_float,
GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, GLX_EXT_swap_control,
GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_NV_copy_image,
GLX_NV_float_buffer, GLX_NV_multisample_coverage, GLX_NV_present_video,
GLX_NV_swap_group, GLX_NV_video_capture, GLX_NV_video_out,
GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_swap_control,
GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
........ @
and some more, do you need all the output ?I also posted this question to opensuse forum:
Also several interesting explanations:
"openuse forum swrast ":https://forums.opensuse.org/showthread.php/497353-Remove-packages-dependency-question?p=2638720#post2638720 -
[quote author="wally123" date="1398277480"]@> LIBGL_DEBUG=verbose glxinfo >/dev/null@
return nothing[/quote]
This is interesting. Because in my case it returns the debug messages
@
$ LIBGL_DEBUG=verbose glxinfo >/dev/null
libGL: OpenDriver: trying /usr/lib64/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/i965_dri.so
@[quote author="wally123" date="1398277480"]and some more, do you need all the output ? [/quote]
No. don't need it. :-)If you have this warning only in QtCreator Application output window then I would suggest to compare the terminal environment and QtCreator Run environment. Run "env | sort" in a terminal and compare the output with QtCreator Projects/Run/Run Environment.
Unfortunately there is no easy way to grab it from QtCreator into a file and run diff on two files. -
...
-
here the QT… part of “env” :
@QEMU_AUDIO_DRV=pa QT_IM_MODULE=xim QT_IM_SWITCHER=imsw-multi QT_PLUGIN_PATH=/home/op/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ QT_SYSTEM_DIR=/usr/share/desktop-data SDL_AUDIODRIVER=pulse@
QtCreator Projects/Run/Run Environment:
Yes, unfortunately not easy to grab :)
Also unable to paste a screenshot here.What’s the relevvant lines, what to compare ?
-
maybe another hint to get behind what i setup wrong:
When i open examples from Qt 5.2.1 i get :
@.../Examples/basicdrawing/window.cpp:44: error: QtWidgets: No such file or directory
#include <QtWidgets>
^@
on every single example i tested so far.
I fear i messed up some settings :( -
Aren't you opening Qt 4's examples ?
-
in the QtCreator "Welcome" Tab - > Examples i can choose in the rightmost top corner between 4.8 and 5.2.
I selected qt5 example but i think the creator environment setting is wrong. In qt4 i think i used #include <QtGui>.When i change #include <QtWidgets> to <QtGui> in a qt5 example i got no error message.
-
[quote author="wally123" date="1398324670"]
here the QT… part of “env” :@QEMU_AUDIO_DRV=pa QT_IM_MODULE=xim QT_IM_SWITCHER=imsw-multi QT_PLUGIN_PATH=/home/op/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ QT_SYSTEM_DIR=/usr/share/desktop-data SDL_AUDIODRIVER=pulse@
What’s the relevant lines, what to compare ?
[/quote]I don't exactly know what environment variables to compare. I hoped the difference would be obvious when you see it.
Try to change "Build Environment" to "Clean Environment" in "Run Environment" section of the Project settings.
-
[quote author="wally123" date="1398330041"]maybe another hint to get behind what i setup wrong:
When i open examples from Qt 5.2.1 i get :
@.../Examples/basicdrawing/window.cpp:44: error: QtWidgets: No such file or directory
#include <QtWidgets>
^@
on every single example i tested so far.
[/quote]I think SGaist is right and you open a Qt4 example.
In Qt5 basicdrawing is located in
@
.../examples/widgets/painting/basicdrawing
@ -
With "Clean environment" build is ok but run :
@QXcbConnection: Could not connect to display @When i set to "System Environment" the recently built examples runs without error messages.
No more libGL message.
I'm confusedI think i should delete all configuration files of QtCreator
and restart creator to set all new.
I s this possible ?
Which files to delete ? -
[quote author="wally123" date="1398369609"]With "Clean environment" build is ok but run :
@QXcbConnection: Could not connect to display @
[/quote]
It is ok because there is no any X11 settings[quote author="wally123" date="1398369609"]
When i set to "System Environment" the recently built examples runs without error messages.
No more libGL message.
[/quote]
It confirms the fact that when you run the application from a terminal you don't have this message. So there is something wrong in Build Environment settings. You can compare the settings line by line if you would like.[quote author="wally123" date="1398369609"]
I think i should delete all configuration files of QtCreator
and restart creator to set all new.
I s this possible ?
Which files to delete ?
[/quote]Build environment is a per project settings.
I think that you can delete .pro.user file and then open this project again you will have a build environment that is consistent with a system environment. -
Can not get rid of the libGL error, anyway.
I removed qt4.8 kit and lib from Build&Run settings to make things more clear and focus to qt5 only.
Tried several modifications in Build- and Run-environment.
I have no idea what to search for and what causes the error message.
i 'm totally confused now.
Any idea what remains to do highly welcome. -
creating a new qt5 project generates the following .pro file:
@QT += core guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = test_1
TEMPLATE = appSOURCES += main.cpp
mainwindow.cppHEADERS += mainwindow.h
FORMS += mainwindow.ui
@is this as should be ?
Whats about "QT_MAJOR_VERSION, 4" ? -
@
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@
Yes it is as it should be.
QT_MAJOR_VERSION four and before are all-in-one library. Containers, network, widgets, etc all in one library.
Starting from Qt5 all components are independent and if you need to use the widgets you need to specify it.bq. Can not get rid of the libGL error, anyway.
You said that with "System Environment" you don't have that message.
Did you try to close a project, remove .pro.user file and open project again? -
bq. You said that with “System Environment” you don’t have that message.
Yes, but i can not reproduce this anymore. In the meanwhile i did
several de- and reinstallations, also tried the NVIDIA driver installer
from the nvidia homepage. Maybe the following output of the
nvidia install contains a hint to a solution:
@ERROR: Kernel configuration is invalid."
include/generated/autoconf.h or include/config/auto.conf are missing.";
Run 'make oldconfig && make prepare' on kernel src to fix it.";
@as root in /usr/src/linux:
@tiro:/usr/src/linux # make cloneconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
Cloning configuration file /proc/config.gzconfiguration written to .config
tiro:/usr/src/linux # make prepare
scripts/kconfig/conf --silentoldconfig Kconfig
make[1]: *** No rule to make target/usr/src/linux-3.11.10-7/arch/x86/syscalls/syscall_32.tbl', needed by
arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h'. Stop.
make: *** [archheaders] Error 2
@i even do not know, building the nvidia driver makes any sense.
bq. Did you try to close a project, remove .pro.user file and open project again?
Yes, i did several tests on this, but libGL error persists.
-
Seems the NVidia driver is not relevant to solve this problem.
I installed @qt-opensource-linux-x86-5.2.1.run@
from http://qt-project.org/downloads
No annoying message anymore :)
Now searching for differences. Most probably is difference in environment settings i assume (?)
... i hope -
I have the same consoleWorks-QtCreatorDoesn't issue here. But going to system environment doesn't fix anything.
The issue is much more difficult for me since I use QtQuick 2 and thus an OpenGL shader which plainly fails to compile. It's the default "hello, world !" example and I cannot see the "hello, world !".
Here is what it tells :
@QML debugging is enabled. Only use this in a safe environment.
libGL error: failed to load driver: swrast
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( textureScale ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( color ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( alphaMin ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( alphaMax ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( fontScale ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( vecDelta ): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( textureScale ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( color ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( alphaMin ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( alphaMax ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( fontScale ): shader program is not linked
QOpenGLShaderProgram::uniformLocation( vecDelta ): shader program is not linked@ -
For anybody running into this: unset the LD_LIBRARY_PATH in Projects - Run - Run Environment