microsoft / vcpkg

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

[librdkafka] How to rebuild it #39039

Open vipcxj opened 3 months ago

vipcxj commented 3 months ago

Is your feature request related to a problem? Please describe.

To build librdkafka with sasl support, I need to install libsasl2-dev in the host machine before vcpkg building it. I didn't realize it until my program ran and threw an exception. Because no port feature named sasl. Since the port is built, I need to rebuild it without any changes that VCPKG can perceive.Because of the cache, I can't do this.I tried vcpkg --help, and I didn't see the relevant commands. I also found that there was a lot of cache under ~/.cache/vcpkg. But the composition of these cache is not what humans can understand. So I have to delete the entire folder, which causes all my PORT to be rebuilt

Proposed solution

add a command to rebuild special port, or just remove the cache of it

Describe alternatives you've considered

No response

Additional context

No response

dg0yt commented 3 months ago

Doesn't vcpkg print which cached artifact file it uses? You could delete just that file.

vipcxj commented 3 months ago

No, vcpkg print a dir relate to cache, I ls to it and found it just the port dir which include portfile.cmake, not binary. I delete it, nothing happen.

  • You can control how the cache is used when installing.

  • --editable disables caching, too.

I need cache, I just don't need the cache relate to special port.