microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.81k stars 6.3k forks source link

[qtwebengine] Build error on x64-windows #40596

Open zhouniandi opened 3 weeks ago

zhouniandi commented 3 weeks ago

Package: qtwebengine[core,default-features,geolocation,spellchecker,webchannel]:x64-windows@6.7.2

Host Environment

To Reproduce

vcpkg install qt

Failure logs

-- Setting up python virtual environment...
-- Installing python packages: html5lib
-- Setting up python virtual environment... finished.
CMake Warning at ports/qtwebengine/portfile.cmake:86 (message):
  Buildtree path 'F:/vcpkg/buildtrees/qtwebengine' is too long.

  Consider passing --x-buildtrees-root=<shortpath> to vcpkg!

  Trying to use 'F:/vcpkg/buildtrees/qtwebengine/../tmp'
Call Stack (most recent call first):
  scripts/ports.cmake:192 (include)

CMake Error at ports/qtwebengine/portfile.cmake:91 (message):
  Buildtree path is too long.  Build will fail! Pass
  --x-buildtrees-root=<shortpath> to vcpkg!
Call Stack (most recent call first):
  scripts/ports.cmake:192 (include)
greenozon commented 3 weeks ago

it sounds weird but it is reality :)

from qtwebengine portfile.cmake:

# We know that C:/buildrees/${PORT} is to long to build Release. Debug works however. Means 24 length is too much but 23 might work.
if(buildtree_length GREATER 22 AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "arm64")
    message(WARNING "Buildtree path '${CURRENT_BUILDTREES_DIR}' is too long.\nConsider passing --x-buildtrees-root=<shortpath> to vcpkg!\nTrying to use '${CURRENT_BUILDTREES_DIR}/../tmp'")
    set(CURRENT_BUILDTREES_DIR "${CURRENT_BUILDTREES_DIR}/../tmp") # activly avoid long path issues in CI. -> Means CI will not return logs
    cmake_path(NORMAL_PATH CURRENT_BUILDTREES_DIR)

so as you see it does not like paths longer then 22 symbols :) and only Windows

greenozon commented 3 weeks ago

There are a couple of similar cases though the issues..... eg: https://github.com/microsoft/vcpkg/issues/39351

you could read and make some tactics how to solve this strange case