For those who are still stuck after trying every other option out there in the internet, you can look into exact path from which this notorious libqxcb.so
is being searched in, for opening/loading by the Qt
App(VirtualBox-5.2.8
is the Qt
app in my case), using the strace tool. In my case, since I was building VirtualBox-5.2.8
from its source, it was searching for libqxcb.so
in the below location :
"...VirtualBox-5.2.8/out/linux.amd64/release/bin/platforms/"
and not in the default
library paths, Qt
installation path, etc. So, none of the ldd
checks, and other solutions worked. And also setting QT_DEBUG_PLUGINS=1
didn't produce any extra logs either.
Running strace on the the VirtualBox binary I built using Clang/LLVM on Ubuntu 17.10 x86_64:
...VirtualBox-5.2.8$ strace ./out/linux.amd64/release/bin/VirtualBox
.
.
.
access(".../VirtualBox-5.2.8/out/linux.amd64/release/bin/platforms/.", F_OK) = -1 ENOENT (No such file or directory)
write(2, "Qt FATAL: ", 10Qt FATAL: ) = 10
write(2, "This application failed to start"..., 154This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Reinstalling the application may fix this problem.) = 154
.
.
.
That was my hitting-the-nail-on-its-head
moment, and I created the symlink
from the installed Qt5.10.1
's platforms
directory mentioned below :
"...Qt5.10.1/Tools/QtCreator/lib/Qt/plugins/platforms/"
onto the searched path which is "...VirtualBox-5.2.8/out/linux.amd64/release/bin/"
. Thus, VirtualBox-5.2.8
built from source on Linux(Ubuntu 17.10 x86_64
) using Clang/LLVM
, finally launched successfully!
In fact, another interesting thing here is that, I have built VirtualBox-5.2.8
entirely using Clang/Clang++/LLVM
on Ubuntu 17.10 x86_64
after substantial effort - for FreeBSD
, there's already a port for building VirtualBox
using clang
but for Linux, it's heavily dependent on GCC
as I saw and hence it took a lot of effort to get to this point to be able successfully build VirtualBox-5.2.8
from its source using Clang/Clang++/LLVM
on Ubuntu 17.10 x86_64
for target Linux/AMD64
(Ubuntu 17.10 x86_64
) and successfully launch it after resolving other issues along with this notorious libqxcb.so
one.
Cheers.