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 doesn't work when using from programs built with sanitizers #287763

Open
yshui opened this issue Feb 10, 2024 · 1 comment
Open

libglvnd doesn't work when using from programs built with sanitizers #287763

yshui opened this issue Feb 10, 2024 · 1 comment
Labels
0.kind: bug 2.status: wait-for-upstream Waiting for upstream fix (or their other action). 9.needs: upstream fix

Comments

@yshui
Copy link
Contributor

yshui commented Feb 10, 2024

Describe the bug

This is related to google/sanitizers#1219 and llvm/llvm-project#28164

Essentially when not using sanitizers, libglvnd calls dlopen, and libglvnd has rpath set, so everything is fine, libGLX_mesa or whatever is loaded correctly. However, if sanitizer is enabled, it intercepts dlopen. Because libasan doesn't have rpath set, it cannot find the opengl drivers.

It's unlikely this can be solved on NixOS' side. I am opening this issue in case others have the same problem, and maybe tracking upstream progress. Will close if this is inappropriate.

Notify maintainers

@primeos (libglvnd)
@Synthetica9 @vcunat @Ericson2314 (gcc, because of sanitizers)
@dtzWill @lovek323 @alyssais @RaitoBezarius @rrbutani @sternenseemann (compiler-rt, because of sanitizers)


Add a 👍 reaction to issues you find important.

@yshui
Copy link
Contributor Author

yshui commented Feb 10, 2024

Since sanitizers are most commonly only used when developing software, a workaround for this is setting LD_LIBRARY_PATH in shellHook of your devShell.

yshui added a commit to yshui/picom that referenced this issue Feb 10, 2024
Set shellHook to workaround a NixOS limitation, see:

NixOS/nixpkgs#287763

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit to yshui/picom that referenced this issue Feb 10, 2024
Add libepoxy dependency to CI manifest and Nix.

For Nix, we need to set shellHook to workaround a NixOS limitation, see:

NixOS/nixpkgs#287763

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit to yshui/picom that referenced this issue Feb 10, 2024
Add libepoxy dependency to CI manifest and Nix.

For Nix, we need to set shellHook to workaround a NixOS limitation, see:

NixOS/nixpkgs#287763

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@vcunat vcunat added 2.status: wait-for-upstream Waiting for upstream fix (or their other action). 9.needs: upstream fix labels Feb 10, 2024
yshui added a commit to yshui/picom that referenced this issue Feb 10, 2024
Add libepoxy dependency to CI manifest and Nix.

For Nix, we need to set shellHook to workaround a NixOS limitation, see:

NixOS/nixpkgs#287763

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit to yshui/picom that referenced this issue Feb 10, 2024
Add libepoxy dependency to CI manifest and Nix.

For Nix, we need to set shellHook to workaround a NixOS limitation, see:

NixOS/nixpkgs#287763

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit to yshui/picom that referenced this issue Feb 13, 2024
Add libepoxy dependency to CI manifest and Nix.

For Nix, we need to set shellHook to workaround a NixOS limitation, see:

NixOS/nixpkgs#287763

(cherry picked from commit fcd51e7)
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit to yshui/picom that referenced this issue Feb 13, 2024
Add libepoxy dependency to CI manifest and Nix.

For Nix, we need to set shellHook to workaround a NixOS limitation, see:

NixOS/nixpkgs#287763

(cherry picked from commit fcd51e7)
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 2.status: wait-for-upstream Waiting for upstream fix (or their other action). 9.needs: upstream fix
Projects
None yet
Development

No branches or pull requests

2 participants