-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Package installation layout for tools #17607
Comments
To add to this: Qt installs into |
Hm, Qt But more generally, it is standard to have binaries in
|
Related: #13649 |
I would really appreciate some guidance or perspective, and it seems that I'm not alone. |
@ras0219-msft |
I continued updating the findings in the initial post. I just added |
Friendly reminder... |
Three more weeks without feedback to this issue. Not to mention the previous issues. Hm. |
@dg0yt, sorry for the delay, I will talk this issue again in our tomorrow meeting. |
Sorry for the long delay; you've asked a very detailed question and the truth is that we do not currently have guidance to the level of strictness and precision implied by the question! In general, vcpkg's policies around tools are informed by the idea that vcpkg is first and foremost a C/C++ library dependency manager. We are strongly against growing into a general purpose package manager containing things like
Our general intent right now is that We do not have a wholistic solution for
Yes, with host dependencies this needs attention (though we must maintain backwards compatibility).
Generally, a need for debug variants violates the design model. If pressed, they would go in
vcpkg's build model is that only one toolchain is available at a time, so it's "not possible" for a single build to produce both. If, for some reason, a build did produce both, the package would be responsible for only deploying the requested subset (probably both if native compiling, but only the target tools if cross-compiling). |
I feel that the problem with the current situation is not fully understood.
With regard to the debug variant, I don't ask for more than having a place to install the debug variant of |
I just got affected by it: #19203
Couldn't just |
One more point on |
Maybe we should write a document about that. |
We could add a post build lint check for that |
I am not sure. We do need some config tools from the debug variant. |
So Microsoft is now promoting |
So now we could install a debug python interpreter to the same location |
Does cmake even support finding debug interpreter? It really is a bummer to have yet another tools directory :( |
We could also stop removing |
.. and at the same time to explain that "expanding the definition of where debug tools should go depends on the specific use cases and we don't know of any generic use cases at this time." |
I'd like to update #17607 (comment) given everything we've learned in the past ~3 years. In general, vcpkg's policies around tools are informed by the idea that vcpkg is first and foremost a C/C++ library dependency manager. We are strongly against growing into a general purpose package manager containing things like I feel that a lot of confusion is introduced into this discussion by lumping every executable file into the same label of "tools" and seeking a single policy decision to cover everything -- intent and restrictions unfortunately matter. I'm aware of several quite different use cases for executables, each of which may have independent deployment locations and policies.
Of the above scenarios, (1) and (2) should not be deployed via vcpkg -- we maintain that we are a very bad replacement for APT/winget/Homebrew and those system package managers should be used instead for those applications. (3), (4), (5), and (6) all have merits within the context of a C++ library dependency manager, because they all are implicated in successfully consuming C++ libraries. Further, these executables can have unfortunate restrictions on their layout.
These restrictions and widely differing use cases make it impossible to create a one-size-fits-all policy around the general concept of "executables".
Our general intent right now is that We do not have a wholistic solution for
We do not generally recommend
Maybe I'm misreading the linked commit, but this is adding them to
See previous; this makes consumers able to find things via
Generally, a need for debug variants violates the design model. If pressed, they would go in The few cases I'm aware of that meaningfully need a debug variant would be the
I strongly doubt that all of these ~222 matches should be deploying debug variants at all according to our above policy. Regardless of coming to some mega-conclusion about where debug executables should live, ports should not deploy debug versions at all if we can avoid it.
I agree, this would be a good post-build lint check (with a suppressing policy flag). As above, the vast majority of ports shouldn't be installing debug executables at all, let alone in the
vcpkg's build model is that only one toolchain is available at a time, so it's "not possible" for a single build to produce both. If, for some reason, a build did produce both, the package would be responsible for only deploying the requested subset (probably both if native compiling, but only the target tools if cross-compiling).
I think it's hard to determine the correct set of paths to add, because PATH-based lookup of dependencies means there can be only one winner for every application. This causes problems with DLLs that use the same name in debug and release. Breaking down the possible scenarios I'm aware of for performing a PATH lookup:
For example, if I'm performing a debug, non-cross-compile build, I want to build and run a custom code generator, and I want to run an executable from the tools/ folder, there's no PATH that will satisfy both of these. Either I'll get the release version of libfoo when I try to run my custom code generator or I'll get the debug version of Fortunately, both scenario (1) and (2) can be worked around: either by running the applocal step as part of post-link before execution or by copying dependencies into the |
Add |
Is that the same situation as dbus -- the webengine library spawns a separate webengine process for sandboxing? |
Probably, somebody requested for it to be deployed so they can run their application in debug configuration. I only run release only builds for stuff like this due to build time. |
FTR my app comes with Qt Assistant as a portable help viewer. |
Yes, QtWebEngineProcess(d) is a good example of another binary executable that is needed at runtime by a library - similar to
The non-trivial treatment of executables in vcpkg brings a non-trivial amount of pain. |
I fail to find documentation (or a specification) for the package installation layout.
In particular, I would like to know where to properly place tools like
curl-config
orgeos-config
, i.e. executable scripts which provide information about how to use the corresponding libraries.Software which uses theses script (e.g. gdal) expects them to be found by name via the
PATH
environment variable or to be provided explicit by parameters (e.g. gdal's--with-geos
)This is what I found in vcpkg:
The release variant of these scripts (
curl-config
,geos-config
) is currently installed toshare/${PORT}
The debug variant (which could provide the d-suffixed library names) is dropped,Fixed.
PATH
environment variable byvcpkg.cmake
,even for cross-builds (Android, iOS)(since [vcpkg.cmake] Setup CMAKE_PROGRAM_PATH for the host if possible #23322:) for the host triplet:tools
tools/*
(but no extra subdirectories)and all subdirectories (since [vcpkg.cmake] Setup CMAKE_PROGRAM_PATH for the host if possible #23322)CMAKE_PROGRAM_PATH
cmake variable:tools\<DEPENDENCY>
This variable is used by
cmake_find_program
which is sometimes called withPATH_SUFFIXES bin
(FindMPI.cmake
[openmpi] find_package(MPI) doesn't work correctly for debug configuration #18151), sometimes without suffixes (FindGettext.cmake
[gettext] msgfmt (and other gettext bin tools) missing on macOS & Windows #13518).tools
tools/${PORT}
tools/${PORT}/bin
tools/${PORT}/sbin
tools/${PORT}/debug/bin
tools/${PORT}/debug/sbin
tools/${PORT}/<COMPONENT>
tools/${PORT}
debug/tools/${PORT}
.manual-tools/${PORT}
.The Linuxish standard for this would be
libexec
and it is used, too.
My questions:
tools
and when to use another prefix?ANSWER: Host tools must be built in the host triplet only.
COMMENT: This can create bootstrapping problems, example:
luajit
(target -> host -> target),qt5-base
(qmake and mkspecs).PATH
environment be restricted to explicitly declared (host) dependencies instead of globbingtools/*
?The text was updated successfully, but these errors were encountered: