-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
OpenGL: unable to open display #23
Comments
So my bet is that some env var is not available in the container. We set a few here: https://github.com/matthewbauer/nix-bundle/blob/master/AppRun.c#L231-L242 Something to try would be to run strace and see if it's trying to access a file that's not in the mount namespace. |
Okay my latest commit should fix this. To test it:
|
It does not unfortunately. Tested on nixos and arch linux (the nix-bundle call was done on nixos and the file was transfered to arch by ssh). I tried with something "simpler",
|
Ok so adding the /tmp dir in the latest commit gets us a little farther:
I wonder why it can't find the driver? |
Ok, stuff starts to be really interesting. The status of OpenGL on nix/nixos is a bit broken. OpenGL is a system library (and impure by definition), and the
I don't know about the internal of nix-bundle, but to work with OpenGL, it needs, at least, to give an access to the host system /run/opengl-drivers, so it will work on nixos or any system where nix is installed and the user created the symbolic link. But this is a wrong solution because it means that nix-bundle will only work for OpenGL application on system where nix is already installed, which defeat the purpose of nix-bundle. A robust solution will be to locate the system libGL (usually in /usr/lib/libGL.so, but not always) and use it, and all of its dependencies. |
Is there any progress on this? Or a workaround? Is it just not possible to package graphical apps with nix-bundle? I am trying to package a game I'm making using nix-bundle, and I'm getting the error "Couldn't find matching GLX visual", which I'm assuming is the same issue described here. I was able to get it working by wrapping the package in a call to nixGL before wrapping it in nix-bundle, but as mentioned in the issue above, this seems incredibly non-portable. |
I was actually able to solve this issue for AppImage by updating the AppRun.c file to the latest from AppImageKit (https://github.com/AppImage/AppImageKit/blob/master/src/AppRun.c). I have the same issue with a non-appimage bundle, and I don't see AppRun.c referenced anywhere from that code, so I'm guessing the two were unrelated? |
@Radvendii when I do that I get |
@arximboldi I don't remember the minimal changes to get this part of things working, but I actually wound up doing a bunch of work on the appimage infrastructure. You can see my PR here #76, and try it out by referring to my fork of nix-bundle https://github.com/radvendii/nix-bundle |
Thank you so much @Radvendii!! I'm gonna definitelly take a look! |
@Radvendii, I just tried that PR and I am having the same issue. I'm writing with more details in the PR. |
nix-bundle blender /bin/blender
Will fail with:
On nixos 17.09.1997.1a8a95e879 (Hummingbird) using the packaged nix-bundle.
The text was updated successfully, but these errors were encountered: