Created attachment 553796 [details, diff] qt5-build.eclass patch The qt5-build eclass does not work with crossdev. The attached patches fix cross-compilation of qtbase 5.11.2 libraries. My approach is different from the one taken for Qt 4 in bug 327827, since I build Qt tools for the target system. With my approach, the build will fail if the corresponding Qt packages are not installed on the host (because of qmake, moc, etc), but I don't know how to add that to BDEPEND without creating circular dependencies in the non-cross case. A tool needed special handling: qfloat16-tables is normally compiled and executed during the build of qtcore but not installed, so the host doesn't have it. The patches add a QT5_COMPILE_FOR_HOST_SUBDIR variable and a qt5_qmake_host function to the eclass as a hack to handle that, but I'm not sure this is the right approach. Related bugs: - During the configure tests, the reloadSpec function of configure.pri reloads the mkspec platform file, so it overrides some Gentoo-provided variables, including QMAKE_CXX and QMAKE_CXXFLAGS (bugs 639494, 649420). Then the wrong compiler is called and platform detection does not work as intended. To work around that, the relevant variables are written directly to the mkspec. - Some installed files reference the build environment, for instance the pkgconfig files contain "prefix = /usr/${CHOST}/usr", this is related to bug 610782. The attached patches do not cover non-qtbase Qt libraries for now. qtdeclarative builds fine but some install paths are wrong unless an appropriate qt.conf is given to qmake.
Created attachment 553798 [details, diff] dev-qt/qtcore-5.11.2-r1 patch
Created attachment 553800 [details, diff] dev-qt/qtcore-5.11.2-r1 additional patch
Created attachment 553856 [details, diff] qt5-build.eclass patch v2 (fixed ar invocation)
Indeed. Upstream qtcore-5.15.2-r14 fails to compile. Not tried this patches, but confirm such problem. On amd64 cross-compile to aarch64-unknown-linux-gnu.
(In reply to tgyt from comment #4) > Indeed. Upstream qtcore-5.15.2-r14 fails to compile. Not tried this patches, > but confirm such problem. On amd64 cross-compile to > aarch64-unknown-linux-gnu. A fresh build.log would be helpful.