toltec icon indicating copy to clipboard operation
toltec copied to clipboard

Add Qt packages

Open matteodelabre opened this issue 3 years ago • 11 comments

I’m currently thinking about making a Qt package for Toltec. This could allow us to have more up-to-date versions of Qt, as well as including a precise set of Qt libs which does not change between two rM updates. This is blocked by:

  • makedepends support, including Toltec packages, so that Qt-dependent packages can rely on those artifacts (see #85),
  • the Python rewrite of the build tooling (#211) (needed for #85),
  • opkg support in our build toolchain, so that needed packages can be installed into the container before building (this is almost done).

See the discussion in #83.

matteodelabre avatar Jan 11 '21 10:01 matteodelabre

That's very nice idea.. because lack of qwidgets it's really annoying. And qt libs are really big to provide them together with each app.

coozoo avatar Jan 13 '21 23:01 coozoo

Have you tried to compile QT and any widget application using it? Because actually I've compiled QT and tried to compile simple widget app (in the way like it is made in oxide) and I'm getting error in loading epaper plugin. I'm able to see that error only with QT_DEBUG_PLUGINS=1

QLibraryPrivate::loadPlugin failed on "/opt/testwidget/bin/platforms/libepaper.so" : "Cannot load library /opt/testwidget/bin/platforms/libepaper.so: (/opt/testwidget/bin/platforms/libepaper.so: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"

coozoo avatar Jan 14 '21 13:01 coozoo

Do you plan to include Qt WebEngine as well?

t1m-dev avatar Feb 15 '21 17:02 t1m-dev

It’s not off the table. We’re still waiting on #274 before we can start investigating this.

matteodelabre avatar Feb 19 '21 20:02 matteodelabre

Do you plan to include Qt WebEngine as well?

I don't think it's possible to do for our device as QtWebEngine requires opengl....

coozoo avatar Feb 25 '21 11:02 coozoo

I don't think it's possible to do for our device as QtWebEngine requires opengl....

So use MESA or another software only implementation of opengl?

Eeems avatar Feb 25 '21 15:02 Eeems

So use MESA or another software only implementation of opengl?

Actually, I'm not sure. I've just tried to compile it for our freescale cpu and for that you need to configure qt with -no-opengl flag. And sure with this flag qtwebengine throws error... Maybe it's possible but definitely it's require to dig somewhere deep inside QT...

UPD there is some nice answer https://stackoverflow.com/questions/33090346/is-there-any-way-to-use-qtwebengine-without-opengl

and this in reply to answer https://lists.qt-project.org/pipermail/qtwebengine/2015-December/000282.html

so theoretically it is possible :)

coozoo avatar Feb 25 '21 17:02 coozoo

Could we use QtQuick2DRenderer for this? See:

  • https://doc.qt.io/QtQuick2DRenderer/qtquick2drenderer-installation-guide.html
  • https://lists.qt-project.org/pipermail/qtwebengine/2015-December/000282.html
  • https://stackoverflow.com/questions/33090346/is-there-any-way-to-use-qtwebengine-without-opengl

matteodelabre avatar Feb 25 '21 17:02 matteodelabre

Work is ongoing on the package/qt branch. Currently it contains the following packages: libqsgepaper, libepaper-qpa, libqt5-base (including Qt Widgets), libqt5-declarative, libqt5-quickcontrols2, libqt5-svg, and libqt5-websockets. The remaining part is to figure out a simple way to make Qt apps use the libs from /opt instead of the system ones.

matteodelabre avatar Apr 04 '21 23:04 matteodelabre

The remaining part is to figure out a simple way to make Qt apps use the libs from /opt instead of the system ones.

how about qt.conf shipped with each app? Because change it system wide is not good idea.

coozoo avatar Apr 05 '21 06:04 coozoo

Before qt.conf is even loaded, the app needs to load the correct libQt5Core library (i.e., the one in /opt instead of the one in /usr). For that, I plan on setting rpath on each app binary that needs to use the Qt package. Once the correct dynamic dependencies are loaded, there should be no need of overriding qt.conf since the apps will have the correct paths baked in. Binaries without rpath set will continue to use the system-provided Qt.

matteodelabre avatar Apr 05 '21 08:04 matteodelabre