qtpaths return incorrect path
Solved
Qt 6
-
Hello!
I was cross-compile Qt-6.2.4, as host tools I was use packages from Debian bullseye-backports repo.
But cross-compile app failed............. make[2]: *** No rule to make target '/usr/libexec/moc', needed by '.moc/moc_file_impl.cpp'. Stop. make[2]: *** Waiting for unfinished jobs.... generating .moc/moc_predefs.h .............
This is very strange because system contain
moc
$ ls -F /usr/lib/qt6/bin/ androiddeployqt* qmldom* qsb* androidtestrunner* qmleasing* qscxmlc* lconvert* qmlformat* qt-cmake* lrelease* qmllint* qt-cmake-private* lupdate* qmlplugindump* qt-cmake-private-install.cmake qdbuscpp2xml* qmlpreview* qt-cmake-standalone-test* qdbusxml2cpp* qmlprofiler* qt-configure-module* qmake@ qmltestrunner* qtpaths* qmake6* qmltime* qtpaths6* $ ls -F /usr/lib/qt6/libexec/ android_emulator_launcher.sh* qlalr* rcc* cmake_automoc_parser* qmlcachegen* syncqt.pl* ensure_pro_file.cmake qmlimportscanner* tracegen* lrelease-pro* qmltyperegistrar* uic* lupdate-pro* qt-internal-configure-tests* moc* qvkgen*
And
qmake
return correct paths$ /usr/lib/qt6/bin/qmake -query QT_HOST_LIBEXECS /usr/lib/qt6/libexec
After this I was request
QT_HOST_LIBEXECS
via cross-compiledqtpaths
and it return invalid path$ staging_sml7105/qt6_sti7105/bin/qtpaths -query QT_HOST_LIBEXECS /usr/libexec
So look like cross-compile
target_qt.conf
invalid[DevicePaths] Prefix=/usr/local/qt [Paths] Prefix=../ HostPrefix=../../../../../usr HostData=../tmp/firmware/staging_sml7105/qt6_sti7105 Sysroot= SysrootifyPrefix=false TargetSpec=devices/linux-sh4-stmicro-ST7105-g++ HostSpec=linux-g++
Can you advice how can I modify
target_qt.conf
for fix this is? May be I should pass some specific parameter at qtbase configure?
Thank you. -
Dirty hack - create symlink
ln --symbolic /usr/lib/qt6/libexec/moc /usr/libexec/moc
qmake
work because it have symlink at/usr
$ ls -l /usr/bin/qmake* lrwxrwxrwx 1 root root 9 May 3 2019 /usr/bin/qmake -> qtchooser lrwxrwxrwx 1 root root 21 Jun 13 23:13 /usr/bin/qmake6 -> ../lib/qt6/bin/qmake6