Error Building Qt6.3.0 from source for Windows
-
Hello,
I'm trying to compile qt 6.3.0 with windows 11, visual studio 2022 comunity. I can't get over the error:
Error opening D: /raspi-qt-compile/raspi-qt6.3/qt-everywhere-src-6.3.0/qt-build-msvc2022_64/qtdeclarative/src/quickcontrols2/basic/impl/qtquickcontrols2basicstyleimplplugin_autogen_autogen/include_Rugtimplugin_autogen/include_Rugt .json for readingThe compile step is:
FAILED: qtdeclarative/src/quickcontrols2/basic/impl/meta_types/qt6qtquickcontrols2basicstyleimplplugin_metatypes.json.gen qtdeclarative/src/quickcontrols2/basic/impl/meta_types/qt6qtquickcontrols2basicstyleimplplugin_metatypes.json D:/raspi-qt-compile/raspi-qt6.3/qt-everywhere-src-6.3.0/qt-build-msvc2022_64/qtdeclarative/src/quickcontrols2/basic/impl/meta_types/qt6qtquickcontrols2basicstyleimplplugin_metatypes.json.gen D:/raspi-qt-compile/raspi-qt6.3/qt-everywhere-src-6.3.0/qt-build-msvc2022_64/qtdeclarative/src/quickcontrols2/basic/impl/meta_types/qt6qtquickcontrols2basicstyleimplplugin_metatypes.json
That file listed in:
D: \ raspi-qt-compile \ raspi-qt6.3 \ qt-everywhere-src-6.3.0 \ qt-build-msvc2022_64 \ qtdeclarative \ src \ quickcontrols2 \ basic \ impl \ meta_types \ qtquickcontrols2basicstyleimplplugin_json_file_list.txtMy start environment:
REM Set up Microsoft Visual Studio 2022, where <arch> is amd64, x86, etc. CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64" SET _ROOT=C:\Qt\6.3.0\Src SET PATH=%_ROOT%\qtbase\bin;%PATH%; SET _ROOT=
Configure:
"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" ^ -DCMAKE_INSTALL_PREFIX=D:\raspi-qt-compile\raspi-qt6.3\qt6-msvc-host ^ -DQT_QMAKE_TARGET_MKSPEC=win32-msvc ^ -DCMAKE_C_COMPILER=cl ^ -DCMAKE_CXX_COMPILER=cl ^ -DQT_BUILD_EXAMPLES=FALSE ^ -DCMAKE_CONFIGURATION_TYPES=Release;Debug ^ -DCMAKE_OBJECT_PATH_MAX=700 ^ -DQT_BUILD_EXAMPLES=OFF ^ -DQT_BUILD_TESTS=OFF ^ -DBUILD_qtwebengine=OFF ^ -DINPUT_msvc_mp=yes ^ -G "Ninja Multi-Config" ^ D:/raspi-qt-compile/raspi-qt6.3/qt-everywhere-src-6.3.0
Thanks
-
@Gio26 said in Error Building Qt6.3.0 from source for Windows:
Error opening D: /raspi-qt-compile/raspi-qt6.3/qt-everywhere-src-6.3.0/qt-build-msvc2022_64/qtdeclarative/src/quickcontrols2/basic/impl/qtquickcontrols2basicstyleimplplugin_autogen_autogen/include_Rugtimplugin_autogen/include_Rugt .json for reading
That's a very long path. I suspect you are hitting the Windows path length limit.
You can try to:
- Disable the limit (https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later ), OR
- Shorten your CMAKE_INSTALL_PREFIX.
-
Hello JKSH,
thanks a lot for your answer.yes you are right, I have already set:
"Disable the limit (https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later )"But I will try now with shorten now.
Thanks.