lunixbochs / glshim

OpenGL 1.x driver shim for OpenGL ES devices.
https://boards.openpandora.org/topic/11506-glshim/
MIT License
161 stars 32 forks source link

Renpy Engine 6.15 works, but Renpy Engine 6.99 (SDL 2) fails (GnuRoot) #131

Open Arucard1983 opened 9 years ago

Arucard1983 commented 9 years ago

I managed to enable OpenGL on GnuRoot chroot, which is an Android application to install and manage a chrooted Debian distro inside Android, even without rooting the actual device. To do so, I can tell that glshim library builds and runs fine, but I need to install (On Debian Jessie) the libglesv1-mesa package to make Renpy 6.15 working with OpenGL. (The libglesv2-mesa was already installed by default). However the same won't work on Renpy 6.99 which uses the new SDL2. During startup, the engine will crash and display a full logfile, explaining the error. It says that GLX is not supported, and closes after writing the logfile.

lunixbochs commented 9 years ago

Post the log, not a summary.

Arucard1983 commented 9 years ago

Tue Aug 25 15:26:43 2015 Linux-3.1.10-gb1a9af5-i686-with-debian-8.1 Ren'Py 6.99.4.467

Bootstrap to the start of init.init took 6.43s Early init took 0.75s Loader init took 2.25s Loading error handling took 2.83s Loading script took 18.38s Loading persistent took 0.57s Importing _renpysteam: ImportError('No module named _renpysteam',) Running init code took 8.20s Analyze and compile ATL took 1.21s Index archives took 0.72s Cleaning cache took 0.06s Making clean stores took 0.01s Creating interface object took 3.94s Cleaning stores took 0.01s Init translation took 0.51s Build styles took 0.07s Prepare screens took 29.82s Running _start took 0.01s Performance test: Interface start took 0.44s Couldn't import gl renderer: Traceback (most recent call last): File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 1570, in make_draw import(mod) ImportError: libXmu.so.6: cannot open shared object file: No such file or directory Unknown renderer: gl Traceback (most recent call last): File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/execution.py", line 370, in run node.execute() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/ast.py", line 785, in execute renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/python.py", line 1448, in py_exec_bytecode exec bytecode in globals, locals File "renpy/common/00gltest.rpy", line 358, in $ gl_test() File "renpy/common/00gltest.rpy", line 284, in _m1_00gltest__gl_test _gl_performance_test() File "renpy/common/00gltest.rpy", line 301, in _gl_performance_test ui.interact(suppress_underlay=True, suppress_overlay=True) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/ui.py", line 277, in interact rv = renpy.game.interface.interact(roll_forward=roll_forward, kwargs) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 2247, in interact self.start() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 1464, in start self.set_mode() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 1677, in set_mode if draw.set_mode(virtual_size, physical_size, fullscreen): File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/swdraw.py", line 765, in set_mode self.screen = pygame.display.set_mode((scaled_width, scaled_height), fsflag, 32) File "pygame_sdl2/display.pyx", line 387, in pygame_sdl2.display.set_mode (gen/pygame_sdl2.display.c:5302) File "pygame_sdl2/display.pyx", line 108, in pygame_sdl2.display.Window.init (gen/pygame_sdl2.display.c:1967) error: GLX is not supported Traceback (most recent call last): File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/bootstrap.py", line 288, in bootstrap renpy.main.main() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/main.py", line 428, in main run(restart) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/main.py", line 107, in run renpy.execution.run_context(True) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/execution.py", line 696, in run_context context.run() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/execution.py", line 370, in run node.execute() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/ast.py", line 785, in execute renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/python.py", line 1448, in py_exec_bytecode exec bytecode in globals, locals File "renpy/common/00gltest.rpy", line 358, in $ gl_test() File "renpy/common/00gltest.rpy", line 284, in _m1_00gltestgl_test _gl_performance_test() File "renpy/common/00gltest.rpy", line 301, in _gl_performance_test ui.interact(suppress_underlay=True, suppress_overlay=True) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/ui.py", line 277, in interact rv = renpy.game.interface.interact(roll_forward=roll_forward, kwargs) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 2247, in interact self.start() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 1464, in start self.set_mode() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 1677, in set_mode if draw.set_mode(virtual_size, physical_size, fullscreen): File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/swdraw.py", line 765, in set_mode self.screen = pygame.display.set_mode((scaled_width, scaled_height), fsflag, 32) File "pygame_sdl2/display.pyx", line 387, in pygame_sdl2.display.set_mode (gen/pygame_sdl2.display.c:5302) File "pygame_sdl2/display.pyx", line 108, in pygame_sdl2.display.Window.__init (gen/pygame_sdl2.display.c:1967) error: GLX is not supported

