-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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-tool] vcpkg install <pkg>
gives wrong usage information
#20190
Comments
The
Generally, given a |
In addition, |
I see this as a general vcpkg bug now. Usage information must be reviewed and verified, or omitted. |
vcpkg install libiconv
gives wrong usage informationvcpkg install <pkg>
gives wrong usage information
Is there sufficient evidence now to request a response from the vcpkg team? |
This is fair enough; I'll bring it up in the new year at the PR meeting. |
The Drogon config clearly provides target |
This is a friendly reminder. Actually I'm increasingly unhappy with how this vcpkg feature promotes bad practice. |
Added |
Added |
Added Do I need to make a PR which disables the tool feature? |
Added Ping @vicroms @strega-nil-ms. |
|
LOL while working on #24720:
(Libs went to Where is the |
The tool also creates invalid suggestions by copying things literally, e.g. |
I stumbled upon this problem recently with ports Simbody, Blas, Lapack, and header-only Boost libraries. Just to clarify @strega-nil-ms since I couldn't find a guideline on the topic:
Listing all the targets provided by a port in the usage file would be best to me, unless there is an easy way to list the installed targets provided by the port. I remember getting quite a few times |
Yes.
Look at a similar port, or start with the tool's ouput. But use your brain, and upstream documentation.
Quite often, there are only a few relevant targets, and the others are used implicitly. |
Hello @dg0yt. In regard to the azure-iot-sdk-c, what exactly are you referring to? An explicit example in the code base would be helpful. |
@JoseSanchez7 Without looking at the current state:
vcpkg detects many targets and print some 4 of them. This is not a good path to indicate usage. In general,
The proper fix is to add a |
Hello @dg0yt, our team (Azure C SDK) spoke yesterday morning about your request regarding changes to how our cmake works with vcpkg and decided that it's not something we will be changing at this moment. |
@JoseSanchez7 I didn't want to indicate a need for changes to "how your cmake works". I see a need to better document downstream CMake usage. The heuristics in vcpkg tool is very limited. It is unlikely that a random pick of 4 targets out of 10 is what the users needs. |
@BillyONeal Not sure if it was case the before the last tool release, but now the heuristics picks misleading information (
|
@BillyONeal Ignore my last comment. I bootstrapped on the old version. The new version no longer outputs misleading information for tiff. |
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment. |
Stay active |
Bad User Experience
The auto-generated usage information is wrong for many non-trivial ports.
Earlier reports
Known problem ports
azure-iot-sdk-c
(lists 4 out of 10 targets in one line, too much)grpc
(references amodules
target, Install grpc error : Could not find a package configuration file provided by "modules" #17177)hdf5
(listing all targets, which is too much)iir1
(config in wrong dir, [iir1] find_package failed #23940)itk
(promoting bad practice, see below, include ITK #22641)jsoncpp
(3 targets in one line, [vcpkg-tool]vcpkg install <pkg>
gives wrong usage information #20190 (comment))libpng
(reporting different targets for static vs. dynamic instead of CMake Find module, [libpng] Add file usage.txt to describe the usage of port libpng #23379)openimageio
(references aModule
target, [openimageio] OpenImageIO Cmake rules are broken and the package is unusable #21234)openxr-loader
(config in wrong dir, [openxr-loader] Fix package name and enable arm #23928)qhull
(listing all targets, which is too much)qt5-base
(listing targets which are private implementation details, and duplicate targets, cf. [qt5-base] build failure #14907 (comment))realsense2
(lists four targets, [vcpkg-tool]vcpkg install <pkg>
gives wrong usage information #20190 (comment))shapelib
(no config file to match the proposed package name, [shapelib] Unable to find shp-config.cmake when including in build #16041, [vcpkg-tool]vcpkg install <pkg>
gives wrong usage information #20190 (comment))Patched by usage file
arrow
(references anarrow_bundled_dependencies
library which doesn't exist in absence of vendored dependencies, Arrow link error after installing on Ubuntu #20459)c-ares
(listsc-ares::cares c-ares::cares_shared c-ares::cares_static
)drogon
(picks targets from conditionalfind_dependency
helpers, [vcpkg-tool]vcpkg install <pkg>
gives wrong usage information #20190 (comment))libiconv
(see below, from [osg] build failure #14994; [iconv] How to use with vcpkg?vcpkg install iconv
then "Could not find a package configuration file" #22539)mailio
(reports acmake
package, [mailio] hint message after installing mailio is incorrect #23798)vtk
(original output cf. [VTK] CMake usage printed by vcpkg is wrong #19035)Other resolved
effolkronium-random
(config in wrong dir, [effolkronium-random] Properly handle package_name #20795)sentry-native
(config in wrong dir, [sentry-native] Update to 0.4.17 #24309 (review))Misguided patching in vcpkg
libgeotiff
1.6.1 ([libgeotiff] Fix packagename via find_package #15750 diverging from upstream)Promoting Bad Practice
All targets are listed in the same
target_link_libraries
line. But normally, canonical usage is to use only a single desired target and let it pull in its transitive usage requirements.Some package do export targets not as public interface, but as an implementation detail hidden behind interface variables. By automatic reporting of targes, vcpkg distracts user from applying canonical usage, contributors from researching, documenting and testing canonical usage, and team members to base there support answers on canonical usage.
Example: User experience for libiconv
Originally posted by @ssrlive in #14994 (comment)
The text was updated successfully, but these errors were encountered: