Skip to content

[bug] Conan generated .pc files should have -uninstalled in file name so the packages work when using a sysroot #19311

@alex1234567890123456789

Description

Describe the bug

When cross-compiling with a sysroot, pkgconf will prepend the sysroot to all include and lib directories, even those of Conan packages, which is wrong since they are not under the sysroot (see #16468 ). If the .pc files have "-uninstalled" appended (e.g. somepackage-uninstalled.pc) then pkgconf's behavior is correct.

Note that PR #19229 can be reverted (adding sysroot property back in) after adding -uninstalled.

Note also it looks like there is an (incomplete?) PR #19303 which attempts to fix the same bug by using an env var instead of the -uninstalled postfix. I don't know which is the preferred/most correct approach.

How to reproduce it

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions