Replies: 29 comments 64 replies
-
How can I install a specific version, for example I want to install zlib 1.2.9? How is the command? |
Beta Was this translation helpful? Give feedback.
-
I suggest reading the documentation: https://learn.microsoft.com/en-us/vcpkg/consume/lock-package-versions |
Beta Was this translation helpful? Give feedback.
-
Well, I only find there how to create packages or to use them with cmake. Actually I don't use cmake. I just install a package via |
Beta Was this translation helpful? Give feedback.
-
You will need to use our new manifest mode, which is very easy in Visual Studio! Simply add a To pin specific versions, you'll need to use overrides: {
"dependencies": [ "xyz" ],
"overrides": [
{ "name": "xyz", "version": "1.2.3.4" }
]
} |
Beta Was this translation helpful? Give feedback.
-
You can replace Visual Studio with cmake: To pin specific versions, you'll need to use overrides: {
"dependencies": [ "xyz" ],
"overrides": [
{ "name": "xyz", "version": "1.2.3.4" }
]
} Or if you don't use cmake, simply run |
Beta Was this translation helpful? Give feedback.
-
How to install a specific version in the command line? I just want to install a specific version of protobuf in vcpkg's root installed folder |
Beta Was this translation helpful? Give feedback.
-
You will need to use manifest mode or checkout vcpkg at the right version |
Beta Was this translation helpful? Give feedback.
-
But how can I checkout a specific version in vcpkg? |
Beta Was this translation helpful? Give feedback.
-
You search the commit with the specific version and then do |
Beta Was this translation helpful? Give feedback.
-
git checkout? I want to use a specific package version, e.g. OpenCV 4.5.3 ! |
Beta Was this translation helpful? Give feedback.
-
How do I know which version of vcpkg contains the package version what I want? |
Beta Was this translation helpful? Give feedback.
-
If vcpkg supports versioning in manifest mode why can't it support in the command line mode? |
Beta Was this translation helpful? Give feedback.
-
Using a JSON manifest file, although welcomed by some, is not intuitive - people expect to be able to install packages from the command line. That's how most package managers work. |
Beta Was this translation helpful? Give feedback.
-
This has to be a joke. If reading a json file is enough for it to install a specific version, the functionality is already there. |
Beta Was this translation helpful? Give feedback.
-
The command is definitely required as well as the manifest mode. For example, manifest mode works really badly in the case of a docker script: If you have lines like:
then if you change the source code at all, the dockerfile has to run all the lines including the build - which means that all the dependencies are rebuilt, every time you change the code at all, which is a nightmare during development.
but you can't do that. I've also had lots of problems with some dependencies, such as google's cloud APIs - vcpkg works by remembering the git hash of the repo at each version (why? why not the tag??) and it seems that google somehow keep changing the hashes so the vcpkg build constantly breaks. |
Beta Was this translation helpful? Give feedback.
-
vcpkg install libxxx=1.2.3 |
Beta Was this translation helpful? Give feedback.
-
Yes the documentation would be very welcome.
What we’re asking for with pinned versions is what tools like apt, anaconda and the Python package system do. Yes it has to cope with sub-dependencies and pinning and the fact that this can cause impossible situations. Otherwise it’s not a package system.
From: Alexander Neumann ***@***.***>
Sent: 27 October 2022 16:04
To: microsoft/vcpkg ***@***.***>
Cc: Whitehead, Richard ***@***.***>; Comment ***@***.***>
Subject: Re: [microsoft/vcpkg] How to install specific version? (Discussion #25622)
[External Email]
Many people have complained that this is inconvenient and stupid
There is a reason for it. Lets assume there would be a command like vcpkg install vtk=8.2. It install vtk 8.2. VTK has a lot of dependencies. Which version of the dependencies should be installed? Would you expect it to be not broken? (It will be horribly broken which updated deps). The only thing vcpkg could offer is a vcpkg install somedep --baseline=<baselineref> everything else would be too complex. That is why manifest mode is the only sane way to go
but the undocumented --x-manifest-root may be what we all needed.
https://github.com/microsoft/vcpkg/blob/master/docs/commands/common-options.md#--x-manifest-rootpath<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_microsoft_vcpkg_blob_master_docs_commands_common-2Doptions.md-23-2D-2Dx-2Dmanifest-2Drootpath&d=DwMCaQ&c=Qwsh1H-X9ypOoLLEcAIltRyC0Dw0FG3Mmyd56ahml5w&r=w6ludjNtDQpNasrV7-vv8UaUPqkFSZ8tefXB_suiJPM&m=3udVCtu7vqyU_ptzAMKuJY-K4XWCI5xVeK0-siuWNDeQoBOfFjLhKusjrE-Eq9VI&s=lnFDN3tYiay3fxsq4e1GMut1gFstHzKnCtMuq2UUJuE&e=>
Maybe vcpkg just needs some explicit docs on how to invoke manifest manually without any integration
—
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_microsoft_vcpkg_discussions_25622-23discussioncomment-2D3983073&d=DwMCaQ&c=Qwsh1H-X9ypOoLLEcAIltRyC0Dw0FG3Mmyd56ahml5w&r=w6ludjNtDQpNasrV7-vv8UaUPqkFSZ8tefXB_suiJPM&m=3udVCtu7vqyU_ptzAMKuJY-K4XWCI5xVeK0-siuWNDeQoBOfFjLhKusjrE-Eq9VI&s=ZlNr94_G2EUKcV4wv2QqGfP4LU53AOAd0vieiuZxTMo&e=>, or unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AUPE7CVQV5Q5NY6WROHSRD3WFKKWNANCNFSM52755FVQ&d=DwMCaQ&c=Qwsh1H-X9ypOoLLEcAIltRyC0Dw0FG3Mmyd56ahml5w&r=w6ludjNtDQpNasrV7-vv8UaUPqkFSZ8tefXB_suiJPM&m=3udVCtu7vqyU_ptzAMKuJY-K4XWCI5xVeK0-siuWNDeQoBOfFjLhKusjrE-Eq9VI&s=VkcfFGFrSp7NlAxYa9EsO7kZgyQ3P3kwemcVmat8XYk&e=>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
…________________________________
- CONFIDENTIAL-
This email and any files transmitted with it are confidential, and may also be legally privileged. If you are not the intended recipient, you may not review, use, copy, or distribute this message. If you receive this email in error, please notify the sender immediately by reply email and then delete this email.
|
Beta Was this translation helpful? Give feedback.
-
I'm going to have one final attempt to get through to Microsoft on this, and then give up. I've already stopped using vcpkg because of this and one other issue so I'm doing this to try to help Microsoft improve their offering.
Ok that's it. I give up now. |
Beta Was this translation helpful? Give feedback.
-
Why is it too difficult to implement. There's literally no documentations on how to do it especially if no specific project is involved. |
Beta Was this translation helpful? Give feedback.
-
I went from a c++ websocket lib that do not use any build system other than a hand written makefile to "well OK let's install vcpkg and install the lib with it to ease my building cross compiling env" to "wtf I cannot install a lib with vcpkg by command line with a specific version without writing a JSON file" to "git reset --hard && shutdown". |
Beta Was this translation helpful? Give feedback.
-
Compiling the library on my own was much easier that waiting for 6 more years. It's just too difficult for Microsoft to implement an entire new command for an existing functionality. |
Beta Was this translation helpful? Give feedback.
-
so many discussions. |
Beta Was this translation helpful? Give feedback.
-
I am not going to change my build system, and I'm definitely not going to specify a particular package manager with my build system. A package manager SHOULD NOT be integrated with the build system in C. Microsoft should develop a decent package manager that allows existing build systems to find the installed packages like on Linux, BSD and OSX. All GNU/Linux distros and BSDs have this, and OSX has homebrew and macports. I feel like Microsoft is intentionally sabotaging compatibility to coerce developers towards using their proprietary Windows-only libraries and development tools. But I'm gonna go Hanlon's razor on this one: "Never attribute to malice that which is adequately explained by stupidity." |
Beta Was this translation helpful? Give feedback.
-
I have been a Windows developer for a long time. Here is my take. vcpkg should manage all versioning on the command line. Period. I'm sure there are ramifications to how this can be implemented "under the hood", but to the developer, it should be simple to use. No external dependency should be introduced. Here is my proposal: It would be then a matter of choosing the correct libraries from the build trees. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Same problem. I have skimmed this whole conversation, googling terms, and still don't understand why manifest mode requires a builtin-baseline. Why isn't using the vcpkg.json equivalent to the vcpkg command line passing the version? Why is the builtin-baseline required in the vcpkg.json? The builtin-baseline is redundant to the the version number. If you can't find the git tag with the version number, just FAIL. In trying to set up a CI with cmake, this is very frustrating. |
Beta Was this translation helpful? Give feedback.
-
But after reading the official documentation of vcpkg, I still don't know how to obtain the baseline. For example, if I want to specify the use of zlib 1.2.11, how can I obtain this version's baseline? |
Beta Was this translation helpful? Give feedback.
-
MS documentation states this:
So it seems like the baseline simply blocks older versions from being used, but doesn't prevent new ones, meaning compatibility could still easily break if libraries changed? |
Beta Was this translation helpful? Give feedback.
-
Just to update everyone: Versioning is fully available and supports pinning specific library versions. Please open a new issue if you have further questions!
https://github.com/microsoft/vcpkg/blob/master/docs/users/versioning.md
Originally posted by @ras0219-msft in #1681 (comment)
Beta Was this translation helpful? Give feedback.
All reactions