Open pauldmccarthy opened 9 months ago
Please ping again when you get a resolution upstream.
Can you successfully install an older mesalib on your environent? that might alleviate the issues.
Sounds like you thoroughly checked through things....
@hmaarrfk yes, thanks - I'll ping you here if/when I get a response on the mesa issue.
I can work around the problem by pinning mesalib at 23.1, or removing it - it is an optional dependency for my software, so this is by no means a showstopper for me!
Solution to issue cannot be found in the documentation.
Issue
Hi @hmaarrfk, I have encountered a prickly issue regarding the
libglapi.so
library that is bundled withmesalib
(I'm currently only considering the Linux build - I suspect that this doesn't affect Windows/macOS).In some on-screen rendering scenarios, where a program installed into
$CONDA_PREFIX
is using the systemlibGL.so
library,$CONDA_PREFIX/lib/libglapi.so
is being preferentially loaded where the systemlibglapi.so
should be used. Specifically, I am usingPyOpenGL
- I think that$CONDA_PREFIX/lib/libglapi.so
is being used over the systemlibglapi.so
simply because of theRPATH
entry baked into$CONDA_PREFIX/bin/python
, causing it to prefer libraries in$CONDA_PREFIX/lib
over system libraries.Up until a few days ago, this wasn't a problem (and I had never noticed), as the
libglapi.so
provided bymesalib
was compatible with the version available through most Linux OS package managers.However, mesa 23.2.1 (published to anaconda.org on 2023-09-29) has had some recent changes, which are beyond my understanding, and which seem to have broken compatibility.
As the
mesalib
package intends to only providelibOSMesa
for off-screen rendering, ideally itslibglapi
should only be used in off-screen rendering scenarios. So I'm wondering if there would be any problem with statically linkinglibglapi
intolibOSMesa.so
- in principle, this should possible by setting-Dshared-glapi=disabled
in the call tomeson setup
. Do you have any thoughts on this?Unfortunately I have been playing with around with this locally, and have discovered that compilation with
-Dshared-glapi=disabled
is currently not possible - I have opened an issue over at the mesa repository inquiring about this.Thanks!
As this issue involves OpenGL and non-conda-installed software, I don't have a simple test case. However, the basic issue can be observed by checking which
libglapi.so
file would be loaded via Python:It is also possible to observe the effect of the recent 23.2.1 mesa release by forcing
glxinfo
(installed via the system, e.g.mesa-utils
on Ubuntu 22.04) to use themesalib
providedlibglapi.so
. We need to useLD_LIBRARY_PATH
orLD_PRELOAD
here, asglxinfo
is not built via conda-forge, and so will not otherwise preferentially load libraries from$CONDA_PREFIX/lib/
:Installed packages
Environment info