Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Building qtbase on Ubuntu 19.10 from source
Anyone know how to do this correctly. I did
git clone https://github.com/qt/qtbase.gitthen
git checkout 5.12.4. Next steps were
make -j4, and
sudo make -j4 install. The output from
Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing. I checked and AT-SPI is
unstablein 19.10. My intention was to build
pyside2from source and supply those components ie. Qt5Core_DIR which apparently could not be detected on my system. The rest is output from
sudo 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>
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
-devpackage was available in the
eoanUbuntu 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 directoryand feature
system-zlibmissing even though that package is installed. Clearly the original issue of
pyside2missing Qt5Core_DIR was incorrect as it should have been there. Unlike some of the other packages
qtscxmlwhich I built from
qtbasehas given more trouble than I expected. My thought was building
pyside2from 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 to
qt5-defaultpackage. If you can clarify
you should do out of source buildsthat might help.
/home/gordon/qtbase/mkspecs/features/resolve_config.prfto 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
pipinstall would have added these to my system. However, I have now deleted
qtbasefolder due to the difficulties, I did not want to half-build Qt just a few component packages missing from my distribution. The remaining issue is
qmake -vgiving 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 used
qtchooserI cannot figure out where the
5.12.4 in /usr/local/Qt-5.12.4/libis coming from. It does not exist and should be
/usr/lib/x86_64-linux-gnuor something similar. I solved this by removing
qt5-qmakepackage 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.