Skip to content

[package] opengl/system: cannot be consumed on Linux if pkg-config is not installed #14909

@SpaceIm

Description

@SpaceIm

Description

When you consume opengl recipe, there is a call to pkg-config if host is Linux or FreeBSD to fill cpp_info, but pkg-config is not a core package installed by default on these systems, so it may fail.

Package and Environment Details

  • Package Name/Version: opengl/system
  • Operating System+version: Linux Ubuntu 22.04
  • Compiler+version: GCC 12
  • Conan version: conan 1.56.0
  • Python version: Python 3.10.6

Conan profile

[settings]
os=Linux
arch=x86_64
compiler=gcc
compiler.version=12
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce

conan install glfw/3.3.8@ -b glfw for example

Logs

Click to expand log
ERROR: opengl/system: Error in package_info() method, line 85
        self._fill_cppinfo_from_pkgconfig('gl')
while calling '_fill_cppinfo_from_pkgconfig', line 24
        if not pkg_config.provides:
        ConanException: pkg-config command ['pkg-config', '--print-provides', 'gl', '--print-errors'] failed with error: Command 'pkg-config --print-provides gl --print-errors' returned non-zero exit status 127.
/bin/sh: 1: pkg-config: not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions