Skip to content
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

Specific Boost version for transitive dependencies #283

Open
ipiqueras opened this issue Mar 4, 2024 · 1 comment
Open

Specific Boost version for transitive dependencies #283

ipiqueras opened this issue Mar 4, 2024 · 1 comment

Comments

@ipiqueras
Copy link

Type of issue

Missing information

Description

I'm reading how to install a specific version for Boost libraries and, it works fine.

What is not described is how to consume a port, in a private registry, that depends on a specific version of Boost. Say that you have a port foo that depends on some old Boost 1.76.0.

So far I have tried using vcpkg-configuration property in ports/foo/portfile.cmake and, setting a baseline there:

{
  "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
  "name": "foo",
  "version": "1.0.0",
  "port-version": 0,
  "supports": "!(windows) & (arm32 | arm64 | x64 | x86)",
  "dependencies": [
      {"name": "boost-filesystem", "platform": "native"}
  ],
  "vcpkg-configuration": {
    "registries": [
      {
        "kind": "git",
        "repository": "https://github.com/Microsoft/vcpkg",
        "baseline": "761c81d43335a5d5ccc2ec8ad90bd7e2cbba734e",
        "packages": [ "boost*", "boost-*"]
      }
    ]
  }
}

In the consuming project (let's call it bar):

> vcpkg install --overlay-ports=/path/to/ports/foo
Fetching registry information from https://github.com/microsoft/vcpkg (HEAD)...

The "Fetching registry information from" is only printed once and, uses the baseline configured for the registry in bar , which brings newer Boost versions.

I also tried a combination of vcpkg-configuration and overrides, without success.

Page URL

https://learn.microsoft.com/en-us/vcpkg/consume/boost-versions

Content source URL

https://github.com/Microsoft/vcpkg-docs/blob/main/vcpkg/consume/boost-versions.md

Document Version Independent Id

efdb8438-0860-24e8-c015-44fda7053a6a

Article author

@vicroms

Metadata

  • ID: efdb8438-0860-24e8-c015-44fda7053a6a
  • Service: vcpkg
@vicroms
Copy link
Member

vicroms commented Mar 9, 2024

@ipiqueras let me know if I understood correctly.

  • You have a port named foo that has a vcpkg-configuration object in its vcpkg.json file.
  • You have a project named bar that adds a dependency on foo.

If that's the case, then the vcpkg-configuration on foo is ignored and that is by design.

vcpkg only reads configuration from the top-level manifest (vpckg.json). You have to add the old-Boost baseline registry in a vcpkg-configuration.json file in your project's (bar's) directory or set the registries in bar's vcpkg-configuration object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants