Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
qtcreator Issue with QML
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Wed Dec 19, 2018 7:46 am    Post subject: qtcreator Issue with QML Reply with quote

Good morning all!
I am playing with qtcreator, but I seem to have some issues which I am sure are connected to system configuration rather than qtcreator directly. When running a simple QML application (from the book "QT Blueprints"), I am getting the following errors:
Code:
Starting /home/paul/projects/qt/creator/build-RSS_Reader-Desktop-Debug/RSS_Reader...
QML debugging is enabled. Only use this in a safe environment.
QFSFileEngine::open: No file name specified
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Unrecognized OpenGL version
Unrecognized OpenGL version
QGLXContext: Failed to create dummy context
Unrecognized OpenGL version
Unrecognized OpenGL version

If I run the same built code outside qtcreator, it works but I get the following error on closing (I'm not worried about this at present, but I include it for completeness):
Code:
Xlib:  extension "NV-GLX" missing on display ":0".

This is what I have done (but not necessarily in this order)
  • I had a different version of Qt installed in my home directory for another activity, and this has been removed
  • Identified all orphan files using revdep-rebuild and removed them
  • Removed and re-installed all Qt libraries (according to the instructions on the wiki). Rebooted afterwards.
  • Trawled through /etc looking for any odd configurations
  • Removed the original project configuration files, and reconfigured
  • Created a new user with a clean profile, and ran qtcreator from there. I copied over the project source files and reconfigured - same result.
  • Removed the qt configurations files under ~/.config and ~/.local/share
  • Searched everywhere else for anything which may be impacting the configuration.
  • building and running a C++ application works properly


My system is right up to date. I don't think there is anything unusual in my system configuration:

Emerge --info:
Code:
Portage 2.3.51 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-7.3.0, glibc-2.27-r6, 4.19.9-gentoo x86_64)
=================================================================
System uname: Linux-4.19.9-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.6
KiB Mem:    18485136 total,  12729352 free
KiB Swap:     530140 total,    530140 free
Timestamp of repository gentoo: Tue, 18 Dec 2018 23:45:01 +0000
Head commit of repository gentoo: 162fe2cba46f502c012214612e5a2aff976d7a10
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.4.8-r1::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage/
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

crossdev
    location: /usr/local/portage
    masters: gentoo science gamerlay
    priority: 0

AzP
    location: /var/lib/layman/AzP
    masters: gentoo
    priority: 50

emacs
    location: /var/lib/layman/emacs
    masters: gentoo
    priority: 50

gamerlay
    location: /var/lib/layman/gamerlay
    masters: gentoo
    priority: 50

java
    location: /var/lib/layman/java
    masters: gentoo
    priority: 50

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 50

librepilot
    location: /var/lib/layman/librepilot
    sync-type: laymansync
    sync-uri: https://github.com/paul-jewell/librepilot-overlay.git
    masters: gentoo
    priority: 50

lisp
    location: /var/lib/layman/lisp
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/proj/lisp.git
    masters: gentoo
    priority: 50

rust
    location: /var/lib/layman/rust
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/gentoo-rust.git
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative designer dri dts dvd dvdr emacs emboss encode exif extraengine fam ffmpeg flac fortran garmin gdbm gif gimpprint git glamor gpm gpsd gtk iconv ipod ipv6 jack java jpeg kde kdrive kipi kpathsea kwallet lcdfilter lcms ldap libnotify libtirpc lm_sensors mad mng mozbranding mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma plugins png policykit ppds pulseaudio qml qt5 readline ruby sdl seccomp semantic-desktop spell sqlite ssl startup-notification subversion svg tcpd tiff tk truetype udev udisks unicode upower usb vim-syntax vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="32 64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" CAMERAS="canon ptp ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="*" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6" RUBY_TARGETS="ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Have any of you experienced this previously? Looking around google, there are some reports of similar errors, but they all seem to be with earlier versions of Qt and qtcreator, and dated around 2016. I did suspect the problem was from multiple versions of Qt (one in, and one outside portage), but I believe all vestiges of the non-portage version have been removed.

Thanks in advance for your support!
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Fri Dec 21, 2018 10:31 am    Post subject: Reply with quote

I have spent a significant amount of time on this issue, and I am finally of the opinion this must be an interaction with nvidia and qt-creator. I am not sure what the issue is though. I have tried the unstable versions of Qt and the git ebuild for qt-creator, without any difference. QML applications (even the basic skeleton created when starting a new project) fail to run inside qt-creator, but run perfectly fine from the command line outside qt-creator. On my laptop (Lenovo X270) with the same level of software but Intel integrated graphics instead of nvidia, everything works as expected. I will now investigate different versions of nvidia-drivers to see if I can pin down the problem further.

If any of you have an nvidia graphics card and are using the latest stable version of qt (5.11.1-r1) with qt-creator-4.6.2, could you please try the following: create a new QML project from the wizard selecting any of the QML templates, then build and run it. Does it seem to run, and do you see any error messages in the Application Output tab?

Many thanks!
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1166
Location: /run/user/1000

PostPosted: Fri Dec 21, 2018 12:19 pm    Post subject: Reply with quote

Did you re-emerge Qt Creator again ?
You probably did but you mentioned just libraries.

I don't have Nvidia but I had something similar, after the upgrade of some QT libs I didn't re-emerge qt-creator, when I did problems were gone.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Fri Dec 21, 2018 12:55 pm    Post subject: Reply with quote

kajzer wrote:
Did you re-emerge Qt Creator again ?
You probably did but you mentioned just libraries.

I don't have Nvidia but I had something similar, after the upgrade of some QT libs I didn't re-emerge qt-creator, when I did problems were gone.


Hi Kajzer - thanks for the response! Yes, I did re-emerge qtcreator again, after each trial. I also un-merged all of qt including qtcreator and then re-merged everything. My feeling is that qtcreator has hard linked the libGL.so library provided by mesa, but compiles the qml application using the nvidia library. I am now going to have a dig to see if I can prove or disprove this feeling.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Sat Dec 22, 2018 6:08 am    Post subject: Reply with quote

Here is the output of "ldconfig -p | grep libGL":
Code:
libGLdispatch.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0
        libGLdispatch.so.0 (libc6,x86-64) => /usr/lib64/libGLdispatch.so.0
        libGLdispatch.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so.0
        libGLdispatch.so.0 (libc6) => /usr/lib32/libGLdispatch.so.0
        libGLdispatch.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so
        libGLdispatch.so (libc6,x86-64) => /usr/lib64/libGLdispatch.so
        libGLdispatch.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so
        libGLdispatch.so (libc6) => /usr/lib32/libGLdispatch.so
        libGLX_nvidia.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX_nvidia.so.0
        libGLX_nvidia.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX_nvidia.so.0
        libGLX_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX_nvidia.so
        libGLX_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX_nvidia.so
        libGLX.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so.0
        libGLX.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so.0
        libGLX.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so
        libGLX.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so
        libGLU.so.1 (libc6,x86-64) => /usr/lib64/libGLU.so.1
        libGLU.so.1 (libc6) => /usr/lib32/libGLU.so.1
        libGLU.so (libc6,x86-64) => /usr/lib64/libGLU.so
        libGLU.so (libc6) => /usr/lib32/libGLU.so
        libGLEW.so.2.1 (libc6,x86-64) => /usr/lib64/libGLEW.so.2.1
        libGLEW.so.2.1 (libc6) => /usr/lib32/libGLEW.so.2.1
        libGLEW.so (libc6,x86-64) => /usr/lib64/libGLEW.so
        libGLEW.so (libc6) => /usr/lib32/libGLEW.so
        libGLESv2_nvidia.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so.2
        libGLESv2_nvidia.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so.2
        libGLESv2_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so
        libGLESv2_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so
        libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so.2
        libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/libGLESv2.so.2
        libGLESv2.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so.2
        libGLESv2.so.2 (libc6) => /usr/lib32/libGLESv2.so.2
        libGLESv2.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so
        libGLESv2.so (libc6,x86-64) => /usr/lib64/libGLESv2.so
        libGLESv2.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so
        libGLESv2.so (libc6) => /usr/lib32/libGLESv2.so
        libGLESv1_CM_nvidia.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM_nvidia.so.1
        libGLESv1_CM_nvidia.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM_nvidia.so.1
        libGLESv1_CM_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM_nvidia.so
        libGLESv1_CM_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM_nvidia.so
        libGLESv1_CM.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so.1
        libGLESv1_CM.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so.1
        libGLESv1_CM.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so
        libGLESv1_CM.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so
        libGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so.1
        libGL.so.1 (libc6,x86-64) => /usr/lib64/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib32/libGL.so.1
        libGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so
        libGL.so (libc6,x86-64) => /usr/lib64/libGL.so
        libGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so
        libGL.so (libc6) => /usr/lib32/libGL.so