lunixbochs commented 9 years ago

This is your problem:

ImportError: libXmu.so.6: cannot open shared object file: No such file or directory

Arucard1983 commented 9 years ago

After installing and checking libraries (and making glxgears working), the main issue remains. For some reason, the lastest Renpy Engine which use SDL2 fails. It crashes due to the "GLX not supported".

And this is the new logfile... Tue Aug 25 23:06:30 2015 Linux-3.1.10-gb1a9af5-i686-with-debian-8.1 Ren'Py 6.99.4.467

Bootstrap to the start of init.init took 7.04s Early init took 0.82s Loader init took 2.49s Loading error handling took 3.05s Loading script took 20.80s Loading persistent took 0.60s Importing _renpysteam: ImportError('No module named _renpysteam',) Running init code took 12.25s Analyze and compile ATL took 1.74s Index archives took 1.38s Cleaning cache took 0.11s Making clean stores took 0.02s Creating interface object took 10.69s Cleaning stores took 0.02s Init translation took 0.59s Build styles took 0.07s Prepare screens took 34.14s Running _start took 0.01s Performance test: Interface start took 0.60s

Windowed mode. Could not get pygame screen: error('GLX is not supported',) Traceback (most recent call last): File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/execution.py", line 370, in run node.execute() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/ast.py", line 785, in execute renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/python.py", line 1448, in py_exec_bytecode exec bytecode in globals, locals File "renpy/common/00gltest.rpy", line 358, in $ gl_test() File "renpy/common/00gltest.rpy", line 284, in _m1_00gltest__gl_test _gl_performance_test() File "renpy/common/00gltest.rpy", line 301, in _gl_performance_test ui.interact(suppress_underlay=True, suppress_overlay=True) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/ui.py", line 277, in interact rv = renpy.game.interface.interact(roll_forward=roll_forward, kwargs) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 2247, in interact self.start() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 1464, in start self.set_mode() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 1677, in set_mode if draw.set_mode(virtual_size, physical_size, fullscreen): File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/swdraw.py", line 765, in set_mode self.screen = pygame.display.set_mode((scaled_width, scaled_height), fsflag, 32) File "pygame_sdl2/display.pyx", line 387, in pygame_sdl2.display.set_mode (gen/pygame_sdl2.display.c:5302) File "pygame_sdl2/display.pyx", line 108, in pygame_sdl2.display.Window.init (gen/pygame_sdl2.display.c:1967) error: GLX is not supported Traceback (most recent call last): File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/bootstrap.py", line 288, in bootstrap renpy.main.main() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/main.py", line 428, in main run(restart) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/main.py", line 107, in run renpy.execution.run_context(True) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/execution.py", line 696, in run_context context.run() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/execution.py", line 370, in run node.execute() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/ast.py", line 785, in execute renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/python.py", line 1448, in py_exec_bytecode exec bytecode in globals, locals File "renpy/common/00gltest.rpy", line 358, in $ gl_test() File "renpy/common/00gltest.rpy", line 284, in _m1_00gltestgl_test _gl_performance_test() File "renpy/common/00gltest.rpy", line 301, in _gl_performance_test ui.interact(suppress_underlay=True, suppress_overlay=True) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/ui.py", line 277, in interact rv = renpy.game.interface.interact(roll_forward=roll_forward, kwargs) File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 2247, in interact self.start() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 1464, in start self.set_mode() File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/core.py", line 1677, in set_mode if draw.set_mode(virtual_size, physical_size, fullscreen): File "/usr/games/Bacchikoi 2/[Black Monkey] Bacchikoi Expansion Pack-1.8-all UNC/renpy/display/swdraw.py", line 765, in set_mode self.screen = pygame.display.set_mode((scaled_width, scaled_height), fsflag, 32) File "pygame_sdl2/display.pyx", line 387, in pygame_sdl2.display.set_mode (gen/pygame_sdl2.display.c:5302) File "pygame_sdl2/display.pyx", line 108, in pygame_sdl2.display.Window.__init (gen/pygame_sdl2.display.c:1967) error: GLX is not supported

