microsoft / microsoft/vcpkg

vcpkg install installs symlinks incorrectly

Open
#19,087 2 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

category:vcpkg-bug
Dominant language
CMake
Stars
27.5k
Forks
7.7k
Avg merge
2d 19h
Merged PRs (30d)
321

Description

See the place where we copy symlinks on install:

https://github.com/microsoft/vcpkg-tool/blob/f6c8e328d9fd32be36d27e1c3036ef1ec1521148/src/vcpkg/install.cpp#L134-L150

We use std::copy_symlink. However, it is likely that the symlink points into the packages tree, meaning that a correct copy would need to retarget the symlink to point to its new relative location.

Most binary cache sources can't handle symlinks anyway, because we normally use zip files.

I'm not sure what the right behavior is; we probably should drop symlink handling here altogether.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.