Closed 3UR closed 2 weeks ago
Is there any way to resolve this? I would rather not change my directories I assume there is some way to disable the length limit
I have tried registry (Yes I did restart, and I sadly still am getting this issue)
@3UR The check exists because there is no other simple way.
@3UR The check exists because there is no other simple way.
Would there be any way around it if I have LongPathsEnabled
enabled in registry?
The installation path of vcpkg is too long. You can create a new vcpkg directory in the drive root directory, and then clone the code for compilation.
Or build with specify the option, for example, vcpkg install qt-webengine --x-buildtrees-root C:\v\bld
If attempting long path support, see https://github.com/microsoft/vcpkg/issues/32684#issuecomment-1653641584
Would there be any way around it if I have
LongPathsEnabled
enabled in registry?
Well, you "only" have to make all tools capable of using long paths.
Or build with specify the option, for example,
vcpkg install qt-webengine --x-buildtrees-root C:\v\bld
This issue is about qt5-webengine
(Qt 5).
qt-webengine
(Qt 6) might or might not benefit from the update of ninja
, #39260.
But all webengine ports are non-trivial and troublesome.
I manually went and edited the portfile.cmake
and everything seems fine now
Would any issues really happen now though as LongPathsEnabled
is True? I assume everything should be able to handle long paths fine now
if(buildtrees_path_length GREATER 35 AND CMAKE_HOST_WIN32)
execute_process(
COMMAND powershell -Command "Get-ItemPropertyValue -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\FileSystem' -Name 'LongPathsEnabled'"
OUTPUT_VARIABLE LONG_PATHS_ENABLED
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (LONG_PATHS_ENABLED STREQUAL "0")
vcpkg_buildpath_length_warning(35)
message(WARNING "The ${PORT} source was will be extracted to ${CURRENT_BUILDTREES_DIR} , which has more then 35 characters in length.")
message(FATAL_ERROR "terminating due to ${CURRENT_BUILDTREES_DIR} being too long.")
endif()
endif()
If the build succeeds, then it should be good. (When the build fails, it isn't obvious from the "file not found" errors that path length is the trigger.)
Ok I see now there is more to then just having LongPathsEnabled
I guess I will have to change the directory for vcpkg
How would I do so? @WangWeiLin-MV @dg0yt I installed vcpkg through Visual Studio 2022 using vcpkg integrate install
in the developer powershell
I have been considering maybe I will just use CEF or something instead of WebEngine because I currently am upgrading to QT 5 and I don't want to use QT Webkit anymore and it seems WebEngine is a pain
@3UR In manifest mode, just try vcpkg install --x-buildtrees-root C:\v\bld
with the C:\v\bld
is any short path.
Thanks!
@WangWeiLin-MV Another question, do you know if I can also change the directory where Vcpkg downloads stuff (C:/Users/User/AppData/Local/vcpkg/downloads
) or can I clear the files in this directory safely?
Sorry for lots of questions still new to using Vcpkg 😅
change the directory where Vcpkg downloads
Yes. By command line option --downloads-root=\<path> or environment variable VCPKG_DOWNLOADS
or can I clear the files in this directory safely?
Yes. The vcpkg/download
directory is just a local cache of downloaded files. And the vcpkg/download/tools
directory may have some decompression tools. After deleting these, vcpkg will re-extract these when any port needed.
I'm thrilled I could assist you.
change the directory where Vcpkg downloads
Yes. By command line option --downloads-root=
or environment variable VCPKG_DOWNLOADS or can I clear the files in this directory safely?
Yes. The
vcpkg/download
directory is just a local cache of downloaded files. And thevcpkg/download/tools
directory may have some decompression tools. After deleting these, vcpkg will re-extract these when any port needed.I'm thrilled I could assist you.
Okay thanks I will close this now as it solved my issue :)
@3UR In manifest mode, just try
vcpkg install --x-buildtrees-root C:\v\bld
with theC:\v\bld
is any short path.
With build system integration, don't call vcpkg install
at the command line. It won't know the build system's binary dir and target.
Use VCPKG_INSTALL_OPTIONS
with CMake integration:
https://learn.microsoft.com/en-us/vcpkg/users/buildsystems/cmake-integration#vcpkg_install_options
Use VcpkgAdditionalInstallOptions
with msbuild integration:
https://learn.microsoft.com/en-us/vcpkg/users/buildsystems/msbuild-integration#vcpkg-additional-install-options
Package: qt5-webengine:x86-windows@5.15.13#3
Host Environment
To Reproduce
vcpkg install
Failure logs
Additional context
vcpkg.json
``` { "dependencies": [ "qt5", "qt5-webengine" ] } ```