And the first old engine works with some basic OpenGL rendering, althought some advanced options are not avaliable, and disabled before starts the game.

lunixbochs commented 9 years ago

There's no output from glshim here, which means it's not loading. Check your library path. Make sure glxgears runs.

Arucard1983 commented 9 years ago

Since the required game can run with an older Renpy Engine (6.17 instead the troublemaker 6.99), and glxgears runs without problems (Using Mesa drivers inside the chrooted environment), the real problem may be a library or incompability along the Android operating system.

As a quick note, when glshim loads and runs the older engine, the console output prints the following warning at the startup:

EGL Opening EGL display EGL Initializing libEGL warning: GLX/DRI2 is not supported

And probably, with the newer Renpy Engine, a failure of DRI2 support means a fatal error.

lunixbochs commented 9 years ago

If you don't see a message like libGL: built on Apr 7 2015 21:19:52, then glshim is not loading. Check ldd glxgears. Maybe Mesa has load priority.

Arucard1983 commented 9 years ago

After several cleanup and testing, I notice the ARM machine (ASUS Transformer Infinity) runs the older Engine, but gives always a GLX error when fail to load the glshim driver. Another machine I tested, the new ASUS Zenfone 2, after glshim and glues installation, loads the driver and runs both games, althrought the Renpy Engine 6.99 switches to basic render mode (software mode), after checking the GLX extensons provided by glshim. Probably the first machine may have a broken configuration or the Tegra 3 chip support was broken due to an unknow issue.

By the way, the ldd /usr/bin/glxgears output is: /support/libdisableselinux.so (0x41168000) libGLEW.so.1.10 => /usr/lib/arm-linux-gnueabihf/libGLEW.so.1.10 (0x411b7000) libGLU.so.1 => /usr/lib/arm-linux-gnueabihf/libGLU.so.1 (0x40023000) libGL.so.1 => /usr/lib/arm-linux-gnueabihf/libGL.so.1 (0x41236000) libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x410b8000) libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0x41387000) libXext.so.6 => /usr/lib/arm-linux-gnueabihf/libXext.so.6 (0x4112c000) libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x4147c000) /lib/ld-linux-armhf.so.3 (0x0f000000) libXmu.so.6 => /usr/lib/arm-linux-gnueabihf/libXmu.so.6 (0x41149000) libXi.so.6 => /usr/lib/arm-linux-gnueabihf/libXi.so.6 (0x41179000) libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x4156a000) libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x41621000) libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x41193000) libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x4164a000) librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x40084000) libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0x4166d000) libXt.so.6 => /usr/lib/arm-linux-gnueabihf/libXt.so.6 (0x41692000) libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0x411a8000) libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x416dd000) libSM.so.6 => /usr/lib/arm-linux-gnueabihf/libSM.so.6 (0x416f0000)

mittorn commented 9 years ago

https://github.com/lunixbochs/glshim/issues/131#issuecomment-135211646 Try install full x11 linux or ubuntu touch on tegra3 device, not android chroot, if you want to get this work. Tegra 3 has x11 egl/gles drivers and ubuntu touch drivers. Otherwise try port glshim remote on android. I will try to port it, but later.

lunixbochs commented 9 years ago

Sounds like you don't have a valid graphics driver in the chroot if you're installing Mesa to fix it?