So the nvidia libraries are prioritised over the mesa versions
Next step is to run "strace -o qtcreator.txt qtcreator", load and run the QML app, then close qtcreator. Running "cat qtcreator.txt | grep libGL" gives the following:
Code:
openat(AT_FDCWD, "/usr/lib64/opengl/nvidia/lib/libGL.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib64/opengl/nvidia/lib/libGL.so.415.18", O_RDONLY) = 3
openat(AT_FDCWD, "/usr/lib64/opengl/nvidia/lib/libGL.so.415.18", O_RDONLY) = 3
openat(AT_FDCWD, "/usr/lib64/opengl/nvidia/lib/libGL.so.415.18", O_RDONLY) = 4
openat(AT_FDCWD, "/usr/lib64/opengl/nvidia/lib/libGL.so.415.18", O_RDONLY) = 6
statx(AT_FDCWD, "/usr/lib64/libGL.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=471696, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGL.so.1", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=471696, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLU.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=514680, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLEW.so.2.1", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=661440, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLdispatch.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=732408, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLEW.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=661440, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLU.so.1", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=514680, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLdispatch.so.0", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=732408, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLESv2.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=38520, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLESv2.so.2", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=38520, ...}) = 0
access("/usr/lib64/libGL.so", R_OK)     = 0
access("/usr/lib64/libGL.so.1", R_OK)   = 0
access("/usr/lib64/libGL.so.1.2.0", R_OK) = 0
access("/usr/lib64/libGLdispatch.so", R_OK) = 0
access("/usr/lib64/libGLdispatch.so.0", R_OK) = 0
access("/usr/lib64/libGLESv2.so", R_OK) = 0
access("/usr/lib64/libGLESv2.so.2", R_OK) = 0
access("/usr/lib64/libGLESv2.so.2.0.0", R_OK) = 0
access("/usr/lib64/libGLEW.so", R_OK)   = 0
access("/usr/lib64/libGLEW.so.2.1", R_OK) = 0
access("/usr/lib64/libGLEW.so.2.1.0", R_OK) = 0
access("/usr/lib64/libGLU.so", R_OK)    = 0
access("/usr/lib64/libGLU.so.1", R_OK)  = 0
access("/usr/lib64/libGLU.so.1.3.1", R_OK) = 0
read(94, "libGL error: No matching fbConfi"..., 52) = 52
read(94, "libGL error: failed to load driv"..., 43) = 43

If I simply run the strace command then close qtcreator without loading and running anything, I only have the first lines referring to the nvidia libraries.
So qtcreator is accessing the wrong libraries when performing the build and run. I guess I will be digging in the source now to find out why.

If I do the same thing with a Qt widget app (as opposed to a QML application), I get the following output and errors when running the program inside qtcreator:
Code:
 Starting /home/paul/build-TestWidgetApp-Desktop-Debug/TestWidgetApp...
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
/home/paul/build-TestWidgetApp-Desktop-Debug/TestWidgetApp exited with code 0

Performing the same strace as above gives
Code:
penat(AT_FDCWD, "/usr/lib64/opengl/nvidia/lib/libGL.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib64/opengl/nvidia/lib/libGL.so.415.18", O_RDONLY) = 3
openat(AT_FDCWD, "/usr/lib64/opengl/nvidia/lib/libGL.so.415.18", O_RDONLY) = 3
openat(AT_FDCWD, "/usr/lib64/opengl/nvidia/lib/libGL.so.415.18", O_RDONLY) = 4
openat(AT_FDCWD, "/usr/lib64/opengl/nvidia/lib/libGL.so.415.18", O_RDONLY) = 6
statx(AT_FDCWD, "/usr/lib64/libGL.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=471696, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGL.so.1", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=471696, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLU.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=514680, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLEW.so.2.1", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=661440, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLdispatch.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=732408, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLEW.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=661440, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLU.so.1", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=514680, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLdispatch.so.0", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=732408, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLESv2.so", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=38520, ...}) = 0
statx(AT_FDCWD, "/usr/lib64/libGLESv2.so.2", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=38520, ...}) = 0
access("/usr/lib64/libGL.so", R_OK)     = 0
access("/usr/lib64/libGL.so.1", R_OK)   = 0
access("/usr/lib64/libGL.so.1.2.0", R_OK) = 0
access("/usr/lib64/libGLdispatch.so", R_OK) = 0
access("/usr/lib64/libGLdispatch.so.0", R_OK) = 0
access("/usr/lib64/libGLESv2.so", R_OK) = 0
access("/usr/lib64/libGLESv2.so.2", R_OK) = 0
access("/usr/lib64/libGLESv2.so.2.0.0", R_OK) = 0
access("/usr/lib64/libGLEW.so", R_OK)   = 0
access("/usr/lib64/libGLEW.so.2.1", R_OK) = 0
access("/usr/lib64/libGLEW.so.2.1.0", R_OK) = 0
access("/usr/lib64/libGLU.so", R_OK)    = 0
access("/usr/lib64/libGLU.so.1", R_OK)  = 0
access("/usr/lib64/libGLU.so.1.3.1", R_OK) = 0
read(92, "libGL error: No matching fbConfi"..., 52) = 52
read(92, "libGL error: failed to load driv"..., 43) = 43

So even though the application seems to run, this problem is not only evident with a QML application.

As always, your comments and observations would be welcome!
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Sat Dec 22, 2018 6:26 am    Post subject: Reply with quote

A bit more information. I ran "export LD_DEBUG=files", and collected the stderr output.

Here is the output from opening and closing qtcreator, filtered for libGL:
Code:
  18373:     file=libGL.so.1 [0];  needed by /usr/lib64/libQt5Gui.so.5 [0]
     18373:     file=libGL.so.1 [0];  generating link map
     18373:     file=libnvidia-tls.so.415.18 [0];  needed by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18373:     file=libnvidia-glcore.so.415.18 [0];  needed by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18373:     file=libX11.so.6 [0];  needed by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18373:     file=libXext.so.6 [0];  needed by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18373:     calling init: /usr/lib64/opengl/nvidia/lib/libGL.so.1
     18373:     /usr/lib64/opengl/nvidia/lib/libGL.so.1: error: symbol lookup error: undefined symbol: ErrorF (fatal)
     18373:     file=libdrm.so.2 [0];  dynamically loaded by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18373:     file=liballocator.so.0 [0];  dynamically loaded by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18373:     file=liballocator.so.0 [0];  dynamically loaded by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18373:     file=liballocator.so.0 [0];  dynamically loaded by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18373:     calling fini: /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]

