FS#64835 - [glew-wayland] glewInit fails under Xorg

Attached to Project: Community Packages
Opened by duck (duck) - Saturday, 14 December 2019, 17:57 GMT
Last edited by Alexander F. Rødseth (xyproto) - Friday, 28 February 2020, 13:34 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

It used to work with both X11 and Wayland, but after update it stopped working with X11, but still works on Wayland. glewInit returns "Missing GL version".

I compiled the same version from source, and it works.

Additional info:

glew-wayland 2.1.0-3
linux 5.4.2.arch1-1
mesa 19.2.7-1
xorg-server 1.20.6-1
drivers: amdgpu.ko.xz, modesetting_drv.so, radeonsi_dri.so

Steps to reproduce:

Install warzone2100
Replace glew with glew-wayland
Start Xorg
Start warzone2100
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Friday, 28 February 2020, 13:34 GMT
Reason for closing:  Upstream
Comment by Doug Newgard (Scimmia) - Saturday, 14 December 2019, 18:30 GMT
"Replace glew with glew-wayland"

Full stop. glew-wayland does not provide glew, so this isn't really possible
Comment by duck (duck) - Saturday, 14 December 2019, 18:53 GMT
> glew-wayland does not provide glew

I think, it should.  FS#64837 

To replace glew I do:
pacman -Rdd glew
pacman -S glew-wayland

I used Warzone 2100 for repro because it's in the repositories, so is easy to test. The bug also affects games that are not in the repositories and thus don't require "glew" package installed.

I can modify the repro:

Compile Warzone 2100 from source.
Install glew-wayland.
Start Xorg.
Start the compiled Warzone 2100.
Comment by duck (duck) - Monday, 16 December 2019, 06:54 GMT
It worked when I compiled it from source because I erroneously compiled it for GLX (see  FS#64856 ). So I compiled it for EGL and debugged.

SDL creates OpenGL context via GLX, then GLEW tries to query EGL version and fails.

The reason it worked on X11 before update may be because previously EGL version was queried in a different way: https://github.com/nigels-com/glew/commit/4d9010864e8de66032638d5b89b170331a6d4c29#diff-c33e9eb1916f3b2a0ece21c212d12966

So it looks like upstream issue.
Comment by duck (duck) - Monday, 16 December 2019, 14:38 GMT
I don't know if upstream accidentally broke this use case in the new version or accidentally supported it in a previous version.

I made a patch to support both EGL and GLX in a single build: https://aur.archlinux.org/packages/glew-egl-glx/
I'm not sure if it's suitable for official repos, but feel free to use it.
Comment by Alexander F. Rødseth (xyproto) - Friday, 28 February 2020, 11:24 GMT
I really like the idea of glew-wayland supporting both EGL and GLX, but I guess it should ideally be fixed upstream, to benefit not only Arch Linux, but other distros too.

I'll close this issue for now, but would be happy to upgrade the package the moment upstream has a new release.

Loading...