Skip to content

[binarycaching] linux copy_file is restricted to 2GiB #21557

@Osyotr

Description

@Osyotr

Describe the bug
I'm building qt5-webkit for x64-linux-dynamic. The build is successful and vcpkg kindly creates binary cache for it. However, when I restore the library from cache, one file gets corrupted (truncated from 2.7gb to exactly 2gb, see screenshot). If I manually unpack the archive (e.g. unzip -qq /home/osyotr/.cache/vcpkg/archives/7b/7bc45507c4cc57f59860de97c1c38bdce12b35a07d5ecc3c8136b4ad44f6af75.zip -d/mnt/d/my_project/vcpkg_installed/x64-linux or just drag'n'drop from 7zip), the file doesn't get corrupted.
I suspect the real problem is not in unpacking, but in transferring files between packages/ dir and vcpkg_installed/ dir.
I also suspect that this is a regression because I was able to link against the library before updating ~2 months old vcpkg instance.
Maybe microsoft/vcpkg-tool#205? @BillyONeal

Environment

  • OS: WSL2 Debian

To Reproduce

  1. Install WSL2 on C:/ (this is default)
  2. Put vcpkg.json on D:/
  3. From inside WSL run ./vcpkg install qt5-webkit --overlay-ports=vcpkg_overlay_ports --overlay-triplets=vcpkg_overlay_triplets --debug
  4. After successful build remove ~/vcpkg/packages/ and vcpkg_installed folders.
  5. Repeat the command from 3.
  6. Compare sizes of vcpkg_installed/lib/libQt5WebKit.so.5.212.0
    I've attached overlay ports and triplets I used to build the library, as well as vcpkg.json and vcpkg-configuration.json.
    qt5-base overlay port and x64-linux triplets are probably not needed but I attached them anyway. (both contain rpath fixes but I think the issue can be reproduced with official x64-linux triplet).
    vcpkg_overlay_ports_triplets.zip

Failure logs
No errors reported.

Additional context
image

Metadata

Metadata

Labels

category:vcpkg-bugThe issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)requires:tool-releaseAn issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions