-
Notifications
You must be signed in to change notification settings - Fork 128
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
Documentation: Install protobuf with vcpkg #755
Comments
Oh yes, pinning a version in vcpkg seems to be a bigger task than one would expect. I would also vote for a hint. |
At least I now found out how to build protobuf in the version I want it to be. You need a json file called vcpkg.json with the following content: {
"dependencies": [
"protobuf"
],
"overrides": [
{
"name": "protobuf",
"version": "3.21.12"
}
],
"builtin-baseline": "53bef8994c541b6561884a8395ea35715ece75db"
} and then run vcpkg with of cause, the triplet from the OSI build instructions is needed and called here and additionally the version-option that let's it |
However it creates a folder called vcpkg_installed that does not help me with building OSI, @jdsika do you know how to proceed then? |
Where is this coming from? :D I mean I would give an individual installation path (the same that protobuffer docs recommend) and add the bin folder to PATH? |
The baseline here is the latest release of vcpkg / its commit number. |
Ok so let's give it a try and then add these steps to the build instructions, if it does the trick, right? |
Probably also #569 ? |
It seems unclear to me that we even want to venture into this whole topic: The vcpkg instructions are there so that you easily can get any version of protobuf installed and then try out OSI etc. In that case you never want to pin anything, so why bother with all of this complexity? When you want to pin something you are setting up a project, and hence maintaining dependencies, etc. If - and that's a big if - you want to use vcpkg in that case, you should be using its manifest mode, and there is lots of documentation in doing this, so no OSI specifics. And there are tons of other ways of handling dependencies, including building your own version from git, as we are doing in our workflows, or treating protobuf as a submodule, or ... I fail to see why providing guidance on how to manage C++ project development on Windows falls within our tasks... We also do not provide any pinning and setup information for Linux that goes beyond maybe use apt to install protobuf, which usually is not the way you would handle project development, but works for trying out OSI. Same as using vcpkg on Windows. |
:) I call you for that Pierre. But @PhRosenberger thanks for finding related issues and yes they are related but not the same but obviously tell a story of more people being interested in this topic |
Only Linux mentions a minimum requirement of proto 3.0.0: |
@pmai IMHO we should give a hint how to install OSI with vcpkg, as with the instructions for Linux.
{
"dependencies": [
"protobuf"
],
"overrides": [
{
"name": "protobuf",
"version": "<version>"
}
],
"builtin-baseline": "<vcpkg-commit-no>"
}
set PROTOC=<path-to-protobuf>\vcpkg_installed\x64-windows-static-md\tools\protobuf\protoc.exe
python setup.by build
Can you please try and comment and then I volunteer for making a PR:-) |
@PhRosenberger In general yes, I think we should give a hint. Specifically the point 5. could be painful if you sync with Clemens if we consider the different protobuffer versions.
Keep information minimal, correct and sufficient for the task. "get it running with a consistent version of protobuffer with a project like e.g. osi-validation that uses osi as a submodule" |
I guess, we can close this now, as we have #800, right? |
I tried to follow the Windows instructions using vcpkg: https://opensimulationinterface.github.io/osi-antora-generator/asamosi/latest/interface/setup/installing_prerequisites.html#_windows
Trying to figure out how to pin the protobuf version using vcpkg is kind of a joke if you read this. Maybe we can place a hint in the documentation?
The text was updated successfully, but these errors were encountered: