-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] Add recipe for libglvnd #25919
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
Awesome, thank you so much for tackling this! CC @conda-forge/core, as this is more involved than usual, and corresponds to the recent discussion in the core call about reducing CDTs. |
egl_vendor_config_dirs = '@0@/glvnd/egl_vendor.d:@1@/glvnd/egl_vendor.d'.format( | ||
- join_paths(get_option('prefix'),get_option('sysconfdir')), | ||
- join_paths(get_option('prefix'),get_option('datadir'))) | ||
+ join_paths('/usr',get_option('sysconfdir')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gets resolved at build time to be either lib or lib64 correct? Wont this cause problems between Ubuntu and fedora
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fortunately not, this are not the directory that contains the libraries, but rather the directories that contains the .json
configuration files containg ICD information, see https://github.com/NVIDIA/libglvnd/blob/master/src/EGL/icd_enumeration.md .
So by default they should be /usr/share/glvnd/egl_vendor.d
and /etc/glvnd/egl_vendor.d/
. To be honest, I need to actually check if /etc/glvnd/egl_vendor.d/
is working as intended, as it is not clear how /etc/glvnd/egl_vendor.d/
could emerge if prefix
is /usr
, but /usr/share/glvnd/egl_vendor.d
is working fine and should be the same across Ubuntu and Fedora.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gitlab.freedesktop.org/glvnd/libglvnd/-/blob/v1.7.0/src/EGL/Makefile.am#L53
The autoconf makefile specifies this way.
Some checks on the location of CentOS7✅
Fedora39✅ traversaro@IITBMP014LW012:~$ docker run -it fedora:latest /bin/bash -c "dnf provides */egl_vendor.d/*"
Fedora 39 - x86_64 3.8 MB/s | 89 MB 00:23
Fedora 39 openh264 (From Cisco) - x86_64 4.6 kB/s | 2.6 kB 00:00
Fedora 39 - x86_64 - Updates 468 kB/s | 35 MB 01:15
mesa-libEGL-23.2.1-2.fc39.i686 : Mesa libEGL runtime libraries
Repo : fedora
Matched from:
Filename : /usr/share/glvnd/egl_vendor.d/50_mesa.json
mesa-libEGL-23.2.1-2.fc39.x86_64 : Mesa libEGL runtime libraries
Repo : fedora
Matched from:
Filename : /usr/share/glvnd/egl_vendor.d/50_mesa.json
mesa-libEGL-23.3.6-1.fc39.i686 : Mesa libEGL runtime libraries
Repo : updates
Matched from:
Filename : /usr/share/glvnd/egl_vendor.d/50_mesa.json
mesa-libEGL-23.3.6-1.fc39.x86_64 : Mesa libEGL runtime libraries
Repo : updates
Matched from:
Filename : /usr/share/glvnd/egl_vendor.d/50_mesa.json Ubuntu22.04✅ traversaro@IITBMP014LW012:~$ docker run -it ubuntu:22.04 /bin/bash -c "apt update && apt install -y apt-file && apt-file update && apt-file search egl_vendor"
[...]
libegl-amber0: /usr/share/glvnd/egl_vendor.d/50_amber.json
libegl-mesa0: /usr/share/glvnd/egl_vendor.d/50_mesa.json
libnvidia-gl-390: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-418-server: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-450-server: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-470: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-470-server: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-510: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-510-server: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-525: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-525-server: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-535: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-535-server: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-545: /usr/share/glvnd/egl_vendor.d/10_nvidia.json
libnvidia-gl-550-server: /usr/share/glvnd/egl_vendor.d/10_nvidia.json Arch Linux✅ |
Is there tested support for GLES as well? There's a lack of support for GLES + Mesa, at least in the legacy CDT packages. |
Do you know if there exists a simple program such as |
Edit: As long as However, building the mesa-provided libraries in the mesalib feedstock is also fine, and is applicable in certain scenarios. |
@hmaarrfk @traversaro No news of merging? |
I think the first two points in #25919 (comment) (i.e. test in old glibc 2.17 distributions and test with non-mesa (i.e. nvidia) driver) would benefit from volunteer actually looking into doing the tests. |
I'll answer the few things I know:
Personally, I would not bother splitting the libraries into different packages; the
|
Made my changes in #27107. |
This is just an experiment triggered by @h-vetinari comment in conda-forge/gymnasium-feedstock#32 (comment) . It is nowhere complete, and if anyone wants to continue working on this feel free to open a new PR or ask me for write permission on my fork.
This PR packages
libglvnd
for conda-forge, reducing the need for CDT packages when working with libraries that need to link OpenGL and related libraries.For now, I just tested it with
glxgears
andeglgears
from https://gitlab.freedesktop.org/mesa/demos, verifying that the correctlibGL.so.1
is loaded viacat /proc/<pid>/maps | grep libGL.so
, on a Ubuntu 22.04 WSL system.glxgears
worked fine out of the box, probably because it finds/usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
viaGLX_EXT_libglvnd
. Insteadeglgears
was failing, as by defaultlibglvnd
looks for EGL's icd (see https://gitlab.freedesktop.org/glvnd/libglvnd/-/blob/v1.7.0/src/EGL/icd_enumeration.md?ref_type=tags) in$CONDA_PREFIX/share/glvnd/egl_vendor.d
. As conda-forge does not ship anyEGL
implementation (and does not plan to do so), I just added a patch that make sure thatlibglvnd
looks in/usr/share/glvnd/egl_vendor.d
for EGL's icd. With that patch,eglgears
is working fine.Things to do:
libglvnd
works thereEGL
's icd to hardcode/usr/share/glvnd/egl_vendor.d
make senseChecklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).