Coder Social home page Coder Social logo

Comments (9)

dg0yt avatar dg0yt commented on June 21, 2024 2

The Gitlab CI pipeline runs under the system profile

I consider this broken, but you will find more tickets.

from vcpkg.

ypogribnyi avatar ypogribnyi commented on June 21, 2024 2

Registries cache location can be changed through X_VCPKG_REGISTRIES_CACHE environment variable, just set it to the absolute path of your directory. This var is not documented, I'm not sure why.

You might also want to set VCPKG_DOWNLOADS, X_VCPKG_ASSET_SOURCES and VCPKG_DEFAULT_BINARY_CACHE to make sure vcpkg doesn't use the %LocalAppData% directory.

from vcpkg.

Osyotr avatar Osyotr commented on June 21, 2024

Directory does not exist: C:/Windows/System32/config/systemprofile/AppData/Local/vcpkg/registries/git-trees/88a7058fc7fa73a9c4c99cfcae9d79e2abf87a5a

This is not local binary cache. This is registry cache.
The probable reason it works for you in classic mode but not in manifest mode is because former uses built-in registry and latter uses git registry (set in your manifest).

from vcpkg.

rashton-snl avatar rashton-snl commented on June 21, 2024

Thank you for your help, @Osyotr. As I suspected, it was a misunderstanding on my part. Is there a way to change the default registry cache location?

from vcpkg.

Thomas1664 avatar Thomas1664 commented on June 21, 2024

The directory does exist, but vcpkg cannot build the port due to permission restrictions.

Which directory does exist?

C:\Users\%USERNAME%\AppData\Local\vcpkg\registries\git-trees\88a7058fc7fa73a9c4c99cfcae9d79e2abf87a5a or C:/Windows/System32/config/systemprofile/AppData/Local/vcpkg/registries/git-trees/88a7058fc7fa73a9c4c99cfcae9d79e2abf87a5a?

The later one seems very unusual to me and I highly doubt that vcpkg was able to put something in a subdirectory of System32.

from vcpkg.

rashton-snl avatar rashton-snl commented on June 21, 2024

Surprisingly, the latter path does exist. The Gitlab CI pipeline runs under the system profile, and so %LOCALAPPDATA% expands to C:\Windows\System32\config\systemprofile\AppData\Local. Somehow, vcpkg is able to create that registry cache, but then it cannot access that cache when building the port.

The first path you list comes from my local tests outside of the CI pipeline (replace %USERNAME% with actual username) where I was trying to figure out a way to point vcpkg away from %LOCALAPPDATA%.

from vcpkg.

rashton-snl avatar rashton-snl commented on June 21, 2024

The Gitlab CI pipeline runs under the system profile

I consider this broken, but you will find more tickets.

Yeah, it's really not great how Gitlab runs pipelines under the system profile. I found several similar issues, but they all point to binary caching issues, which is what led me down that path. As Osyotr pointed out, though, this seems to be a registry cache issue. Ideally, vcpkg would provide some way for me to change the registry cache location, but I can't find any documentation to support that route.

from vcpkg.

rashton-snl avatar rashton-snl commented on June 21, 2024

As a workaround, I temporarily point $Env:LOCALAPPDATA to a location with read/write permissions in my CI script. It's not pretty, but it does work.

Inspired by #12285

from vcpkg.

rashton-snl avatar rashton-snl commented on June 21, 2024

Registries cache location can be changed through X_VCPKG_REGISTRIES_CACHE environment variable, just set it to the absolute path of your directory. This var is not documented, I'm not sure why.

Thank you, @ypogribnyi, that worked!

from vcpkg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.