I'm trying to build qt6 in win10 using cmake+ninja. I got the following error:
ninja: error:
Stat(qtquickcontrols2/src/imports/controls/fusion/impl/CMakeFiles/qtquickcontrols2fusionstyleimplplugin_resources_qtquickcontrols2fusionstyleimplplugin_qml_files_resource_2.dir/.rcc/qmlcache/qtquickcontrols2fusionstyleimplplugin_qml_files_resource_2/qmlcache_loader.cpp.obj):
Filename longer than 260 characters
I tried to switch on the long file path in registry, and it doesn't help.
Is ninja able to handle long filename?
It's a bug when trying to build Qml static plugins.
The bug report:
https://bugreports.qt.io/browse/QTBUG-88581
If you don't need Qml static plugins, you can build Qt framework without them, by adding these parameters to the configure command:
-skip qtdeclarative -skip qtquick1 -skip qtquickcontrols \
-skip qtquickcontrols2 -skip qttools -skip qtwebengine
Related
My ssd died and I had to reinstall Qt, Im using the same version as before (5.15.2, Qt Creator 6.0.2 and MSVC2019). Described problems appears only while using Static build.
This type (ApplicationWindow) is not supported as a root (Im not 100% sure if it was fine before reinstall)
Invalid property name "title, maximumHeight, maximumWidth, minimumHeight, minimumWidth".
And finally after resolving (Changed from ApplicationWindow to Window, and commented Invalid Properties) these two errors I got: Line 1: Qt Quick emulation layer crashed. I attached a debugger to Qt Creator and it's 0xC0000005 on Editor, Preview and Render.
I tested it in both ways, with latest Qt Creator (installed before making Static kit because it will wipe my Qt directory) and with Qt Creator 6.0.2 (installed after making Static kit).
To compile Static Kit I used this script, but after some problems (jom and jom install did not create any files in QtInstallDir) I just run configure.bat by myself, and then jom and jom install and files were in their place.
The solution can be:
Designing using diffrent kit with Window and then on release change Kit to static, change Window to ApplicationWindow (Im using onClosing from ApplicationWindow).
but it's dirty and I personally do not like it. Is there any other solution?
EDIT: non-static versions are fine (self-compiled and one from MaintenanceTool).
Static configure.bat:
configure.bat -prefix %QTINSTALLDIR% -platform %PLATFORM% -opensource -debug-and-release -confirm-license -opengl dynamic -mp -static -static-runtime -no-shared -qt-libpng -qt-libjpeg -qt-zlib -qt-pcre -no-compile-examples -nomake examples -no-icu -optimize-size -qt-sqlite -openssl-linked OPENSSL_PREFIX=%SSLINSTALLDIR%
Non-static configure.bat:
configure.bat -prefix %QTINSTALLDIR% -platform %PLATFORM% -opensource -debug-and-release -confirm-license -opengl dynamic -mp -no-compile-examples -nomake examples -optimize-size -qt-sqlite
Diffrence:
-static -static-runtime -no-shared -qt-libpng -qt-libjpeg -qt-zlib -qt-pcre -openssl-linked OPENSSL_PREFIX=<location>
Okay, I fixed the Invalid property name .., I dont know what really fixed it but:
I had wrong versions of requirements. I was on latest of Ruby, Python etc.
I installed Submodules one more time using script linked in main post and then installed them one by one by my own hands using qmake then jom clean all then jom install.
Also I found that the Line 1: Qt Quick emulation layer crashed. error appear only when I have QtQuick.Controls <any_version> in imports. Im still trying to fix this.
Fixed. I did this by doing those steps:
In maintenance tool I downloaded Mingw64 and Mingw64 for 5.15.2 and for "Tools".
I did an static mingw build using this powershell script: https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW
I saw that the script is changing qmake.conf files in mkspecs folder. I ran this MSVC script to make MSVC Static build and after unzipping QtBase I modified qmake.conf in mkspecs/winrt-x64-msvc2019 and in mkspecs/win32-msvc.
QMAKE_LFLAGS += -static
QMAKE_CFLAGS_RELEASE -= -O2
QMAKE_CFLAGS_RELEASE += -Os
DEFINES += QT_STATIC_BUILD
Then the qt setup and qt build command, when build is finished I modified the (THIS TIME IN PREFIX LOCATION / LOCATION WHERE QT STATIC IS INSTALLED) qmake.conf in mkspecs/winrt-x64-msvc2019 and in mkspecs/win32-msvc
CONFIG += static
Run Qt Creator and the Designer is fine.
I've been successful in compiling Qt 5.9.2 statically using this guide. I am able to deploy basic C++ applications. However, I want to use QML and Qt3D in my application and statically link it. I've been looking online and I'm not entirely sure what modifications I need to do in order for it to work.
When I try to compile a project with QML or Qt3D, I get this error.
:-1: error: Unknown module(s) in QT: 3dcore 3drender 3dinput 3dquick qml quick 3dquickextras datavisualization
The configure command I used to configure the build was this:
configure -debug-and-release -opensource -platform win32-msvc2012 -opengl desktop -static -nomake examples -nomake tests
This configure was done in the qtbase folder.
How do I statically compile Qt 5.9.2 to include QML and Qt3D?
What is the correct way to use -prefix -extprefix and -hostprefix options to cross compile Qt5?
I have sysroot dir for my arm board. And I have no problems with cross compiling Qt for ARM except one - I can't figure out how to specify installation path to directory on my host machine (not whitin sysroot). Every combination of -[..]prefix flags trying to install Qt on board. There is not much disk space on board, so I want install Qt locally.
It's my current config:
./configure -opengl es2 -nomake tests -no-libjpeg -skip qtwebkit -skip qtwebkit-examples -no-xcb -device linux-jetson-tk1-g++ -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -sysroot /mnt/jetson_tk1_sysroot -hostprefix /home/alan/work/qt/qt_5.5.1_arm_cross_compiled -make libs -debug -v
I'm already read this SO topic, Qt docs and google a lot.
I'm running Ubuntu on both host and target if it's matter.
Install step targets the directory specified by extprefix which is optional and defaults to sysroot/prefix. Defining extprefix to point some directory in the host should prevent you from polluting your sysroot. hostprefix allows separating host tools like qmake from target binaries. When given, such tools will be installed under the specified directory instead of extprefix.
Using these prefix flags keeps your sysroot clean and separates device binaries and host tools:
export INSTALLPATH=/home/alan/work/qt/qt_5.5.1_arm_cross_compiled
./configure ... -extprefix $INSTALLPATH/binaries -hostprefix $INSTALLPATH/tools
I am trying to build Qt using meta-toolchain-qt5, but when I do this via poky-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-vfp-vfpv4-neon-toolchain-2.0.1.sāāāāh, I don't see anything about QtWebEngine in the sysroot directory.
I also tried to build Qt using the following command
bitbake meta-toolchain-qt5
but it is the same result; I don't have anything regarding Qt WebEngine.
How can I build Qt with QtWebEngine support?
Looking at meta-toolchain-qt5 it inherits populate_sdk_qt5, which in turns adds packagegroup-qt5-toolchain-target to the SDK. Taking a closer look at packagegroup-qt5-toolchain-target, reveals that the packagegroup doesn't directly include qtwebengine. Thus, if nothing else in packagegroup-qt5-toolchain-target drags in qtwebengine as a dependeny, qtwebengine won't be installed.
If you add qtwebengine to RDEPENDS_${PN} in packagegroup-qt5-toolchain-target, you'll get the relevant qtwebengine packages in your SDK.
I could build entire QT on windows.
Now I have to build QTCore without android.
I see here that QTCore has a component that links to Android c++ run time and I have to skip building that component.
I am not sure if I get android capabilities if I build it simply using :
configure -nomake tests -nomake examples -opensource
nmake