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

2022-09-06 Thread Fab Stz
Hello.

I have a similar problem.

In addition to:
-DQT_HOST_PATH=/usr/lib/qt6

You must also set:
-DQT_HOST_PATH_CMAKE_DIR=/usr/lib/${DEB_HOST_MULTIARCH}/cmake

But then it still fails with this error now:

Configuring submodule 'qtbase'
-- Could NOT find Qt6CoreTools (missing: Qt6CoreTools_DIR)
CMake Error at qtbase/cmake/QtToolHelpers.cmake:184 (message):
  Failed to find the host tool "Qt6::moc".  It is part of the Qt6CoreTools
  package, but the package could not be found.  Make sure you have built and
  installed the host Core module, which will ensure the creation of the
  Qt6CoreTools package.
Call Stack (most recent call first):
  qtbase/src/tools/moc/CMakeLists.txt:8 (qt_internal_add_tool)



Any idea how to make it find the Qt core tools like moc?
The qt6-base-dev package is installed, as well as qt6-base-dev-tools

Regards


On Sat, 23 Apr 2022 15:14:55 +0200 Helmut Grohne  wrote:
> Hi,
> 
> On Sat, Apr 23, 2022 at 09:38:54AM +0200, Helmut Grohne wrote:
> > 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
> 
> Dmitry noted that none of Qt6's executables (possibly except for qmake)
> are architecture-dependent and encouraged me to try
> -DQT_HOST_PATH=/usr/lib/qt6. When you

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

2022-04-23 Thread Helmut Grohne
Hi,

On Sat, Apr 23, 2022 at 09:38:54AM +0200, Helmut Grohne wrote:
> 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

Dmitry noted that none of Qt6's executables (possibly except for qmake)
are architecture-dependent and encouraged me to try
-DQT_HOST_PATH=/usr/lib/qt6. When you do that, you get the following
error:

| CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt6/Qt6Config.cmake:61 
(find_package):
|   Could not find a package configuration file provided by "Qt6HostInfo" with
|   any of the following names:
| 
| Qt6HostInfoConfig.cmake
| qt6hostinfo-config.cmake
| 
|   Add the installation prefix of "Qt6HostInfo" to CMAKE_PREFIX_PATH or set
|   "Qt6HostInfo_DIR" to a directory containing one of the above files.  If
|   "Qt6HostInfo" provides a separate development package or SDK, be sure it
|   has been installed.
| Call Stack (most recent call first):
|   CMakeLists.txt:16 (find_package)
| 
| 
| -- Configuring incomplete, errors occurred!

So no, that's not the solution unfortunately. As far as I can see, this
file is architecture-dependent and since QT_HOST_PATH defines its
location, QT_HOST_PATH must be architecture-dependent as I expected.

Helmut



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

2022-04-23 Thread Helmut Grohne
Package: qt6-base-dev
Version: 6.2.4+dfsg-4
X-Debbugs-Cc: debian-cr...@lists.debian.org
User: debian-cr...@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//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//qt6
   + /usr/lib/
   + 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