Skip to content

Package installation layout for tools #17607

@dg0yt

Description

@dg0yt

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 or geos-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 to
    share/${PORT}

    The debug variant (which could provide the d-suffixed library names) is dropped,
    Fixed.
  • The following locations are automatically added to the PATH environment variable by vcpkg.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)
  • For all declared dependencies, the following locations are automatically added to the CMAKE_PROGRAM_PATH cmake variable:
    tools\<DEPENDENCY>
    This variable is used by cmake_find_program which is sometimes called with PATH_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).
  • sqlite3 executable is installed in
    tools
  • vcpkg_copy_tools defaults to dealing with
    tools/${PORT}
  • vcpkg_configure_make installs tools to
    tools/${PORT}/bin
    tools/${PORT}/sbin
    tools/${PORT}/debug/bin
    tools/${PORT}/debug/sbin
  • vcpkg_configure_meson has undocumented options ADDITIONAL_NATIVE_BINARIES, ADDITIONAL_CROSS_BINARIES which are used by some ports like
    tools/${PORT}/<COMPONENT>
  • vcpkg_cmake_config_fixup adjusts the path of tools references in cmake config files to
    tools/${PORT}
  • dbus installs debug tools to
    debug/tools/${PORT}.
  • Some tools which shall not automatically be in the (CMAKE_PROGRAM_)PATH are installed to
    manual-tools/${PORT}.
    The Linuxish standard for this would be
    libexec
    and it is used, too.

My questions:

  1. When to use tools and when to use another prefix?
  2. Where to place debug variants, if needed?
  3. Where to place tools created for the host during a cross-build, vs. tools created for the target?
    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).
  4. Shouldn't the modification of the PATH environment be restricted to explicitly declared (host) dependencies instead of globbing tools/*?

Metadata

Metadata

Labels

Stalecategory:documentationTo resolve the issue, documentation will need to be updated

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions