Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 606924 - media-libs/mesa: Add support for media-libs/libglvnd
Summary: media-libs/mesa: Add support for media-libs/libglvnd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal enhancement
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: use-libglvnd
  Show dependency tree
 
Reported: 2017-01-23 14:31 UTC by Pablo Cholaky
Modified: 2019-10-24 02:34 UTC (History)
18 users (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 Pablo Cholaky 2017-01-23 14:31:20 UTC
This is a feature request for media-libs/mesa to add a USE flag for glvnd, and properly add an ebuild for glvnd library quite similar as proposed as media-libs/libglvnd at https://github.com/sjnewbury/gentoo-gpu.

A week ago Fedora had approved this feature inside their repository as exposed https://bugzilla.redhat.com/show_bug.cgi?id=1259486 , and would be great to see this also working on Gentoo. Of course, maybe postponed ebuild for mesa-17.0.0, and libglvnd masked for testing proposes. Libglvnd have some tags version currently https://github.com/NVIDIA/libglvnd/tree/v0.1.1 and still under heavy development, but should be ready for usage, Nvidia has also their drivers under glvnd ready status.

Using glvnd should make eselect-opengl as deprecated some day, at least until AMDGPU-PRO can successfully push a support to libglvnd.

Regards.
Comment 1 Matt Turner gentoo-dev 2017-02-26 05:47:56 UTC
Yes, this definitely needs to happen.

I'm not sure glvnd is quite ready, but hopefully soon. It's kind of the only solution to the eselect opengl madness.
Comment 2 Dennis Schridde 2017-05-07 11:56:14 UTC
Is anyone working with Nvidia to help them cut regular releases of their library, so that hopefully there will be a chance of this appearing in Gentoo at some point?
Comment 3 Sven 2017-12-10 00:34:02 UTC
Mesa 17.2.x is stable and 17.3.0 is around the corner. But I don't see anything glvnd related (no useflags, no libglvnd packages, etc.).

I'm currently trying to get nvidia-xrun running. It's a much cleaner solution than bublebee/primusrun, as far as I understand. It starts a new X server, where the whole screen is offloaded to the nvidia card. See http://us.download.nvidia.com/XFree86/Linux-x86/387.34/README/randr14.html for reference. I'm told it also works for Vulkan, where bumblebee currently fails.

As far as I understand, libglvnd would help as it would load the right libGL. Right now I have rely on LD_LIBRARY_PATH trickery which actually fails with steam for some reason.

Does Mesa now have full libglvnd support? If so, I'd like to see that arrive on Gentoo sooner rather than later.
Comment 4 Alexander Tsoy 2017-12-24 13:47:44 UTC
(In reply to Dennis Schridde from comment #2)
> Is anyone working with Nvidia to help them cut regular releases of their
> library, so that hopefully there will be a chance of this appearing in
> Gentoo at some point?

1.0.0 was released recently: 
https://github.com/NVIDIA/libglvnd/releases
Comment 5 Larry the Git Cow gentoo-dev 2018-05-27 00:41:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79c3c3652df8a25c05d94f9acaaf303a5ddca270

commit 79c3c3652df8a25c05d94f9acaaf303a5ddca270
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2018-05-26 22:54:36 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2018-05-27 00:41:41 +0000

    media-libs/libglvnd: Add package
    
    package.mask'd for now.
    
    Bug: https://bugs.gentoo.org/606924

 media-libs/libglvnd/Manifest                       |  1 +
 media-libs/libglvnd/libglvnd-1.0.0.20180524.ebuild | 54 ++++++++++++++++++++++
 media-libs/libglvnd/libglvnd-9999.ebuild           | 54 ++++++++++++++++++++++
 media-libs/libglvnd/metadata.xml                   | 11 +++++
 profiles/package.mask                              |  5 ++
 5 files changed, 125 insertions(+)
Comment 6 Dennis Schridde 2018-11-24 22:36:03 UTC
What's the status of this?  Is help needed?  Of what kind?
Comment 7 Matt Turner gentoo-dev 2018-11-24 23:05:27 UTC
Add support to Mesa. Add support to nvidia-drivers. Figure out what to do about eselect-opengl and other GL implementations. Do some testing.
Comment 8 Dennis Schridde 2018-11-25 12:36:34 UTC
(In reply to Matt Turner from comment #7)
> Add support to Mesa. Add support to nvidia-drivers. Figure out what to do
> about eselect-opengl and other GL implementations. Do some testing.

That means the ebuilds, right?  Or is there something known to be missing from Mesa to support glvnd properly?
Comment 9 Matt Turner gentoo-dev 2018-11-25 18:03:32 UTC
Right, just the ebuilds as far as I know. I think other distros are using libglvnd already.
Comment 10 Larry the Git Cow gentoo-dev 2019-03-03 21:56:19 UTC
The bug has been referenced in the following commit(s):

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

commit b51d6fe7309a5a4806629fec54162a1cc6fd42bb
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2019-03-03 21:43:14 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2019-03-03 21:55:56 +0000

    media-libs/mesa: Add support for libglvnd
    
    Bug: https://bugs.gentoo.org/606924
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 media-libs/mesa/mesa-19.0.0_rc6.ebuild | 8 +++++---
 media-libs/mesa/mesa-9999.ebuild       | 8 +++++---
 profiles/base/package.use.mask         | 6 +++++-
 3 files changed, 15 insertions(+), 7 deletions(-)
Comment 11 Arfrever Frehtes Taifersar Arahesis 2019-03-15 09:46:18 UTC
(In reply to Larry the Git Cow from comment #10)
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=b51d6fe7309a5a4806629fec54162a1cc6fd42bb
> 
> commit b51d6fe7309a5a4806629fec54162a1cc6fd42bb
> Author:     Matt Turner <mattst88@gentoo.org>
> AuthorDate: 2019-03-03 21:43:14 +0000
> Commit:     Matt Turner <mattst88@gentoo.org>
> CommitDate: 2019-03-03 21:55:56 +0000
> 
>     media-libs/mesa: Add support for libglvnd


media-libs/mesa ebuilds now have:

        libglvnd? (
                media-libs/libglvnd
                !app-eselect/eselect-opengl
        )

Maybe media-libs/libglvnd should be media-libs/libglvnd[${MULTILIB_USEDEP}] ?

5 other packages have dependency on app-eselect/eselect-opengl, most notably x11-base/xorg-server (and this is not just a dependency, but pkg_postinst() actually calls `eselect opengl ...`). What is plan there?
Comment 12 Larry the Git Cow gentoo-dev 2019-03-16 20:01:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7108b4dfaef2a05590cddc07f6f17a45821afdd1

commit 7108b4dfaef2a05590cddc07f6f17a45821afdd1
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2019-03-16 20:00:18 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2019-03-16 20:01:07 +0000

    media-libs/mesa: Depend on multilib libglvnd
    
    Bug: https://bugs.gentoo.org/606924
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 media-libs/mesa/mesa-19.0.0.ebuild | 2 +-
 media-libs/mesa/mesa-9999.ebuild   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 13 Matt Turner gentoo-dev 2019-03-16 20:02:40 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #11)
> (In reply to Larry the Git Cow from comment #10)
> > https://gitweb.gentoo.org/repo/gentoo.git/commit/
> > ?id=b51d6fe7309a5a4806629fec54162a1cc6fd42bb
> > 
> > commit b51d6fe7309a5a4806629fec54162a1cc6fd42bb
> > Author:     Matt Turner <mattst88@gentoo.org>
> > AuthorDate: 2019-03-03 21:43:14 +0000
> > Commit:     Matt Turner <mattst88@gentoo.org>
> > CommitDate: 2019-03-03 21:55:56 +0000
> > 
> >     media-libs/mesa: Add support for libglvnd
> 
> 
> media-libs/mesa ebuilds now have:
> 
>         libglvnd? (
>                 media-libs/libglvnd
>                 !app-eselect/eselect-opengl
>         )
> 
> Maybe media-libs/libglvnd should be media-libs/libglvnd[${MULTILIB_USEDEP}] ?

Yes, thanks. Fixed.

> 5 other packages have dependency on app-eselect/eselect-opengl, most notably
> x11-base/xorg-server (and this is not just a dependency, but pkg_postinst()
> actually calls `eselect opengl ...`). What is plan there?

Ideally we'll get rid of eselect-opengl all together. That's dependent on adding support to nvidia-drivers and doing... something, with media-libs/raspberrypi-userland{,-bin}. Suggestions welcome.
Comment 14 Miroslaw Mieszczak 2019-03-22 07:42:49 UTC
> Ideally we'll get rid of eselect-opengl all together. That's dependent on
> adding support to nvidia-drivers and doing... something, with
> media-libs/raspberrypi-userland{,-bin}. Suggestions welcome.

Maybe eselect opengl should check for presence of libglvnd, and if present, then do not perform any action?
Comment 15 Reva Denis 2019-05-21 15:28:56 UTC
>Maybe eselect opengl should check for presence of libglvnd, and if present, then do not perform any action?
Also another way is making libglvnd target for eselect-opengl
Comment 16 Maik 2019-08-14 21:21:52 UTC
I just added the bug reports for missing libglvnd support of nvidia-drivers and xorg-server
https://bugs.gentoo.org/692170
https://bugs.gentoo.org/692168
The missing glvnd setup on Gentoo has previously been causing me headaches, e.g. with x11-misc/virtualgl which simply doesn't work with plain eselect-opengl and nvidia drivers but now this is becoming more and more a draw-back due to newly added features being blocked. So I hope this could gain some momentum.
Comment 17 Maik 2019-09-02 19:18:32 UTC
IDK but I guess this bug can be closed since the media-libs/mesa ebuilds clearly support libglvnd. Any further discussion regarding libglvnd unmasking/eselect-opengl depreciation/arising problems should be continued in the tracker bug #692206.
Comment 18 Alexandru N. Barloiu 2019-09-02 19:24:21 UTC
The block was never in mesa. 

grep -ri libglvn /usr/portage/profiles/base/package.use.mask
media-libs/mesa libglvnd
x11-drivers/nvidia-drivers libglvnd
Comment 19 Alexandru N. Barloiu 2019-09-02 19:27:52 UTC
Sorry. sorry. Didn't read the whole thing. My fault.
Comment 20 Matt Turner gentoo-dev 2019-09-03 21:43:07 UTC
We're trying to sort out what to do with the pkgconfig files in Mesa vs libglvnd upstream. I hope that will be resolved soon, and then I'd like to target unmasking USE=libglvnd (and maybe package.use.force'ing?) for 19.2.0.

Maik, thank you very much for filing the tracker bug and working to get other packages in shape for the transition. It's very much appreciated. If you'd like, feel free to hang out on #gentoo-desktop on Freenode. It's usually where informal discussions about X/Mesa/Wayland/GNOME/KDE things happen.
Comment 21 Maik 2019-09-11 16:18:19 UTC
On pkgconfig files: due to bug #694030 I only now got aware of
https://github.com/NVIDIA/libglvnd/pull/179
> That'll require changes to any other builds that specify a particular Mesa version
How could that possibly be done (discriminating the affected ebuilds) without ending in mental insanity?
Comment 22 Matt Turner gentoo-dev 2019-09-19 04:00:36 UTC
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2042 will be in 19.2.0.

Other than that, everything for Mesa is good to go. Marking as resolved.
Comment 23 Arfrever Frehtes Taifersar Arahesis 2019-10-24 02:02:57 UTC
(In reply to Matt Turner from comment #22)
> https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2042 will be in
> 19.2.0.

This was about .pc files.

Beside this, the remaining problem was about headers, and fix is expected to be in Mesa 19.2.2:
https://gitlab.freedesktop.org/mesa/mesa/issues/1846
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2179
https://gitlab.freedesktop.org/mesa/mesa/commit/8355658fa857536d948773b361c5ede770e637a3
"meson: skip installation of GLVND-provided headers"

(As workaround for collisions, currently media-libs/libglvnd ebuilds have --disable-headers option.)