Nothing untoward there.
Here is the same output from running the test widget app inside qtcreator:
Code:
     18423:     file=libGL.so.1 [0];  needed by /home/paul/build-TestWidgetApp-Desktop-Debug/TestWidgetApp [0]
     18423:     file=libGL.so.1 [0];  generating link map
     18423:     file=libglapi.so.0 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libdrm.so.2 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libX11.so.6 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libxcb-glx.so.0 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libxcb.so.1 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libX11-xcb.so.1 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libxcb-dri2.so.0 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libXext.so.6 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libXfixes.so.3 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libXdamage.so.1 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libXxf86vm.so.1 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libxcb-dri3.so.0 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libxcb-present.so.0 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libxcb-sync.so.1 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libxshmfence.so.1 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     file=libexpat.so.1 [0];  needed by /usr/lib64/libGL.so.1 [0]
     18423:     calling init: /usr/lib64/libGL.so.1
     18423:     opening file=/usr/lib64/libGL.so.1 [0]; direct_opencount=1
     18423:     file=/usr/lib64/dri/tls/swrast_dri.so [0];  dynamically loaded by /usr/lib64/libGL.so.1 [0]
     18423:     file=/usr/lib64/dri/swrast_dri.so [0];  dynamically loaded by /usr/lib64/libGL.so.1 [0]
     18423:     closing file=/usr/lib64/libGL.so.1; direct_opencount=0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
     18423:     calling fini: /usr/lib64/libGL.so.1 [0]

Clearly using the wrong library. Now if I run the test widget app outside qtcreator then collect and process the output, I get this:
Code:
     18778:     file=libGL.so.1 [0];  needed by ./TestWidgetApp [0]
     18778:     file=libGL.so.1 [0];  generating link map
     18778:     file=libnvidia-tls.so.415.18 [0];  needed by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18778:     file=libnvidia-glcore.so.415.18 [0];  needed by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18778:     file=libX11.so.6 [0];  needed by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18778:     file=libXext.so.6 [0];  needed by /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]
     18778:     calling init: /usr/lib64/opengl/nvidia/lib/libGL.so.1
     18778:     /usr/lib64/opengl/nvidia/lib/libGL.so.1: error: symbol lookup error: undefined symbol: ErrorF (fatal)
     18778:     calling fini: /usr/lib64/opengl/nvidia/lib/libGL.so.1 [0]

No mention of the wrong library. Not sure about the undefined symbol error - that can be something for another day!
Finally, running ldd TestWidgetApp and filtering for libGL gives this:
Code:
       libGL.so.1 => /usr/lib64/opengl/nvidia/lib/libGL.so.1 (0x00007fda3cb15000)

All looks good
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Sat Dec 22, 2018 7:43 am    Post subject: Reply with quote

I dont use 4.6.2 from gentoo bc it doenst show me eg. examples at all - no idea where they came from, I just use directly from qt mainentance.

I tested from 4.8.0 advancedcustommaterial and it works perfectly.
Only warning is: QML debugging is enabled. Only use this in a safe environment.

I think u messed xorg configuration or forgot to use:
eselect opengl set nvidia ( as root, I guess u have nvidia there).

Are your opengl apps using hardware accelaration?
Check if u didnt set "minimal" flag to xorg-server also, I think opengl doesnt work with it.
_________________
Sent from Windows
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Sat Dec 22, 2018 10:10 am    Post subject: Reply with quote

mir3x wrote:
I dont use 4.6.2 from gentoo bc it doenst show me eg. examples at all - no idea where they came from, I just use directly from qt mainentance.

I tested from 4.8.0 advancedcustommaterial and it works perfectly.
Only warning is: QML debugging is enabled. Only use this in a safe environment.

I think u messed xorg configuration or forgot to use:
eselect opengl set nvidia ( as root, I guess u have nvidia there).

Are your opengl apps using hardware accelaration?
Check if u didnt set "minimal" flag to xorg-server also, I think opengl doesnt work with it.


So if I understand, you have installed qt-creator outside of portage? I will give that a try. I don't believe this is an opengl/xorg-server issue, as the compiled application works perfectly OK outside of qt-creator, and doesn't show any links to the "wrong" library (see the output above). The issue only arises when running the application inside qtcreator. I will try an out of portage installation to see the result.

