Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path too long #32684

Closed
wjiangsheng opened this issue Jul 21, 2023 · 14 comments
Closed

path too long #32684

wjiangsheng opened this issue Jul 21, 2023 · 14 comments
Assignees
Labels
category:question This issue is a question

Comments

@wjiangsheng
Copy link

Describe the bug

Environment

  • Windows

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install qt
  2. See error:
    Installing 1/4 qtwebengine:x64-windows...
    Building qtwebengine[core,default-features,geolocation,spellchecker,webchannel]:x64-windows...
    -- Setting up python virtual environmnent...
    -- Installing python packages: html5lib
    -- Setting up python virtual environmnent...finished.
    CMake Warning at ports/qtwebengine/portfile.cmake:83 (message):
    Buildtree path 'C:/src/vcpkg/buildtrees/qtwebengine' is too long.

Consider passing --x-buildtrees-root= to vcpkg!

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

CMake Error at ports/qtwebengine/portfile.cmake:88 (message):
Buildtree path is too long. Build will fail! Pass
--x-buildtrees-root= to vcpkg!
Call Stack (most recent call first):
scripts/ports.cmake:147 (include)

error: building qtwebengine:x64-windows failed with: BUILD_FAILED
Elapsed time to handle qtwebengine:x64-windows: 3.7 s
Please ensure you're using the latest port files with git pull and vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+qtwebengine
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[qtwebengine]+Build+error&body=Copy+issue+body+from+C%3A%2Fsrc%2Fvcpkg%2Finst

@JonLiu1993
Copy link
Member

@wjiangsheng, Does this issue still persist when you use a shorter vcpkg path? For example: use C:\vcpkg instead of C:\src\vcpkg

@JonLiu1993 JonLiu1993 added the category:question This issue is a question label Jul 21, 2023
@wjiangsheng
Copy link
Author

,当您使用较短的 vcpkg 路径时,此问题是否仍然存在?例如:使用代替C:\vcpkg``C:\src\vcpkg

Sure, no problem anymore.

@bzisl
Copy link

bzisl commented Jul 23, 2023

I have the same problem, but moving vcpkg to c:\ doesn't solve it

@JonLiu1993
Copy link
Member

I have the same problem, but moving vcpkg to c:\ doesn't solve it

Please provide your error log.

@SchaichAlonso
Copy link
Contributor

SchaichAlonso commented Jul 27, 2023

git clone https://github.com/microsoft/vcpkg c:/x
cd c:/x
./bootstrap-vcpkg.bat
./vcpkg install qtwebengine

should do the trick. Though if you use manifest mode, you might want to pass --debug to vcpkg install, and -DVCPKG_VERBOSE=ON -DVCPKG_INSTALL_OPTIONS="--debug" to the consuming project and make sure the compilation settings, especially the powershell and cmake versions, are identical, so the binarycache artifact generated by vcpkg install will be reusable by the manifest mode project.

You can also attempt enabling long path support on your system and then removing the line aborting the build from the the vcpkg port and giving it a try. When I tried it the last time it failed though as something in the build toolchain failed to generate / extract a file properly even if the filesystem would have supported it.

@JonLiu1993
Copy link
Member

@wjiansheng, does this problem still exist?

@bzisl
Copy link

bzisl commented Aug 9, 2023

Still exists. I'm downloading latest version every day, and it is exists. When I remove the long path check to follow the compilation, it fails also. It is weird, because it is supposed that QT is compiling their code in a similar way, isn't it?

@dg0yt
Copy link
Contributor

dg0yt commented Aug 9, 2023

From the initial message:

Consider passing --x-buildtrees-root= to vcpkg!

Did anyone try that proposal...

@JonLiu1993
Copy link
Member

@wjiangsheng, could you please try @dg0yt's suggesstion?

@JonLiu1993
Copy link
Member

Ping @wjiangsheng for response.

@JonLiu1993
Copy link
Member

We hope your question was answered to your satisfaction; if it wasn't, you can reopen with more info.

@JonLiu1993 JonLiu1993 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2023
@xahon
Copy link
Contributor

xahon commented Aug 3, 2024

Buildtree path 'E:/vc/buildtrees/qtwebengine' is too long.

@xahon
Copy link
Contributor

xahon commented Aug 3, 2024

What kind of issue does this warning warns of? Some CI can't handle paths more than 22 characters long seems like a problem with this CI itself rather than a problem for a lot of users to bother with renaming/moving vcpkg installation, updating environment variables and removing vcpkg/downloads folder (because it caches scripts with old vcpkg path). For me, it seems like a local issue being resolved with a hack in product core that affects a lot of users and makes a bad feeling about vcpkg product in general. Keeping in mind that this limitation exists is not good, I probably will forgot how to install a package in half a year if won't use vcpkg on daily basis

Necessity of using bare vcpkg install with some kind of argument --x-buildtrees-root ruins experience with vcpkg because it prevents from using vcpkg transparently, i.e. you can't just create a manifest, define needed packages and setup a toolchain file for CMake, every new package requires bothering with vcpkg install --x-buildtrees-root="super-short-weird-path". It's not good at all in terms of UX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

7 participants
@SchaichAlonso @dg0yt @xahon @bzisl @JonLiu1993 @wjiangsheng and others