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

Mesa drivers problem and GLIBC version not found (wrong version) #263940

Closed
TheMenko opened this issue Oct 28, 2023 · 4 comments
Closed

Mesa drivers problem and GLIBC version not found (wrong version) #263940

TheMenko opened this issue Oct 28, 2023 · 4 comments
Labels
0.kind: bug Something is broken

Comments

@TheMenko
Copy link

TheMenko commented Oct 28, 2023

Describe the bug

Running some software that uses gpu drivers (mesa) throws and issue version `GLIBC_2.38' not found.
Mesa version is 23.1.9 (current unstable)
ldd --version output is ldd (GNU libc) 2.38
It appears by error messages that nix is using the older glibc, 2.37 (current stable)
There were previous issues like this and only fix they had is to unset LD_LIBRARY_PATH from env,
however running env | grep LD doesn't output anything.

part of the output when running vulkaninfo --summary:

$ vulkaninfo --summary
ERROR: [Loader Message] Code 0 : /nix/store/whypqfa83z4bsn43n4byvmw80n4mg3r8-glibc-2.37-45/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/0lfnrz6nq5myv787cih78knzaqy9z9fc-mesa-23.1.9-drivers/lib/libvulkan_dzn.so)
ERROR: [Loader Message] Code 0 : loader_icd_scan: Failed loading library associated with ICD JSON /nix/store/0lfnrz6nq5myv787cih78knzaqy9z9fc-mesa-23.1.9-drivers/lib/libvulkan_dzn.so. Ignoring this JSON

In my configuration.nix file i have the following set:

boot.initrd.kernelModules = [ "amdgpu" ];
environment.variables.AMD_VULKAN_ICD = "RADV";
hardware.opengl = {
    enable = true;
    package = unstable.mesa.drivers;
    driSupport32Bit = true;
    driSupport = true;
};

Steps To Reproduce

Steps to reproduce the behavior:

  1. run vulkaninfo

Expected behavior

No glibc errors, shows output of vulkaninfo

Screenshots

image

Notify maintainers

@vcunat

Metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.5.7-xanmod1, NixOS, 23.05 (Stoat), 23.05.4527.60b9db998f71`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.6`
 - channels(root): `"home-manager-23.05.tar.gz, nixos-23.05, unstable"`
 - channels(menko): `"home-manager-23.05.tar.gz, nixpkgs-23.05"`
 - nixpkgs: `/home/menko/.nix-defexpr/channels/nixpkgs`
@TheMenko TheMenko added the 0.kind: bug Something is broken label Oct 28, 2023
@vcunat
Copy link
Member

vcunat commented Oct 28, 2023

Yes, unfortunately mesa is prone to issues when you mix versions, i.e. running packages from (very) different versions of nixpkgs that the NixOS version.

underengineering added a commit to underengineering/nix that referenced this issue Oct 31, 2023
@C0D3-M4513R
Copy link
Contributor

C0D3-M4513R commented Dec 8, 2023

I'm running into a similar issue:

[nix-shell:~]$ vulkaninfo 
ERROR: [Loader Message] Code 0 : /nix/store/whypqfa83z4bsn43n4byvmw80n4mg3r8-glibc-2.37-45/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/i5ljzrikn9bmghhp35c87yfhjsmnhszm-amdvlk-2023.Q4.1/lib/amdvlk64.so)
ERROR: [Loader Message] Code 0 : loader_icd_scan: Failed loading library associated with ICD JSON /nix/store/i5ljzrikn9bmghhp35c87yfhjsmnhszm-amdvlk-2023.Q4.1/lib/amdvlk64.so. Ignoring this JSON
ERROR: [Loader Message] Code 0 : /nix/store/whypqfa83z4bsn43n4byvmw80n4mg3r8-glibc-2.37-45/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_dzn.so)
ERROR: [Loader Message] Code 0 : loader_icd_scan: Failed loading library associated with ICD JSON /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_dzn.so. Ignoring this JSON
ERROR: [Loader Message] Code 0 : /nix/store/whypqfa83z4bsn43n4byvmw80n4mg3r8-glibc-2.37-45/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_intel_hasvk.so)
ERROR: [Loader Message] Code 0 : loader_icd_scan: Failed loading library associated with ICD JSON /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_intel_hasvk.so. Ignoring this JSON
ERROR: [Loader Message] Code 0 : /nix/store/whypqfa83z4bsn43n4byvmw80n4mg3r8-glibc-2.37-45/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_intel.so)
ERROR: [Loader Message] Code 0 : loader_icd_scan: Failed loading library associated with ICD JSON /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_intel.so. Ignoring this JSON
ERROR: [Loader Message] Code 0 : /nix/store/whypqfa83z4bsn43n4byvmw80n4mg3r8-glibc-2.37-45/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_lvp.so)
ERROR: [Loader Message] Code 0 : loader_icd_scan: Failed loading library associated with ICD JSON /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_lvp.so. Ignoring this JSON
ERROR: [Loader Message] Code 0 : /nix/store/whypqfa83z4bsn43n4byvmw80n4mg3r8-glibc-2.37-45/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_radeon.so)
ERROR: [Loader Message] Code 0 : loader_icd_scan: Failed loading library associated with ICD JSON /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_radeon.so. Ignoring this JSON
ERROR: [Loader Message] Code 0 : /nix/store/whypqfa83z4bsn43n4byvmw80n4mg3r8-glibc-2.37-45/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_virtio.so)
ERROR: [Loader Message] Code 0 : loader_icd_scan: Failed loading library associated with ICD JSON /nix/store/5pvwrphra58apbcf8p5jdg193znk9yrj-mesa-23.1.9-drivers/lib/libvulkan_virtio.so. Ignoring this JSON
ERROR: [Loader Message] Code 0 : vkCreateInstance: Found no drivers!
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
ERROR at /build/source/vulkaninfo/vulkaninfo.h:677:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER

I'm using the exact same system flake (there are minor differences, where a couple modules are present on one, but not the other) on another pc and vulkan works there.
The machine where everything works has a dgpu (Radeon 6800).
The machine where I have this issue only has an igpu (Ryzen 5800H wth Radeon).
Both have the amdgpu driver enabled.

The overall system flake is also the same. Literally the same commit

[nix-shell:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.64, NixOS, 23.11 (Tapir), 23.11.20231202.933d7dc`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

(I at the moment don't actually know how I update the channel to 23.11. I need to look into that.)

Edit: I found the difference of the channel to actually be the issue.
After I updated also the root channel to 23.11 the issue solved itself.

@vcunat
Copy link
Member

vcunat commented Dec 8, 2023

For reference, a single nixpkgs commit only has a single glibc (version). And stable releases never do major glibc upgrades (like GLIBC_2.38 to something else).

@SuperSandro2000
Copy link
Member

duplicate of #216361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

4 participants