Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 849809 - media-libs/libepoxy[-X,egl]: broken pkgconfig file?
Summary: media-libs/libepoxy[-X,egl]: broken pkgconfig file?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 848858
  Show dependency tree
 
Reported: 2022-06-05 13:58 UTC by Joonas Niilola
Modified: 2022-06-19 08:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Niilola gentoo-dev 2022-06-05 13:58:56 UTC
Hey, 

when emerging libepoxy with "-X +egl" on a fully wayland system, it breaks pkgconfig with:
/usr/bin/x86_64-pc-linux-gnu-pkg-config --shared --cflags 'gtk+-wayland-3.0 >= 3.14'
Package gl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gl', required by 'epoxy', not found

egl.pc should be enough for gtk+, and that exists.
# equery f libglvnd | grep pkgconfig
/usr/lib/pkgconfig
/usr/lib/pkgconfig/egl.pc
/usr/lib/pkgconfig/glesv1_cm.pc
/usr/lib/pkgconfig/glesv2.pc
/usr/lib/pkgconfig/libglvnd.pc
/usr/lib/pkgconfig/opengl.pc
/usr/lib64/pkgconfig
/usr/lib64/pkgconfig/egl.pc
/usr/lib64/pkgconfig/glesv1_cm.pc
/usr/lib64/pkgconfig/glesv2.pc
/usr/lib64/pkgconfig/libglvnd.pc
/usr/lib64/pkgconfig/opengl.pc

[binary   R    ] x11-libs/gtk+-3.24.34-3:3::gentoo  USE="introspection wayland -X (-aqua) -broadway -colord -cups -examples -gtk-doc -sysprof -test -vim-syntax -xinerama" ABI_X86="32 (64) (-x32)" 0 KiB
[binary   R    ] media-libs/libepoxy-1.5.10-5::gentoo  USE="egl -X -test" ABI_X86="32 (64) (-x32)" 0 KiB
[binary   R    ] media-libs/libglvnd-1.4.0-3::gentoo  USE="-X -test" ABI_X86="32 (64) (-x32)" 0 KiB

(I've tried emerging with --usepkg=n but it didn't help)

libglvnd[X] does install gl.pc, but it also pulls bunch of x11 libs with it, which is not desired when trying to go full wayland without x11. (I would also throw an suggestion to perhaps symlink libglvnd's egl.pc into gl.pc if "-X +egl" is specified?=

Let me know what else you need. The gl/egl/glx logic for libepoxy looks wild, I guess there's something?
Comment 1 Ionen Wolkens gentoo-dev 2022-06-05 14:19:09 UTC
>libglvnd's egl.pc into gl.pc if "-X +egl" is specified?=
Replacement for libGL with -X is "libOpenGL" rather than libEGL

It's libGL but not linked to libGLX, and still works on Xorg making it ideal where it works (does lack a handful of features so some funky packages will fail to build with it).

Ideally packages should be made to find the right library rather than "automagic" use a different one based on a gl.pc symlink, I ended up forcing it in e.g. media-gfx/imv.

I guess if epoxy could consider opengl.pc instead when -X it could sort this out, not that I really checked this.
Comment 2 Larry the Git Cow gentoo-dev 2022-06-19 08:34:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cabfee1095110f283ea40ac93902093f588d425

commit 1cabfee1095110f283ea40ac93902093f588d425
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-06-17 12:48:54 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-06-19 08:34:23 +0000

    media-libs/libepoxy: fix pkgconfig file to use lopengl with -X
    
    Closes: https://bugs.gentoo.org/849809
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../libepoxy-1.5.10-use-opengl.pc-without-x.patch  | 15 +++++++
 media-libs/libepoxy/libepoxy-1.5.10-r1.ebuild      | 48 ++++++++++++++++++++++
 media-libs/libepoxy/libepoxy-9999.ebuild           |  2 +
 3 files changed, 65 insertions(+)