conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
972 stars 1.78k forks source link

[package] opengl/system: pkg-config provides #4006

Open blackliner opened 3 years ago

blackliner commented 3 years ago

Package and Environment Details (include every applicable attribute)

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

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

Steps to reproduce (Include if Applicable)

conan install opengl/system@ output:

Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

Installing package: opengl/system
Requirements
    opengl/system from 'conan-center' - Cache
Packages
    opengl/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache

Installing (downloading, building) binaries...
Package already installed: libgl1-mesa-dev
Package already installed: libgl1-mesa-dev
opengl/system: Already installed!
ERROR: opengl/system: Error in package_info() method, line 80
        self._fill_cppinfo_from_pkgconfig('gl')
while calling '_fill_cppinfo_from_pkgconfig', line 21
        raise ConanException("OpenGL development files aren't available, give up")
        ConanException: OpenGL development files aren't available, give up

Asked around in #conan @cpplang, and it seems the way our system recipes are written is wrong. Something related to this issue?

I guess many more packages are affected, but for this specific one, it seems to be line 20 if not pkg_config.provides: thats problematic.

Workaround

remove pkgconf and install pkg-config

Twon commented 2 years ago

I've also run into this issue. In my case, this was due to the pkg-config application not being installed. This was fixed by installing pkg-config via "sudo apt install pkg-config". Can you verify that pkg-config is installed and can find OpenGL by requesting the version as such "pkg-config --modversion gl"?

→ pkg-config --modversion gl
1.2
ahogen commented 1 year ago

Related #14909