Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.3, 6.4, 6.5, 6.6, 6.7, 6.8
-
None
-
-
b4246a5c2 (dev), 8e424eba7 (6.7), 4f57f76a9 (6.6), c9b8dcae2 (tqtc/lts-6.5)
Description
Original issue in conan: https://github.com/conan-io/conan-center-index/issues/21652
This is a blocking issue to use qt from conan and globally in an environment where you cannot change yourself the source directory and the build directory to shorten the paths.
How to reproduce locally without conan:
mkdir C:\.c\p\qt8f084c48e3426\s\
cd C:\.c\p\qt8f084c48e3426\s\
git clone https://code.qt.io/qt/qt5.git src
cd src
perl.exe init-repository --module-subset=qtbase,qtrepotools,qtdeclarative,qtshadertools
mkdir C:/.c/p/b/qta7d2dc6fbf9eb/b/build/Debug/
cd C:/.c/p/b/qta7d2dc6fbf9eb/b/build/Debug/
C:\.c\p\qt8f084c48e3426\s\src\configure.bat -gui -widgets
cmake --build . --parallel
Then you get the following error;
[5146/5393] Building CXX object qtdeclarative\src\quickdialogs\quickdialogsquickimpl\CMakeFiles\QuickDialogs2QuickImpl.dir\quickdialogs2quickimpl_qmltyperegistrations.cpp.obj FAILED: qtdeclarative/src/quickdialogs/quickdialogsquickimpl/CMakeFiles/QuickDialogs2QuickImpl.dir/quickdialogs2quickimpl_qmltyperegistrations.cpp.obj C:\PROGRA~2\MICROS~2\2019\PROFES~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe /nologo /TP -DNOMINMAX -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_QUICKDIALOGS2QUICKIMPL_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x040800 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_GUI_LIB -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NETWORK_LIB -DQT_NO_AS_CONST -DQT_NO_AS_CONST=1 -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_FOREACH=1 -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_OPENGL_LIB -DQT_QMLBUILTINS_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICKCONTROLS2IMPL_LIB -DQT_QUICKDIALOGS2UTILS_LIB -DQT_QUICKTEMPLATES2_LIB -DQT_QUICK_LIB -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DQuickDialogs2QuickImpl_EXPORTS -DUNICODE -DWIN32 -DWIN64 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_USE_MATH_DEFINES -D_WIN64 -D_WINDLL -Iqtdeclarative\src\quickdialogs\quickdialogsquickimpl\QuickDialogs2QuickImpl_autogen\include -Iqtbase\include -Iqtbase\include\QtQuickDialogs2QuickImpl -IC:\.c\p\qt8f084c48e3426\s\src\qtdeclarative\src\quickdialogs\quickdialogsquickimpl -Iqtdeclarative\src\quickdialogs\quickdialogsquickimpl -Iqtbase\include\QtQuickDialogs2QuickImpl\6.8.0 -Iqtbase\include\QtQuickDialogs2QuickImpl\6.8.0\QtQuickDialogs2QuickImpl -Iqtdeclarative\src\qml -Iqtbase\include\QtQml\6.8.0 -Iqtbase\include\QtQml\6.8.0\QtQml -Iqtbase\src\corelib -Iqtbase\include\QtCore\6.8.0 -Iqtbase\include\QtCore\6.8.0\QtCore -Iqtbase\include\QtCore -IC:\.c\p\qt8f084c48e3426\s\src\qtbase\mkspecs\win32-msvc -Iqtbase\include\QtQmlBuiltins\6.8.0 -Iqtbase\include\QtQmlBuiltins\6.8.0\QtQmlBuiltins -Iqtbase\include\QtQmlBuiltins -Iqtbase\include\QtQml -Iqtbase\include\QtQmlIntegration -IC:\.c\p\qt8f084c48e3426\s\src\qtdeclarative\src\qmlintegration -Iqtdeclarative\src\qmlintegration -Iqtbase\include\QtNetwork -Iqtbase\include\QtGui -Iqtbase\include\QtQuick -Iqtbase\include\QtQmlModels -Iqtbase\include\QtOpenGL -Iqtbase\src\gui -Iqtbase\include\QtGui\6.8.0 -Iqtbase\include\QtGui\6.8.0\QtGui -Iqtdeclarative\src\quick -Iqtbase\include\QtQuick\6.8.0 -Iqtbase\include\QtQuick\6.8.0\QtQuick -Iqtdeclarative\src\qmlmodels -Iqtbase\include\QtQmlModels\6.8.0 -Iqtbase\include\QtQmlModels\6.8.0\QtQmlModels -Iqtbase\include\QtQuickTemplates2 -Iqtdeclarative\src\quicktemplates -Iqtbase\include\QtQuickTemplates2\6.8.0 -Iqtbase\include\QtQuickTemplates2\6.8.0\QtQuickTemplates2 -Iqtdeclarative\src\quickcontrolsimpl -Iqtbase\include\QtQuickControls2Impl\6.8.0 -Iqtbase\include\QtQuickControls2Impl\6.8.0\QtQuickControls2Impl -Iqtbase\include\QtQuickControls2Impl -Iqtbase\include\QtQuickDialogs2Utils -Iqtdeclarative\src\quickdialogs\quickdialogsutils -Iqtbase\include\QtQuickDialogs2Utils\6.8.0 -Iqtbase\include\QtQuickDialogs2Utils\6.8.0\QtQuickDialogs2Utils /DWIN32 /D_WINDOWS /DNDEBUG -O2 -Ob3 -O2 -Ob3 -MD /W3 /EHs-c- /wd4530 /wd4577 -Zc:__cplusplus -permissive- -utf-8 -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:ternary -Zc:externConstexpr -Zc:wchar_t -bigobj -guard:cf -Gw -std:c++17 /bigobj /YuC:/.c/p/b/qta7d2dc6fbf9eb/b/build/Debug/qtdeclarative/src/quickdialogs/quickdialogsquickimpl/CMakeFiles/QuickDialogs2QuickImpl.dir/cmake_pch.hxx /FpC:/.c/p/b/qta7d2dc6fbf9eb/b/build/Debug/qtdeclarative/src/quickdialogs/quickdialogsquickimpl/CMakeFiles/QuickDialogs2QuickImpl.dir/./cmake_pch.cxx.pch /FIC:/.c/p/b/qta7d2dc6fbf9eb/b/build/Debug/qtdeclarative/src/quickdialogs/quickdialogsquickimpl/CMakeFiles/QuickDialogs2QuickImpl.dir/cmake_pch.hxx /showIncludes /Foqtdeclarative\src\quickdialogs\quickdialogsquickimpl\CMakeFiles\QuickDialogs2QuickImpl.dir\quickdialogs2quickimpl_qmltyperegistrations.cpp.obj /Fdqtdeclarative\src\quickdialogs\quickdialogsquickimpl\CMakeFiles\QuickDialogs2QuickImpl.dir\ /FS -c qtdeclarative\src\quickdialogs\quickdialogsquickimpl\quickdialogs2quickimpl_qmltyperegistrations.cpp qtbase\include\QtQuickDialogs2QuickImpl\6.8.0\QtQuickDialogs2QuickImpl\private/qquicksaturationlightnesspicker_p.h(1): fatal error C1083: Cannot open include file: '../../../../../../../../../../../qt8f084c48e3426/s/src/qtdeclarative/src/quickdialogs/quickdialogsquickimpl/qquicksaturationlightnesspicker_p.h': No such file or directory
Investigation
- There is an issue in msvc, the include path longer than 260 characters are not supported: https://developercommunity.visualstudio.com/t/clexe-compiler-driver-cannot-handle-long-file-path/975889
- syncqt tool in the qt build system generates relative path from the build folder to the source folder
- In conan the build and the source folder are far away (even if conan home is reduced to a minimum like C:\.c
=> we end up having a build path + relative path to source > 260 chars when qtdeclarative + qtsharedtool are activated