No minimal flag:
Code:
[I] x11-base/xorg-server
     Available versions:  [M]1.19.5-r2(0/1.19.5) 1.20.3(0/1.20.3) **9999(0/9999) {debug dmx doc +glamor ipv6 kdrive libressl minimal selinux static-libs +suid systemd tslib +udev unwind wayland xcsecurity xephyr xnest xorg xvfb}
     Installed versions:  1.20.3(0/1.20.3)(12:14:56 16/12/18)(glamor ipv6 kdrive suid udev xorg xvfb -debug -dmx -doc -libressl -minimal -selinux -static-libs -systemd -unwind -wayland -xcsecurity -xephyr -xnest)
     Homepage:            https://www.x.org/wiki/ https://cgit.freedesktop.org/
     Description:         X.Org X servers


edit: just to check - do you have an nvidia card? This problem is not evident with intel graphics on my laptop...
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Sat Dec 22, 2018 10:44 am    Post subject: Reply with quote

I use QtCreator only for browsing examples exactly, normally I use KDevelop.
You need to make account on qt website and download something called Qt Maintenance Tool.
Qt creator should detect your existing qt, but for examples you will need probably choose 1 version ( Im not 100% sure, because I have like 5 qt versions installed by that utility - just to check if everything is good with qt5.2 and 5.5 or other versions).
Qt servers are quite slow, depending on time of day - overall it installs everything in directory you point, no need root for it, its easy to remove, no systems dirs overwritten.
For me it also spams message that "is probably corrupted" and recommend reinstalling - for at least 1 year, but I just ignore it ... everything works
_________________
Sent from Windows
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Sat Dec 22, 2018 11:42 am    Post subject: Reply with quote

I installed qt-creator from gentoo, there was no examples.

I used new project and I got those errors:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Unrecognized OpenGL version
Unrecognized OpenGL version
QGLXContext: Failed to create dummy context
Unrecognized OpenGL version
Unrecognized OpenGL version

SO I guess something wrong there is, mb some environments variables must be set to work.
Easier is just to get qt from web probably than fixing.
_________________
Sent from Windows
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Sun Dec 23, 2018 6:02 am    Post subject: Reply with quote

mir3x - thanks for taking the time to check out the portage version - it's good to see the problem I have is reproducible elsewhere! I will have a go at setting the environment inside qt-creator to see if I can get around this problem that way.
I will also install the version of qt-creator outside of portage and see how that behaves, then I will raise a bug for the behaviour above if that seems appropriate.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Sun Dec 23, 2018 12:59 pm    Post subject: Reply with quote

qtcreator-4.8.0 is now in tree.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Sun Dec 23, 2018 6:41 pm    Post subject: Reply with quote

asturm wrote:
qtcreator-4.8.0 is now in tree.


Thanks asturm - I'll give it a go and feedback my findings! I did try the -9999 version, but had the same issues as 4.6.2.
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1166
Location: /run/user/1000

PostPosted: Mon Dec 24, 2018 9:46 am    Post subject: Reply with quote

asturm wrote:
qtcreator-4.8.0 is now in tree.


I see that llvm is now a dependency, can it be avoided ?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Mon Dec 24, 2018 9:48 am    Post subject: Reply with quote

USE=-clang, probably?
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Mon Dec 24, 2018 9:55 am    Post subject: Reply with quote

qt-creator-4.8.0 exhibits the same issues as 4.6.2. Interestingly following the comment from kajzer I have installed kdevelop, and this works as expected. I still haven't tried an out of tree version to see if the problem is Gentoo ebuild related or not. I will do this over the next few days (Christmas may get in the way...!! :D )
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1166
Location: /run/user/1000

PostPosted: Mon Dec 24, 2018 12:01 pm    Post subject: Reply with quote

asturm wrote:
USE=-clang, probably?


Yes, thank you!
Should have figured out that myself :oops:
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Mon Dec 24, 2018 12:24 pm    Post subject: Reply with quote

I could only guess here as well, it may as well have been hidden indirectly behind one of the other dependencies. I'm not using qt-creator nor did I work on the ebuild.
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1166
Location: /run/user/1000

PostPosted: Mon Dec 24, 2018 1:12 pm    Post subject: Reply with quote

You were right, I didn't have time to check new USE flags.

Anyway, IMHO clang USE flag shouldn't be turned on by default :idea:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum