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

webkitgtk: Fix bubblewrap opengl-driver path #122333

Merged
merged 1 commit into from May 12, 2021
Merged

Conversation

talyz
Copy link
Contributor

@talyz talyz commented May 9, 2021

Motivation for this change

If /run/opengl-driver/lib is in LD_LIBRARY_PATH, bwrap will try to mount it into the already bind mounted /run/opengl-driver. To prevent this, we instead specify the subpaths of /run/opengl-driverwe're interested in.

Fixes #121603.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@vcunat
Copy link
Member

vcunat commented May 10, 2021

When doing this, you might also like to fix the 32-bit case, as the path is different in there? Ideally by using addOpenGLRunpath.driverLink instead of hard-coded "/run/opengl-driver".

If `/run/opengl-driver/lib` is in `LD_LIBRARY_PATH`, bwrap will try to
mount it into the already bind mounted `/run/opengl-driver`. To
prevent this, we instead specify the subpaths of `/run/opengl-driver`
we're interested in.

Also, use the correct path for i686 builds.
@talyz
Copy link
Contributor Author

talyz commented May 10, 2021

@vcunat Fixed!

@Pacman99
Copy link
Contributor

Thank you for addressing this so quickly!
I'm not able to test this yet, my system is not handling a webkit gtk compile well. I'll let you know if I can get it to build, but I'm not sure it will happen with my resources.

If you or anyone else was able to reproduce my issue and can confirm the fix, then I bet its fine.

@talyz
Copy link
Contributor Author

talyz commented May 11, 2021

No problem! Yeah, it's a really heavy build.

I wasn't able to reproduce it exactly, but I think I got reasonably close. My theory was that your LD_LIBRARY_PATH contains /run/opengl-driver/lib, likely because of hardware.opengl.setLdLibraryPath, and that's what's causing the issue. I tried setting it manually and webkitgtk programs hangs at start-up, but they don't immediately crash with an error message, like they seemed to do for you. If you can confirm the contents of LD_LIBRARY_PATH, that would help.

It does at least fix an issue, if it doesn't fix yours, we'll have to revisit it.

@vcunat vcunat merged commit 8a0c5da into NixOS:master May 12, 2021
@vcunat
Copy link
Member

vcunat commented May 12, 2021

@Pacman99: current nixpkgs master has binaries containing this fix, so you can test.

@Pacman99
Copy link
Contributor

Yup! just tested, this fixes my problem. I'm glad the issue can stay closed. Thank you both!

@talyz talyz deleted the webkitgtk-bwrap branch June 16, 2021 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't startup epiphany: can't bind mount
3 participants