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

vcpkg silently ignores overlay-ports #43132

Closed
Nullarity opened this issue Jan 6, 2025 · 2 comments
Closed

vcpkg silently ignores overlay-ports #43132

Nullarity opened this issue Jan 6, 2025 · 2 comments

Comments

@Nullarity
Copy link

The following command is not using my custom port:

vcpkg install protobuf --overlay-ports=/home/dmitry/customports --debug

vcpkg output:

dmitry@reshitko:~/vcpkg$ ./vcpkg install protobuf --overlay-ports=/home/dmitry/customports --debug
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Trying to load bundleconfig from /home/dmitry/vcpkg/vcpkg-bundle.json
[DEBUG] Failed to open: /home/dmitry/vcpkg/vcpkg-bundle.json
[DEBUG] Bundle config: readonly=false, usegitregistry=false, embeddedsha=nullopt, deployment=Git, vsversion=nullopt
[DEBUG] Metrics enabled.
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Feature flag 'dependencygraph' unset
[DEBUG] Using scripts-root: /home/dmitry/vcpkg/scripts
[DEBUG] Using builtin-ports: /home/dmitry/vcpkg/ports
[DEBUG] Using installed-root: /home/dmitry/vcpkg/installed
[DEBUG] Using buildtrees-root: /home/dmitry/vcpkg/buildtrees
[DEBUG] Using packages-root: /home/dmitry/vcpkg/packages
[DEBUG] Using vcpkg-root: /home/dmitry/vcpkg
[DEBUG] Using builtin-registry: /home/dmitry/vcpkg/versions
[DEBUG] Using downloads-root: /home/dmitry/vcpkg/downloads
[DEBUG] External asset downloads are allowed (x-block-origin is disabled)...
[DEBUG] Asset cache is not configured.
[DEBUG] Using overlay: /home/dmitry/customports
Computing installation plan...
[DEBUG] Found path: /home/dmitry/.local/bin/cmake
[DEBUG] Found path: /usr/bin/cmake
[DEBUG] Found path: /bin/cmake
[DEBUG] 1000: execute_process(/home/dmitry/.local/bin/cmake --version)
[DEBUG] 1000: cmd_execute_and_stream_data() returned 0 after    29026 us
[DEBUG] 1001: execute_process(/usr/bin/cmake --version)
[DEBUG] 1001: cmd_execute_and_stream_data() returned 0 after     1828 us
[DEBUG] 1002: execute_process(/usr/bin/cmake -DVCPKG_ROOT_DIR=/home/dmitry/vcpkg -DPACKAGES_DIR=/home/dmitry/vcpkg/packages -DBUILDTREES_DIR=/home/dmitry/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=/home/dmitry/vcpkg/installed -DDOWNLOADS=/home/dmitry/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P /home/dmitry/vcpkg/buildtrees/0.vcpkg_tags.cmake)
[DEBUG] 1002: cmd_execute_and_stream_data() returned 0 after     1997 us
The following packages will be built and installed:
    protobuf:[email protected]
...

Whereas:

> tree /home/dmitry/customports

/home/dmitry/customports
└── ports
    └── protobuf
        ├── portfile.cmake
        └── vcpkg.json

> cat /home/dmitry/customports/ports/protobuf/portfile.cmake

message(STATUS "Using custom overlay port for protobuf")

# Just for test
find_package(Protobuf REQUIRED)
if(NOT Protobuf_FOUND)
    message(FATAL_ERROR "Custom installed protobuf not found!")
endif()

> cat /home/dmitry/customports/ports/protobuf/vcpkg.json

{
  "name": "protobuf",
  "version": "30.0",
  "description": "My Protobuf",
  "platform": "linux & x64"
}

Environment

  • OS: Linux (Ubuntu)
  • Compiler: gcc 11.4

Expected behavior
I expected the command to use my custom port or at least provide an indication (in debug mode) of why the custom port was omitted.

@Osyotr
Copy link
Contributor

Osyotr commented Jan 6, 2025

It is your responsibility to make sure that overlay-ports dir contains your ports.
You should use /home/dmitry/customports/ports or get rid of ports subdir.

@Nullarity
Copy link
Author

@Osyotr Got it, thank you.

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