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

Fixed fatal error with libX11 and libGL while building playonlinux #56997

Merged
merged 2 commits into from Apr 17, 2019

Conversation

mtrsk
Copy link
Member

@mtrsk mtrsk commented Mar 6, 2019

This is my first attempt on fixing a package on NixOS, any advice is extremely welcome.

Motivation for this change

I was experiencing the following errors while building playonlinux 4.3.4 on unstable [19.09pre171786.34aa254f9eb (Loris)]

fatal error: X11/Xlib.h: No such file or directory
fatal error: GL/gl.h: No such file or directory
Things done

I've changed some buildInputs and makeLibraryPath until nix-build -A playonlinux finally compiled.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@mtrsk mtrsk changed the title Fixed fatal error with X11 and libGL while building playonlinux Fixed fatal error with libX11 and libGL while building playonlinux Mar 7, 2019
@infinisil
Copy link
Member

Nice, I'm still getting

/home/infinisil/.PlayOnLinux//tmp/check_dd_x86: error while loading shared libraries: libGL.so.1: wrong ELF class: ELFCLASS64

and a window pop up saying "PlayOnLinux is unable to find 32bits OpenGL libraries. You might encounter problem with your games".

On NixOS this can probably be fixed by telling it about /run/opengl-driver-32/lib, there's a bunch of examples of this in nixpkgs

@infinisil
Copy link
Member

And I actually think you should get the drivers from /run/opengl-driver/lib instead of adding libGL

@mtrsk
Copy link
Member Author

mtrsk commented Mar 8, 2019

Ok, this is really something with my config then. Will close this and the issue I've opened some days ago.

@mtrsk mtrsk closed this Mar 8, 2019
@mtrsk mtrsk deleted the playonlinux-fix branch March 8, 2019 18:22
@infinisil
Copy link
Member

No, I mean, you should wrap the package definition with /run/opengl-driver/lib instead of adding it to the library paths. The fix for the build is still needed, it doesn't work on master

@mtrsk mtrsk restored the playonlinux-fix branch March 8, 2019 18:48
@mtrsk
Copy link
Member Author

mtrsk commented Mar 8, 2019

@infinisil Oh I see, sorry. I'll take a better look then and submit once it works.

@mtrsk mtrsk reopened this Mar 8, 2019
@jerith666
Copy link
Contributor

The errors about OpenGL at runtime are not new, I wouldn't let them hold up merging this -- at least it gets it to build.

@mtrsk
Copy link
Member Author

mtrsk commented Mar 17, 2019

The errors about OpenGL at runtime are not new, I wouldn't let them hold up merging this -- at least it gets it to build.

Indeed, but some problems persist. Now playonlinux can't create 64 bits volumes due to wine crashing, 32 bits are fine as far as I can see.

Edit: The next version of POL (still on alpha) might be easier to support

@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/has-anyone-got-playonlinux-working-on-19-03/2683/2

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess let's merge this then

@matthewbauer
Copy link
Member

Make sure to backport and unmark as broken.

@infinisil
Copy link
Member

Where is it marked as broken?

@matthewbauer
Copy link
Member

Where is it marked as broken?

171eb30

@infinisil
Copy link
Member

I rebased on top of the commit that marked it as broken, then amended the fixing commit to remove the broken = true again.

@infinisil infinisil merged commit d260277 into NixOS:master Apr 17, 2019
@infinisil
Copy link
Member

Cherry-picked to 19.03 in 3d98c52 (and parent)

Should I also backport to 18.09?

@mtrsk mtrsk deleted the playonlinux-fix branch August 1, 2019 21:19
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.

None yet

6 participants