Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
Qt WebEngine documentation at https://doc.qt.io/qt-6/windows-building.html has the following warning:
"Note: The path to the source directory must not contain any spaces or Windows-specific file system characters. The path should also be kept short. This prevents issues with too long file paths in the compilation phase."
But it is unclear what is the exact length at which the paths become a problem and what kind of error it will result in.
When the path is actually too long, it seems to result in errors about missing files but there's no clear indication that the problem is due to length of the path.
=> Would be great to have more information about path related problems OR maybe even a check on cmake side to warn the user if the src or build directory path is too long.
For reference, the errors seen below seem to originate from too long paths but it is really difficult to tell that the problem is the length of the path, especially since here the build and source directory paths aren't very long.
[26090/27399] ACTION //components/resources:components_resources_grit(//build/toolchain/win:x64) FAILED: gen/components/resources/components_resources_grit.d.stamp gen/components/grit/components_resources.h gen/components/components_resources.pak gen/components/components_resources.pak.info "C:/Program Files/Python313/python.exe" ../../../../../../hmi.qt6-play/src/qtwebengine/src/3rdparty/chromium/tools/grit/grit.py -i ../../../../../../hmi.qt6-play/src/qtwebengine/src/3rdparty/chromium/components/resources/components_resources.grd build -o gen/components --depdir . --depfile gen/components/resources/components_resources_grit.d --write-only-new=1 --depend-on-stamp -D DEVTOOLS_GRD_PATH=gen/third_party/devtools-frontend/src/front_end/devtools_resources -D SHARED_INTERMEDIATE_DIR=gen -D _google_chrome=false -D _is_chrome_for_testing_branded=false -D chromeos_ash=false -D chromeos_lacros=false -D reven=false -D toolkit_views=false -D use_aura=true -D use_ozone=false -D use_titlecase=false -D scale_factors=2x -E branding_path_component=chromium -E root_gen_dir=gen -E root_src_dir=../../../../../../hmi.qt6-play/src/qtwebengine/src/3rdparty/chromium/ -E CHROMIUM_BUILD=chromium -D enable_printing=true -D enable_print_preview=true -D enable_supervised_users=false -D safe_browsing_mode=0 -D is_fuchsia=false -D use_blink=true -E about_credits_file=gen/components/resources/about_credits.html --brotli brotli.exe -f gen/tools/gritsettings/default_resource_ids -p ../../../../../../hmi.qt6-play/src/qtwebengine/src/3rdparty/chromium/tools/gritsettings/startup_resources_win.txt --assert-file-list obj/components/resources/components_resources_expected_outputs.txt Error processing node <?xml version="1.0" encoding="UTF-8"?> <include file="../security_interstitials/core/browser/resources/interstitial_webview_quiet.html" flattenhtml="true" name="IDR_SECURITY_INTERSTITIAL_QUIET_HTML" type="BINDATA" />: Failed to open ..\..\..\..\..\..\hmi.qt6-build\qtwebengine\src\core\RelWithDebInfo\AMD64\gen\components\security_interstitials\core\browser\resources\interstitial_webview_quiet\interstitial_webview_quiet.rollup.js while trying to flatten ..\..\..\..\..\..\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\components\security_interstitials\core\browser\resources\interstitial_webview_quiet.html. (No such file or directory) Traceback (most recent call last): File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\format\html_inline.py", line 597, in InlineToString return DoInline( ~~~~~~~~^ input_filename, ^^^^^^^^^^^^^^^ ...<4 lines>... rewrite_function=rewrite_function, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ filename_expansion_function=filename_expansion_function).inlined_data ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\format\html_inline.py", line 554, in DoInline flat_text = re.sub(r'<script (?P<attrs1>.*?)src="(?P<filename>[^"\']*)"' r'(?P<attrs2>.*?)></script>', InlineScript, flat_text) File "C:\Program Files\Python313\Lib\re\__init__.py", line 208, in sub return _compile(pattern, flags).sub(repl, string, count) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\format\html_inline.py", line 453, in InlineScript return InlineFileContents(match, '<script' + attrs + '>%s</script>', strip_whitespace=True) File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\format\html_inline.py", line 431, in InlineFileContents inlined_data_inst=DoInline(filepath, grd_node, allow_external_script=allow_external_script, preprocess_only=preprocess_only, strip_whitespace=strip_whitespace, filename_expansion_function=filename_expansion_function) File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\format\html_inline.py", line 536, in DoInline flat_text = util.ReadFile(input_filename, 'utf-8') File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\util.py", line 210, in ReadFile with open(filename, mode, encoding=encoding) as f: ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '..\\..\\..\\..\\..\\..\\hmi.qt6-build\\qtwebengine\\src\\core\\RelWithDebInfo\\AMD64\\gen\\components\\security_interstitials\\core\\browser\\resources\\interstitial_webview_quiet\\interstitial_webview_quiet.rollup.js'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit.py", line 28, in <module> sys.exit(grit.grit_runner.Main(sys.argv[1:])) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\grit_runner.py", line 313, in Main return toolobject.Run(options, args[1:]) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\tool\build.py", line 272, in Run self.Process() ~~~~~~~~~~~~^^ File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\tool\build.py", line 407, in Process self.ProcessNode(self.res, output, tmpfile) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\tool\build.py", line 331, in ProcessNode formatted = formatter(node, output_node.GetLanguage(), output_dir=base_dir) File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\format\data_pack.py", line 87, in Format value = node.GetDataPackValue(lang, util.BINARY) File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\node\include.py", line 105, in GetDataPackValue data = self._GetFlattenedData(allow_external_script=allow_external_script) File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\node\include.py", line 38, in _GetFlattenedData grit.format.html_inline.InlineToString(filename, self, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ preprocess_only=preprocess_only, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ allow_external_script=allow_external_script)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ws\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\tools\grit\grit\format\html_inline.py", line 606, in InlineToString raise Exception("Failed to open %s while trying to flatten %s. (%s)" % (e.filename, input_filename, e.strerror)) Exception: Failed to open ..\..\..\..\..\..\hmi.qt6-build\qtwebengine\src\core\RelWithDebInfo\AMD64\gen\components\security_interstitials\core\browser\resources\interstitial_webview_quiet\interstitial_webview_quiet.rollup.js while trying to flatten ..\..\..\..\..\..\hmi.qt6-play\src\qtwebengine\src\3rdparty\chromium\components\security_interstitials\core\browser\resources\interstitial_webview_quiet.html. (No such file or directory) [26123/27399] CXX obj/content/renderer/renderer/renderer_jumbo_6.obj ninja: build stopped: subcommand failed.[5922/12342] Automatic QML type registration for target PositioningQuick Warning: private/qpositioningquickmodule_p.h:43: QGeoAddress is declared as foreign type, but cannot be found. Warning: private/qpositioningquickmodule_p.h:88: QGeoLocation is declared as foreign type, but cannot be found. Warning: private/qpositioningquickmodule_p.h:114: QGeoPositionInfo is declared as foreign type, but cannot be found. [7437/12342] Building CXX object qt3d\src\quick3d\quick3drender\CMakeFiles\3DQuickRender.dir\items\quick3dshaderdata.cpp.obj D:\ws\hmi.qt6-play\src\qt3d\src\quick3d\quick3drender\items\quick3dshaderdata.cpp(38): warning C4996: 'QJSValue::isVariant': This might return unexpected results; consult documentation for more information [8002/12342] Automatic MOC for target QuickControls2MaterialStyleImpl AutoMoc: D:/ws/hmi.qt6-play/src/qtdeclarative/src/quickcontrols/material/impl/qquickmaterialplaceholdertext_p.h(40:1): warning: Property declaration leftPadding has neither an associated QProperty<> member, nor a READ accessor function nor an associated MEMBER variable. The property will be invalid. D:/ws/hmi.qt6-play/src/qtdeclarative/src/quickcontrols/material/impl/qquickmaterialplaceholdertext_p.h(41:1): warning: Property declaration floatingLeftPadding has neither an associated QProperty<> member, nor a READ accessor function nor an associated MEMBER variable. The property will be invalid. [9092/12342] Automatic MOC for target Graphs AutoMoc: D:/ws/hmi.qt6-play/src/qtgraphs/src/graphs2d/qabstractseries_p.h: note: No relevant classes found. No output generated. [11310/12342] Building CXX object qtopcua\src\plugins\opcua\open62541\CMakeFiles\QOpen62541Plugin.dir\__\__\__\3rdparty\open62541\open62541.c.obj cl : Command line warning D9025 : overriding '/Zc:strictStrings' with '/Zc:strictStrings-' cl : Command line warning D9025 : overriding '/permissive-' with '/permissive' [12090/12342] Linking CXX shared module qtbase\qml\QtQuick\VirtualKeyboard\Styles\Builtin\qtvkbbuiltinstylesplugin.dll FAILED: qtwebengine/src/core/RelWithDebInfo/AMD64/QtWebEngineCore.stamp qtwebengine/src/core/RelWithDebInfo/AMD64/obj/tools/v8_context_snapshot/v8_context_snapshot.stamp qtwebengine/src/core/RelWithDebInfo/AMD64/QtWebEngineCore D:/ws/hmi.qt6-build/qtwebengine/src/core/RelWithDebInfo/AMD64/QtWebEngineCore.stamp D:/ws/hmi.qt6-build/qtwebengine/src/core/RelWithDebInfo/AMD64/obj/tools/v8_context_snapshot/v8_context_snapshot.stamp D:/ws/hmi.qt6-build/qtwebengine/src/core/RelWithDebInfo/AMD64/QtWebEngineCore C:\WINDOWS\system32\cmd.exe /C "cd /D D:\ws\hmi.qt6-build\qtwebengine\src\core && "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.exe" -C D:/ws/hmi.qt6-build/qtwebengine/src/core/RelWithDebInfo/AMD64 QtWebEngineCore" ninja: build stopped: subcommand failed.D:\ws\hmi.qt6-build>