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

[bug] cpp_info.requires fails when the same replacement is used multiple times in [replace_requires] #17316

Open
valgur opened this issue Nov 13, 2024 · 0 comments
Assignees

Comments

@valgur
Copy link
Contributor

valgur commented Nov 13, 2024

Describe the bug

Conan: 2.9.2
OS: Linux

When using the following [replace_requires] in the host profile (for cross-compilation, since system libs are not available there):

[replace_requires]
opengl/system: libglvnd/1.7.0
egl/system: libglvnd/1.7.0
glu/system: libglvnd/1.7.0

this version of libepoxy fails during the package_info() step with the following error:

ERROR: libepoxy/1.5.10: required component package 'egl::' not in dependencies

This only happens when both opengl/system and egl/system are being used simultaneously. The error disappears when either one of the dependencies is removed from either self.requires() or self.cpp_info.requires.

The error does not occur when self.cpp_info.requires is left unset entirely.

How to reproduce it

Here's a minimal example:

from conan import ConanFile

class EpoxyConan(ConanFile):
    name = "libepoxy"
    version = "0.1"
    settings = "os", "arch", "compiler", "build_type"

    def requirements(self):
        self.requires("opengl/system")
        self.requires("egl/system")

    def package_info(self):
        self.cpp_info.requires.append("opengl::opengl")
        self.cpp_info.requires.append("egl::egl")

and a sample profile:

[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux

[conf]
tools.build:compiler_executables={"c": "gcc-11", "cpp": "g++-11"}

[replace_requires]
opengl/system: libglvnd/1.7.0
egl/system: libglvnd/1.7.0
glu/system: libglvnd/1.7.0
@valgur valgur changed the title cpp_info.requires fails when the same replacement is used multiple times in [replace_requires] [bug] cpp_info.requires fails when the same replacement is used multiple times in [replace_requires] Nov 13, 2024
@memsharded memsharded self-assigned this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants