Skip to content
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

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

jwillikers
Copy link
Contributor

@jwillikers jwillikers commented Apr 12, 2024

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 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 under sysconfigdir, should be correct already and unaffected by these changes on Linux. It is slightly different on FreeBSD.

Before:

'-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"/etc/glvnd/egl_vendor.d:/share/glvnd/egl_vendor.d\"'

After (Linux):

'-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d\"'

@conan-center-bot

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`.
@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 3 (c5763035bf35321cda2e736bef4a59f6647ee2bb):

  • libglvnd/1.4.0:
    All packages built successfully! (All logs)

  • libglvnd/1.7.0:
    All packages built successfully! (All logs)

  • libglvnd/1.5.0:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 3 (c5763035bf35321cda2e736bef4a59f6647ee2bb):

  • libglvnd/1.4.0:
    All packages built successfully! (All logs)

  • libglvnd/1.7.0:
    All packages built successfully! (All logs)

  • libglvnd/1.5.0:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit 32f692d into conan-io:master Apr 16, 2024
23 checks passed
@jwillikers jwillikers deleted the libglvnd-fix-datadir branch April 16, 2024 13:16
franramirez688 pushed a commit to toge/conan-center-index that referenced this pull request Apr 23, 2024
…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`.
@jwillikers
Copy link
Contributor Author

I've confirmed that /usr/local/share is the correct location for FreeBSD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants