Unsolved Building qtbase on Ubuntu 19.10 from source
-
Anyone know how to do this correctly. I did
git clone https://github.com/qt/qtbase.git
thencd qtbase
andgit checkout 5.12.4
. Next steps wereqmake qtbase.pro
,make -j4
, andsudo make -j4 install
. The output fromqmake qtbase.pro
indicates:
Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing. I checked and AT-SPI isunstable
in 19.10. My intention was to buildpyside2
from source and supply those components ie. Qt5Core_DIR which apparently could not be detected on my system. The rest is output fromsudo make install
:
In file included from qdbuserror.cpp:46: qdbus_symbols_p.h:61:12: fatal error: dbus/dbus.h: No such file or directory 61 | # include <dbus/dbus.h> | ^~~~~~~~~~~~~ In file included from qdbusintegrator_p.h:57, from qdbusintegrator.cpp:41: qdbus_symbols_p.h:61:12: fatal error: dbus/dbus.h: No such file or directory 61 | # include <dbus/dbus.h> | ^~~~~~~~~~~~~
In file included from qdbusconnection_p.h:69, from qdbusconnection.cpp:42: qdbus_symbols_p.h:61:12: fatal error: dbus/dbus.h: No such file or directory 61 | # include <dbus/dbus.h>
-
-
Hi,
You are missing the dbus development package.
On a side note, you should do out of source builds. That way you don't pollute your sources with build artifacts and if you have to restart your build from scratch you can just nuke the build folder.
-
@SGaist I am not sure what you mean. I do appear to have the Qt5 DBus package installed. The includes are at
/usr/include/x86_64-linux-gnu/qt5/QtDBus
. Where is the source package for Ubuntu or the source on Git for the DBus package? I also don't really want to build everything from source - just the parts for which no-dev
package was available in theeoan
Ubuntu distribution. There was a similar question to mine raised before and no answer. -
-
QtDbus and DBus are two different things. The former uses the later hence my suggestion to install the the development package for DBus.
You are currently building only qtbase which is already available for your distribution so what parts do you want to build exactly ?
-
@SGaist now it seems I have an issue with
Cannot read /usr/local/Qt-5.12.4/mkspecs/common/linux.conf: No such file or directory
and featuresystem-zlib
missing even though that package is installed. Clearly the original issue ofpyside2
missing Qt5Core_DIR was incorrect as it should have been there. Unlike some of the other packagesqtscxml
which I built fromgit
and installed,qtbase
has given more trouble than I expected. My thought was buildingpyside2
from source would ensure all packages were available on my system so that all examples would work and it is hard to understand how installing from pip3 could guarantee that as many packages were not installed by default. I want this setup in such a way that I can easily go back toqt5-default
package. If you can clarifyyou should do out of source builds
that might help.I created
/usr/local/Qt-5.12.4/mkspecs/linux-g++/qmake.conf
and edited/home/gordon/qtbase/mkspecs/features/resolve_config.prf
to comment out 2 lines needed for the mac OS but this seems wrong and messy. -
From the looks of it you tried to install a half-built Qt.
As for out of source builds, create a folder outside of Qt's sources, then start the configuration and build process from there.
Can you provide a bit more information from your side ?
- Why do you want to build PySide2 rather than using e.g. pip to install it ?
- In case you really need to build it, why not use your distribution provided Qt ?
- In case this is not an option, why not use one of the pre-built Qt version available through the installer provided by the Qt Company ?
-
@SGaist the reason I wanted to build pyside2 was because I wanted to have all the shared objects files required on my system. I could not see how
pip
install would have added these to my system. However, I have now deletedqtbase
folder due to the difficulties, I did not want to half-build Qt just a few component packages missing from my distribution. The remaining issue isqmake -v
giving as output:
QMake version 3.1
Using Qt version 5.12.4 in /usr/local/Qt-5.12.4/lib
and even though I have usedqtchooser
I cannot figure out where the5.12.4 in /usr/local/Qt-5.12.4/lib
is coming from. It does not exist and should be/usr/lib/x86_64-linux-gnu
or something similar. I solved this by removingqt5-qmake
package and then installing it again. This had the effect of removing all the additional Qt packages I had added, the names of which I have filed. Thanks to all for assistance. -
The PySide2 package provides everything needed.