On WSL2 Ubuntu 22.04, glu/system fails in package_info() while calling pkg_config.fill_cpp_info.
It can't find pc file of its dependency: opengl.pc. And indeed this file is missing in /usr/lib/x86_64-linux-gnu/pkgconfig unless I install libopengl-dev with apt.
Here is the problem:
system installed glu.pc expects to find opengl.pc
opengl/system recipe doesn't install libopengl-dev but libgl-dev (or fallback to libgl1-mesa-dev) (these legacy packages provide gl.pc, not opengl.pc)
As I spent some hours debugging the same build problem yesterday/today, I'd really like to see that fixed in some way, at least having a proper warning.
Description
On WSL2 Ubuntu 22.04,
glu/system
fails inpackage_info()
while callingpkg_config.fill_cpp_info
.It can't find pc file of its dependency:
opengl.pc
. And indeed this file is missing in/usr/lib/x86_64-linux-gnu/pkgconfig
unless I installlibopengl-dev
with apt. Here is the problem:glu.pc
expects to findopengl.pc
opengl/system
recipe doesn't installlibopengl-dev
butlibgl-dev
(or fallback tolibgl1-mesa-dev
) (these legacy packages providegl.pc
, notopengl.pc
)There is an issue here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009731
But I think that
libopengl-dev
should be added to apt in opengl recipe.libgl-dev
is the legacy package actually:Package and Environment Details
Conan profile
Steps to reproduce
conan install --requires=glu/system
Logs
Click to expand log
``` ======== Input profiles ======== Profile host: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=12 os=Linux [conf] tools.cmake.cmaketoolchain:generator=Ninja tools.info.package_id:confs=['tools.build:cflags', 'tools.build:cxxflags', 'tools.build:defines', 'tools.build:exelinkflags', 'tools.build:sharedlinkflags'] tools.system.package_manager:mode=install tools.system.package_manager:sudo=True tools.system.package_manager:tool=apt-get tools.build:compiler_executables={'c': '/usr/bin/gcc-12', 'cpp': '/usr/bin/g++-12'} [buildenv] CMAKE_EXPORT_COMPILE_COMMANDS=ON CC=/usr/bin/gcc-12 CXX=/usr/bin/g++-12 Profile build: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=12 os=Linux [conf] tools.cmake.cmaketoolchain:generator=Ninja tools.info.package_id:confs=['tools.build:cflags', 'tools.build:cxxflags', 'tools.build:defines', 'tools.build:exelinkflags', 'tools.build:sharedlinkflags'] tools.system.package_manager:mode=install tools.system.package_manager:sudo=True tools.system.package_manager:tool=apt-get tools.build:compiler_executables={'c': '/usr/bin/gcc-12', 'cpp': '/usr/bin/g++-12'} [buildenv] CMAKE_EXPORT_COMPILE_COMMANDS=ON CC=/usr/bin/gcc-12 CXX=/usr/bin/g++-12 ======== Computing dependency graph ======== Graph root cli Requirements glu/system#ee50fc2ade0e1c0c8ebb3be3ea60e0f5 - Cache opengl/system#b29589c04d6df84c110d6acb066ab653 - Cache ======== Computing necessary packages ======== Requirements glu/system#ee50fc2ade0e1c0c8ebb3be3ea60e0f5:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache opengl/system#b29589c04d6df84c110d6acb066ab653:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache opengl/system: RUN: dpkg-query -W -f='${Status}' libgl-dev | grep -q "ok installed" opengl/system: System requirements: already installed glu/system: RUN: dpkg-query -W -f='${Status}' libglu1-mesa-dev | grep -q "ok installed" glu/system: System requirements: already installed ======== Installing packages ======== opengl/system: Already installed! (1 of 2) glu/system: Already installed! (2 of 2) ERROR: glu/system: Error in package_info() method, line 59 pkg_config.fill_cpp_info(self.cpp_info, is_system=self.settings.os != "FreeBSD") ConanException: Command 'pkg-config --cflags-only-other glu --print-errors' failed with errorcode '1' b"Package opengl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `opengl.pc'\nto the PKG_CONFIG_PATH environment variable\nPackage 'opengl', required by 'glu', not found\n" ```