[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1010049: qt6-base-dev: should provide a QT_HOST_PATH directory for cross building



Package: qt6-base-dev
Version: 6.2.4+dfsg-4
X-Debbugs-Cc: debian-cross@lists.debian.org
User: debian-cross@lists.debian.org
Usertags: ftcbfs
Control: affects -1 + src:qt6-base src:qt6-charts src:qt6-declarative src:qt6-quick3d

qt6-charts (for example) fails to cross build from source. You can see a
failure at
https://crossqa.debian.net/build/qt6-charts_6.2.4-2_mipsel_20220423044846.log.
The crucial bit is:

| CMake Error at /usr/lib/mipsel-linux-gnu/cmake/Qt6/QtSetup.cmake:224 (message):
|   You need to set QT_HOST_PATH to cross compile Qt.

I think this makes it relatively obvious what needs to happen to fix it:
We should provide QT_HOST_PATH. This is where the problems begin.
According to https://doc.qt.io/qt-6/cmake-variable-qt-host-path.html,
QT_HOST_PATH should point to the qt6 installation and include e.g. moc.
Debian's qt6 moc is installed as /usr/lib/qt6/libexec/moc by
qt6-base-dev-tools. It's good that this has been split into a
Multi-Arch: foreign package already. However, that path is
architecture-independent and thus likely not suitable for QT_HOST_PATH.
I expect that QT_HOST_PATH also needs to point to architecture-dependent
files (e.g. libraries). Qt5 has faced as similar problem and thus added
symlink farms to qtbase5-dev in /usr/lib/<triplet>/qt5/bin pointing to
the moc from qtbase5-dev-tools. I think we need a similar symlink farm
for Qt6, but I don't know what Qt6 expects from a QT_HOST_PATH.

So this raises multiple questions:
 * What should QT_HOST_PATH be?
   + /usr/lib/<triplet>/qt6
   + /usr/lib/<triplet>
   + Something else?
 * How do we have to structure the contents of QT_HOST_PATH?
   + Where precisely do tools like moc and rcc have to be located?
   + What other files are required to be located?

I request assistance from the Qt6 maintainers in figuring this out and
providing answers to the questions above. I hope that we can
constructively work this out together in a similar way that Lisandro and
Dmitry made cross building work for Qt5. At that time, none of the
involved parties knew how it would work, but combining the knowledge
resulted in a solution. Thank you for considering. I've written down
what I know.

Helmut


Reply to: