RIVE box64 + gl4es SIGSEGV libc.so.6 Hey ptitseb! I'm testing box64 on my rk3326 chipset on AmberELEC after good results i had with box86. I previously did some tests with box64 on world of goo where both the i386 aswell as the amd64 binaries were present. But could not get it to run then. Now i tried this one. Maybe you have an idea what's going on. Box64 and gl4es built from latest commit. GL4ES via -DNOX11=ON -DGLX_STUBS=ON -DEGL_WRAPPER=ON -DGBM=ON Box64 via -DARM64=ON -DARM_DYNAREC=ON Game run via ``` # Setup GL4ES export LIBGL_ES=2 export LIBGL_GL=21 export LIBGL_FB=4 # Setup Box64 #export BOX64_ALLOWMISSINGLIBS=1 export BOX64_LOG=1 export BOX64_DLSYM_ERROR=1 export BOX64_SHOWSEGV=1 export BOX64_SHOWBT=1 export BOX64_ROLLING_LOG=1 export SDL_VIDEO_GL_DRIVER="$GAMEDIR/box64/native/libGL.so.1" $GAMEDIR/box64/box64 gamedata/RIVE.bin.x86_64 ``` LDD of the binary ``` cebion@Cebion-LT:/mnt/c/linuxgames/rive/data/x86_64$ ldd RIVE.bin.x86_64 linux-vdso.so.1 (0x00007ffc7d979000) libopenal.so.1 => /mnt/c/linuxgames/rive/data/x86_64/./lib64/libopenal.so.1 (0x00007f316c594000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f316c55c000) libSDL2-2.0.so.0 => /mnt/c/linuxgames/rive/data/x86_64/./lib64/libSDL2-2.0.so.0 (0x00007f316c230000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f316c04e000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f316beff000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f316bee2000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f316bcf0000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f316bce6000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f316bce0000) /lib64/ld-linux-x86-64.so.2 (0x00007f316c802000) ``` Log: ``` ./Box64.sh No sudo present. BOX64 using "/roms/ports/box64/box64/native/libGL.so.1" as libGL.so.1 Show Segfault signal even if a signal handler is present Show a Backtrace when a Segfault signal is caught Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL SHA1 SHA2 PageSize:4096 Running on Cortex-A35 with 4 Cores Params database has 14 entries BOX64: Didn't detect 48bits of address space, considering it's 39bits Counted 28 Env var BOX64 LIB PATH: /roms/ports/box64/box64/native/:/usr/lib/aarch64-linux-gnu/:/usr/lib/:/roms/ports/box64/libs/:/usr/lib/:/usr/lib/pulseaudio/:/usr/lib32/:/roms/ports/box64/box64/x64/:/roms/ports/box64/box64/native/:/roms/ports/box64/libs/x64/:/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/ BOX64 BIN PATH: ./:bin/:/usr/bin/:/usr/sbin/:/usr/local/bin/:/usr/bin/:/storage/bin/ Looking for gamedata/RIVE.bin.x86_64 Rename process to "RIVE.bin.x86_64" Using native(wrapped) libopenal.so.1 Using native(wrapped) libpthread.so.0 Using native(wrapped) libSDL2-2.0.so.0 Using native(wrapped) libdl.so.2 Using native(wrapped) libm.so.6 Using native(wrapped) librt.so.1 Using emulated /roms/ports/box64/box64/x64/libstdc++.so.6 Using emulated /roms/ports/box64/box64/x64/libgcc_s.so.1 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux-x86-64.so.2 Using native(wrapped) libutil.so.1 LIBGL: Initialising gl4es LIBGL: v1.1.5 built on Dec 20 2023 23:25:08 LIBGL: using GBM LIBGL: Using GLES 2.0 backend LIBGL: loaded: libGLESv2.so LIBGL: loaded: libEGL.so LIBGL: loaded: libgbm.so LIBGL: loaded: libdrm.so LIBGL: Using GLES 2.0 backend LIBGL: GBM on card /dev/dri/card0 is Available LIBGL: Hardware Full NPOT detected and used LIBGL: Extension GL_EXT_blend_minmax detected and used LIBGL: FBO are in core, and so used LIBGL: PointSprite are in core, and so used LIBGL: CubeMap are in core, and so used LIBGL: BlendColor is in core, and so used LIBGL: Blend Subtract is in core, and so used LIBGL: Blend Function and Equation Separation is in core, and so used LIBGL: Texture Mirrored Repeat is in core, and so used LIBGL: Extension GL_OES_mapbuffer detected LIBGL: Extension GL_OES_element_index_uint detected and used LIBGL: Extension GL_OES_packed_depth_stencil detected and used LIBGL: Extension GL_OES_depth24 detected and used LIBGL: Extension GL_OES_rgb8_rgba8 detected and used LIBGL: Extension GL_EXT_texture_format_BGRA8888 detected and used LIBGL: Extension GL_OES_depth_texture detected and used LIBGL: Extension GL_OES_texture_stencil8 detected and used LIBGL: Extension GL_EXT_texture_rg detected and used LIBGL: Extension GL_EXT_color_buffer_float detected and used LIBGL: Extension GL_EXT_color_buffer_half_float detected and used LIBGL: high precision float in fragment shader available and used LIBGL: Max vertex attrib: 16 LIBGL: Extension GL_OES_standard_derivatives detected and used LIBGL: Extension GL_ARM_shader_framebuffer_fetch detected and used LIBGL: Extension GL_OES_get_program_binary detected and used LIBGL: Number of supported Program Binary Format: 1 LIBGL: Max texture size: 8192 LIBGL: Max Varying Vector: 15 LIBGL: Texture Units: 16/16 (hardware: 16), Max lights: 8, Max planes: 6 LIBGL: Max Color Attachments: 1 / Draw buffers: 1 LIBGL: Hardware vendor is ARM LIBGL: sRGB surface supported LIBGL: EGLImage to Texture2D supported LIBGL: EGLImage to RenderBuffer supported LIBGL: Targeting OpenGL 2.1 LIBGL: Not trying to batch small subsequent glDrawXXXX LIBGL: try to use VBO LIBGL: glXMakeCurrent FBO workaround enabled LIBGL: FBO workaround for using binded texture enabled LIBGL: Force texture for Attachment color0 on FBO LIBGL: Hack to trigger a SwapBuffers when a Full Framebuffer Blit on default FBO is done LIBGL: glX Will try to recycle EGL Surface LIBGL: Current folder is:/storage/roms/ports/box64/gamedata LIBGL: Loaded a PSA with 15 Precompiled Programs Call to dlopen("/roms/ports/box64/box64/native/libGL.so.1"/0x376622a0, 101) Using native(wrapped) libGL.so.1 dlopen: New handle 0x4 (/roms/ports/box64/box64/native/libGL.so.1), dlopened=1 Calling getGLProcAddress[0x7fb3cf6090]("glGetString") => Last calls 30347|PltResolver "SDL_ConvertSurface" => return 0x38065670 30347|0xba582e: Calling SDL_ConvertSurface (/usr/lib/libSDL2-2.0.so.0)(0x38065670, 0x380656E0, 0x0, ...) => return 0x38066120 30347|PltResolver "SDL_FreeSurface" => return 0x38066120 30347|0xba5839: Calling SDL_FreeSurface (/usr/lib/libSDL2-2.0.so.0)(0x38065670, 0x380656E0, 0x0, ...) => return 0x38066120 30347|0xba5843: Calling free (gamedata/RIVE.bin.x86_64)(0x7FA9E71010, 0x380656E0, 0x0, ...) => return 0x38066120 30347|PltResolver "SDL_SetWindowIcon" => return 0x38066120 30347|0xa88bf6: Calling SDL_SetWindowIcon (/usr/lib/libSDL2-2.0.so.0)(0x37DE5C90, 0x38066120, 0x0, ...) => return 0x38066120 30347|0xa88bfe: Calling SDL_FreeSurface (/usr/lib/libSDL2-2.0.so.0)(0x38066120, 0x38066120, 0x0, ...) => return 0x38066120 30347|0xa88e3f: Calling free (gamedata/RIVE.bin.x86_64)(0x37DE6D70, 0x1007FEF80, 0x37DE6D80, ...) => return 0x0 30347|PltResolver "SDL_GL_CreateContext" => return 0x1 30347|0xa8a938: Calling SDL_GL_CreateContext (/usr/lib/libSDL2-2.0.so.0)(0x37DE5C90, 0x1007FEF80, 0x37DE6D80, ...) => return 0x38033328 30347|PltResolver "SDL_GL_SetSwapInterval" => return 0x38033328 30347|0xa8a945: Calling SDL_GL_SetSwapInterval (/usr/lib/libSDL2-2.0.so.0)(0x1, 0x1007FEF80, 0x37DE6D80, ...) => return 0x0 30347|PltResolver "SDL_GL_GetProcAddress" => return 0x0 30347|0xbbb3ab: Calling my2_SDL_GL_GetProcAddress (gamedata/RIVE.bin.x86_64)(0xC1FC57, 0x1007FEF80, 0x37DE6D80, ...) => return 30347|0xba5818: Calling SDL_CreateRGBSurfaceFrom (/usr/lib/libSDL2-2.0.so.0)(0x7FA9E71010, 0x100, 0x100, ...) => return 0x38065670 NativeBT: gamedata/RIVE.bin.x86_64() [0x34a0f164] NativeBT: linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7fb4a0d680] NativeBT: /usr/lib/libc.so.6(+0x7c744) [0x7fb48ac744] NativeBT: /usr/lib/libc.so.6(gsignal+0x14) [0x7fb48694c4] NativeBT: /usr/lib/libSDL2-2.0.so.0(+0x131808) [0x7fb3de1808] NativeBT: linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7fb4a0d680] NativeBT: gamedata/RIVE.bin.x86_64() [0x34a15a24] NativeBT: gamedata/RIVE.bin.x86_64() [0x34f316d4] NativeBT: gamedata/RIVE.bin.x86_64() [0x34e8abac] NativeBT: gamedata/RIVE.bin.x86_64() [0x349f4834] NativeBT: [0x7fa9e20fe8] EmulatedBT: ??? [0x606c0] EmulatedBT: /storage/roms/ports/box64/gamedata/RIVE.bin.x86_64(ogl_LoadFunctions+4b) [0xbbb3ab] EmulatedBT: ??? [(nil)] 30347|SIGSEGV @0x7fb48ac744 (???(/usr/lib/libc.so.6+0x7c744)) (x64pc=0x606d3/???:"???", rsp=0x1007fefe8, stack=0x100000000:0x100800000 own=(nil) fp=0x38033328), for accessing 0x768b (code=-6/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil) RSP-0x20:0x0000000000000010 RSP-0x18:0x0000000037df8168 RSP-0x10:0x000000003767b790 RSP-0x08:0x0000000000000144 RSP+0x00:0x0000000000bbb3ab RSP+0x08:0x0000000000001002 RSP+0x10:0x0000000000000000 RSP+0x18:0x0000000000000000 RAX:0x0000000000000000 RCX:0x00000000005d3fd0 RDX:0x0000000037de6d80 RBX:0x00000001007ff570 RSP:0x00000001007fefe8 RBP:0x0000000038033328 RSI:0x00000001007fef80 RDI:0x0000000000c1fc57 R8:0x0000000000000400 R9:0x00000000000000ff R10:0x000000000000000c R11:0x0000000000000018 R12:0x0000000037e02cf0 R13:0x00000001007ff4d0 R14:0x00000001007ff6e0 R15:0x00000001007ff430 ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053 ./Box64.sh: line 55: 30347 Segmentation fault $GAMEDIR/box64/box64 gamedata/RIVE.bin.x86_64 ``` And log without any libGL.so.1 On the rk3326 we don't have opengl everywhere so only opengles up to 3 ``` /roms/ports # ./Box64.sh No sudo present. BOX64 using "/roms/ports/box64/box64/native/libGL.so.1" as libGL.so.1 Show Segfault signal even if a signal handler is present Show a Backtrace when a Segfault signal is caught Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL SHA1 SHA2 PageSize:4096 Running on Cortex-A35 with 4 Cores Params database has 14 entries BOX64: Didn't detect 48bits of address space, considering it's 39bits Counted 28 Env var BOX64 LIB PATH: /roms/ports/box64/box64/native/:/usr/lib/aarch64-linux-gnu/:/usr/lib/:/roms/ports/box64/libs/:/usr/lib/:/usr/lib/pulseaudio/:/usr/lib32/:/roms/ports/box64/box64/x64/:/roms/ports/box64/box64/native/:/roms/ports/box64/libs/x64/:/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/ BOX64 BIN PATH: ./:bin/:/usr/bin/:/usr/sbin/:/usr/local/bin/:/usr/bin/:/storage/bin/ Looking for gamedata/RIVE.bin.x86_64 Rename process to "RIVE.bin.x86_64" Using native(wrapped) libopenal.so.1 Using native(wrapped) libpthread.so.0 Using native(wrapped) libSDL2-2.0.so.0 Using native(wrapped) libdl.so.2 Using native(wrapped) libm.so.6 Using native(wrapped) librt.so.1 Using emulated /roms/ports/box64/box64/x64/libstdc++.so.6 Using emulated /roms/ports/box64/box64/x64/libgcc_s.so.1 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux-x86-64.so.2 Using native(wrapped) libutil.so.1 Call to dlopen("/roms/ports/box64/box64/native/libGL.so.1"/0x669082a0, 101) Using native(wrapped) libGL.so.1 dlopen: New handle 0x4 (/roms/ports/box64/box64/native/libGL.so.1), dlopened=1 Calling getGLProcAddress[0x7f7e186090]("glGetString") => Last calls 30581|PltResolver "SDL_ConvertSurface" => return 0x6708F050 30581|0xba582e: Calling SDL_ConvertSurface (/usr/lib/libSDL2-2.0.so.0)(0x6708F050, 0x66E5C4D0, 0x0, ...) => return 0x6708F590 30581|PltResolver "SDL_FreeSurface" => return 0x6708F590 30581|0xba5839: Calling SDL_FreeSurface (/usr/lib/libSDL2-2.0.so.0)(0x6708F050, 0x66E5C4D0, 0x0, ...) => return 0x6708F590 30581|0xba5843: Calling free (gamedata/RIVE.bin.x86_64)(0x7F77671010, 0x66E5C4D0, 0x0, ...) => return 0x6708F590 30581|PltResolver "SDL_SetWindowIcon" => return 0x6708F590 30581|0xa88bf6: Calling SDL_SetWindowIcon (/usr/lib/libSDL2-2.0.so.0)(0x66E5C580, 0x6708F590, 0x0, ...) => return 0x6708F590 30581|0xa88bfe: Calling SDL_FreeSurface (/usr/lib/libSDL2-2.0.so.0)(0x6708F590, 0x6708F590, 0x0, ...) => return 0x6708F590 30581|0xa88e3f: Calling free (gamedata/RIVE.bin.x86_64)(0x6708FE10, 0x1007FEF80, 0x6708FE20, ...) => return 0x0 30581|PltResolver "SDL_GL_CreateContext" => return 0x1 30581|0xa8a938: Calling SDL_GL_CreateContext (/usr/lib/libSDL2-2.0.so.0)(0x66E5C580, 0x1007FEF80, 0x6708FE20, ...) => return 0x6719D228 30581|PltResolver "SDL_GL_SetSwapInterval" => return 0x6719D228 30581|0xa8a945: Calling SDL_GL_SetSwapInterval (/usr/lib/libSDL2-2.0.so.0)(0x1, 0x1007FEF80, 0x6708FE20, ...) => return 0x0 30581|PltResolver "SDL_GL_GetProcAddress" => return 0x0 30581|0xbbb3ab: Calling my2_SDL_GL_GetProcAddress (gamedata/RIVE.bin.x86_64)(0xC1FC57, 0x1007FEF80, 0x6708FE20, ...) => return 30581|0xba5818: Calling SDL_CreateRGBSurfaceFrom (/usr/lib/libSDL2-2.0.so.0)(0x7F77671010, 0x100, 0x100, ...) => return 0x6708F050 NativeBT: gamedata/RIVE.bin.x86_64() [0x34a0f164] NativeBT: linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7f7ee9b680] NativeBT: /usr/lib/libc.so.6(+0x7c744) [0x7f7ed3c744] NativeBT: /usr/lib/libc.so.6(gsignal+0x14) [0x7f7ecf94c4] NativeBT: /usr/lib/libSDL2-2.0.so.0(+0x131808) [0x7f7e271808] NativeBT: linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7f7ee9b680] NativeBT: gamedata/RIVE.bin.x86_64() [0x34a15a24] NativeBT: gamedata/RIVE.bin.x86_64() [0x34f316d4] NativeBT: gamedata/RIVE.bin.x86_64() [0x34e8abac] NativeBT: gamedata/RIVE.bin.x86_64() [0x349f4834] NativeBT: [0x7f77620fe8] EmulatedBT: ??? [0x606c0] EmulatedBT: /storage/roms/ports/box64/gamedata/RIVE.bin.x86_64(ogl_LoadFunctions+4b) [0xbbb3ab] EmulatedBT: ??? [(nil)] 30581|SIGSEGV @0x7f7ed3c744 (???(/usr/lib/libc.so.6+0x7c744)) (x64pc=0x606d3/???:"???", rsp=0x1007fefe8, stack=0x100000000:0x100800000 own=(nil) fp=0x6719d228), for accessing 0x7775 (code=-6/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil) RSP-0x20:0x0000000000000010 RSP-0x18:0x00000000670a5e98 RSP-0x10:0x0000000066921790 RSP-0x08:0x0000000000000144 RSP+0x00:0x0000000000bbb3ab RSP+0x08:0x0000000000001002 RSP+0x10:0x0000000000000000 RSP+0x18:0x0000000000000000 RAX:0x0000000000000000 RCX:0x00000000005d3fd0 RDX:0x000000006708fe20 RBX:0x00000001007ff570 RSP:0x00000001007fefe8 RBP:0x000000006719d228 RSI:0x00000001007fef80 RDI:0x0000000000c1fc57 R8:0x0000000000000400 R9:0x00000000000000ff R10:0x000000000000000c R11:0x0000000000000018 R12:0x00000000670916c0 R13:0x00000001007ff4d0 R14:0x00000001007ff6e0 R15:0x00000001007ff430 ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053 ./Box64.sh: line 55: 30581 Segmentation fault $GAMEDIR/box64/box64 gamedata/RIVE.bin.x86_64 kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec ```