-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
libglvnd: Set the default datadir appropriately for the system #23500
libglvnd: Set the default datadir appropriately for the system #23500
Conversation
This comment has been minimized.
This comment has been minimized.
Currently, ICD discovery doesn't work properly for the system. This is because `datadir` is either configured to the package directory for Conan versions before 1.64 and 2.2 or not set at all for later versions. When the datadir is not set, it results in the default search path for ICD discovery using /share/glvnd/egl_vendor.d, which is not correct for any platform. This is due to the empty `prefix`. This PR sets datadir to `/usr/share` on Linux, fixing the search path to include `/usr/share/glvnd/egl_vendor.d`. The `prefix` is not modified to avoid installing everything under `/usr` in the install step. On FreeBSD, the `datadir` is set to `/usr/local/share`, where I assume that the Mesa package's vendor configs are installed. I haven't confirmed this for FreeBSD. These changes can be verified by checking the generated `compile_commands.json` file in the build directory. The value for `-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=` will include the default search paths that libglvnd is built with. The first path which is under `sysconfigdir`, should be correct for Linux, as it is `/etc`. Under FreeBSD, this should be `/usr/local/etc`.
94a571b
to
c576303
Compare
This comment has been minimized.
This comment has been minimized.
Conan v1 pipeline ✔️All green in build 3 (
Conan v2 pipeline ✔️
All green in build 3 ( |
…the system Currently, ICD discovery doesn't work properly for the system. This is because `datadir` is either configured to the package directory for Conan versions before 1.64 and 2.2 or not set at all for later versions. When the datadir is not set, it results in the default search path for ICD discovery using /share/glvnd/egl_vendor.d, which is not correct for any platform. This is due to the empty `prefix`. This PR sets datadir to `/usr/share` on Linux, fixing the search path to include `/usr/share/glvnd/egl_vendor.d`. The `prefix` is not modified to avoid installing everything under `/usr` in the install step. On FreeBSD, the `datadir` is set to `/usr/local/share`, where I assume that the Mesa package's vendor configs are installed. I haven't confirmed this for FreeBSD. These changes can be verified by checking the generated `compile_commands.json` file in the build directory. The value for `-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=` will include the default search paths that libglvnd is built with. The first path which is under `sysconfigdir`, should be correct for Linux, as it is `/etc`. Under FreeBSD, this should be `/usr/local/etc`.
I've confirmed that |
Currently, ICD discovery doesn't work properly for the system. This is because
datadir
is either configured to the package directory for Conan versions before 1.64 and 2.2 or not set at all for later versions. When the datadir is not set, it results in the default search path for ICD discovery using /share/glvnd/egl_vendor.d, which is not correct for any platform. This is due to the emptyprefix
.This PR sets datadir to
/usr/share
on Linux, fixing the search path to include/usr/share/glvnd/egl_vendor.d
. Theprefix
is not modified to avoid installing everything under/usr
in the install step. On FreeBSD, thedatadir
is set to/usr/local/share
, where Mesa package's vendor configs are installed.I haven't confirmed this for FreeBSD.I've confirmed this is the correct location on FreeBSD.These changes can be verified by checking the generated
compile_commands.json
file in the build directory. The value for-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=
will include the default search paths that libglvnd is built with. The first path which is undersysconfigdir
, should be correct already and unaffected by these changes on Linux. It is slightly different on FreeBSD.Before:
After (Linux):