microsoft / vcpkg

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

vcpkg install can't find the versions database file #16535

Closed tlestang closed 3 years ago

tlestang commented 3 years ago

Hi there,

I've been experimenting with setting my own vcpkg registry at sundials-vcpkg-registry, following the instructions on this blog post (Registries: Bring your own libraries to vcpkg) . Everything went relatively smoothly.

Until I can't install my project's dependencies anymore:

C:\Users\tlestang\PyBaMM>.\..\vcpkg\vcpkg install --feature-flags=registries,manifests
C:\Users\tlestang\PyBaMM
Error: Couldn't find the versions database file: C:\Users\tlestang\AppData\Local\vcpkg\registries\git-trees\fbfbdcd45148d106aa5cd9a034dd94b3de1a098a\s-\sundials.json
Note: Updating vcpkg by rerunning bootstrap-vcpkg may resolve this failure.

I must have done something wrong, but I don't have a clue what. I don't really understand what the error message it about, since the file C:\Users\tlestang\AppData\Local\vcpkg\registries\git-trees\fbfbdcd45148d106aa5cd9a034dd94b3de1a098a\s-\sundials.json does exist. I also tried to bootstrap vcpkg again, but that didn't do it.

In my project directory (PyBaMM), I have both a vcpkg-configuration.json:

{
  "registries": [
    {
      "kind": "git",
      "repository": "https://github.com/pybamm-team/sundials-vcpkg-registry.git",
      "packages": [ "sundials" ]
    }
  ]
}

and a vcpkg.json:

{
  "name": "pybamm",
  "version-string": "0.3.0",
  "dependencies": [
    {
      "name": "sundials",
      "default-features": false,
      "features": [ "klu" ]
    }
  ]
}

I think the problem first occured after I modified the portfile in the registry, commited and modified the git-tree entry in the sundials.json accordingly, setting it to the result of git rev-parse HEAD:ports/sundials. Anything I am missing or an idea of what could cause that issue?

vicroms commented 3 years ago

I made a small test with your registry, and there is a path error.

Your registry has:

versions/s-/sundials/sundials.json

But it should be:

versions/s-/sundials.json
tlestang commented 3 years ago

Thanks so much for taking the time @vicroms ! It would certainly have taken me a long time to find that problem...