ptitSeb / box86

Box86 - Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices
https://box86.org
MIT License
3.31k stars 227 forks source link

Maldita Castilla Linux version segfaults on Amlogic 32bit arm #88

Closed shantigilbert closed 4 years ago

shantigilbert commented 4 years ago

This is my first time trying to make box86 run, I have an Amlogic s905x3 running on 32bit arm, everything compiles fine (cross compiled in Ubuntu) , it does need gl4es which also compiles fine, I copied all the needed libs I think but when I try to run Maldita Castilla I get this error: (full log)

EmuELEC:/emuelec/bin/maldita # BOX86_LOG=1 BOX86_LD_LIBRARY_PATH=/emuelec/lib/i386-linux-gnu/:./:lib/:lib32/:x86/ box86 runner
Debug level is 1
BOX86_LD_LIBRARY_PATH: /emuelec/lib/i386-linux-gnu/:./:lib/:lib32/:x86/
Using default BOX86_PATH: ./:bin/
Counted 20 Env var
Looking for runner
Using emulated /emuelec/lib/i386-linux-gnu/libstdc++.so.6
Using native(wrapped) libm.so.6
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using emulated /emuelec/lib/i386-linux-gnu/libgcc_s.so.1
Using native(wrapped) libz.so.1
Error initializing native libXxf86vm.so.1 (last dlerror is libXxf86vm.so.1: cannot open shared object file: No such file or directory)
Using emulated lib/libXxf86vm.so.1
Using native(wrapped) libX11.so.6
Using native(wrapped) libXext.so.6
Using native(wrapped) libxcb.so.1
Using native(wrapped) libXau.so.6
Using native(wrapped) libXdmcp.so.6
LIBGL: Initialising gl4es
LIBGL: v1.1.3 built on Jan 20 2020 17:34:41
LIBGL: Using GLES 2.0 backend
LIBGL: loaded: libGLESv2.so
LIBGL: loaded: libEGL.so
LIBGL: Float and Half-Float texture support disabled
LIBGL: Using GLES 2.0 backend
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 Substract 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: 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_OES_get_program detected and used
LIBGL: Number of supported Program Binary Format: 1
LIBGL: Max texture size: 8192
LIBGL: Max Varying Vector: 15
LIBGL: Texture Units: 8(8), Max lights: 8, Max planes: 6
LIBGL: Hardware vendor is ARM
LIBGL: sRGB surface supported
LIBGL: Targeting OpenGL 2.0
LIBGL: NPOT texture handled in hardware
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: glX Will try to recycle EGL Surface
LIBGL: Current folder is:/storage/.config/emuelec/bin/maldita
Using native(wrapped) libGL.so.1
Using native(wrapped) libopenal.so.1
Error initializing native libssl.so.1 (last dlerror is libssl.so.1.0.2: cannot open shared object file: No such file or directory)
Using emulated lib/libssl.so.1.0.0
Error initializing native libcrypto.so.1 (last dlerror is libcrypto.so.1.0.2: cannot open shared object file: No such file or directory)
Using emulated lib/libcrypto.so.1.0.0
Using native(wrapped) libdl.so.2
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT @0xf67d619c (0x6b506)
Warning: Weak Symbol _ZGTtdlPv not found, cannot apply R_386_JMP_SLOT @0xf67d6478 (0x6c076)

***************************************
*     YoYo Games Linux Runner V0.1    *
***************************************  
CommandLine: -game game.unx
ExeName= /storage/.config/emuelec/bin/maldita/runner
MemoryManager allocated: 16849
RunnerLoadGame: game.unx
RunnerLoadGame() - assets/game.unx
Checking if INIFile assets/options.ini Exists
assets/options.ini file contents: [Linux]
DisplayName="Maldita Castilla"

INI DisplayName=Maldita Castilla
Reading File assets/game.unx
Loaded File assets/game.unx
IFF wad found
Get Resolution
Get Header Information
InitGMLFunctions
HighScore..SavePrePend /storage/.config/maldita_castilla_arcade_cabinet/ 
Game..Math..Graphic..Action..File..Resource..Interaction..3D..Particle..Misc..DS..Sound..DPlay..Physics..Gamepad..GAMEPAD: Initialising Ubuntu support
GAMEPAD: 4 axis values (last) at 0x5b36d40
GAMEPAD: Enumerating 7
GAMEPAD: device name Logitech Gamepad F310
GAMEPAD: buttons - 11, axes - 8
GAMEPAD: 4 axis values (last) at 0x5b376e0
GAMEPAD: 4 axis values (last) at 0x5b378b8
GAMEPAD: 4 axis values (last) at 0x5b38130
Buffers..Networking..Shaders..YoYo..Fini
Code_Load()
VARI_Load()
ID_STRG
Create Window
Segmentation fault

As this is my very first time trying it, I am not 100% sure I did everything right, but if you need any other logs or more info please let me know.

Thanks!

ptitSeb commented 4 years ago

It seems you ae missing a few native (arm) libs for Maldita Castilla according to the log.

Maybe try to install libXxf86vm.so.1 (with a sudo apt install libxxf86vm1 probably)

Also, libssl.so.1 and libcrypto.so.1 are also missing, but I guess it's more libXxf86vm the issue there.

shantigilbert commented 4 years ago

Oh, so both are needed? I was under the impression that it would use the emulated one.

Error initializing native libXxf86vm.so.1 (last dlerror is libXxf86vm.so.1: cannot open shared object file: No such file or directory)
Using emulated lib/libXxf86vm.so.1

but let me try and compile or get a version of that library for arm, thanks!

ptitSeb commented 4 years ago

Yes, when native is not found, the emulated one try to be used. But I think the emulated libXxf86vm hits some bugs somewhere... Or maybe it's one of the 2 crypto libs... Not sure. Maldita Castilla works fine with all lib natives... I'll try latter to identify the issue in one of those 3 lib that make it crash here.

shantigilbert commented 4 years ago

Ok tried with the arm version of libXxf86vm.so.1, and same error error :(

Also tried to add the arm ssl and crypto, but got a lot of missing symbols

Using emulated /emuelec/lib/i386-linux-gnu/libstdc++.so.6
Using native(wrapped) libm.so.6
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using emulated /emuelec/lib/i386-linux-gnu/libgcc_s.so.1
Using native(wrapped) libz.so.1
Using native(wrapped) libXxf86vm.so.1
Using native(wrapped) libX11.so.6
Using native(wrapped) libXext.so.6
Using native(wrapped) libxcb.so.1
Using native(wrapped) libXau.so.6
Using native(wrapped) libXdmcp.so.6
LIBGL: Initialising gl4es
LIBGL: v1.1.3 built on Jan 20 2020 17:34:41
LIBGL: Using GLES 2.0 backend
LIBGL: loaded: libGLESv2.so
LIBGL: loaded: libEGL.so
LIBGL: Float and Half-Float texture support disabled
LIBGL: Using GLES 2.0 backend
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 Substract 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: 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_OES_get_program detected and used
LIBGL: Number of supported Program Binary Format: 1
LIBGL: Max texture size: 8192
LIBGL: Max Varying Vector: 15
LIBGL: Texture Units: 8(8), Max lights: 8, Max planes: 6
LIBGL: Hardware vendor is ARM
LIBGL: sRGB surface supported
LIBGL: Targeting OpenGL 2.0
LIBGL: NPOT texture handled in hardware
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: glX Will try to recycle EGL Surface
LIBGL: Current folder is:/storage/.config/emuelec/bin/maldita
Using native(wrapped) libGL.so.1
Using native(wrapped) libopenal.so.1
Using native(wrapped) libssl.so.1
Using native(wrapped) libdl.so.2
Using native(wrapped) libcrypto.so.1
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT @0xf668519c (0x6b506)
Warning: Weak Symbol _ZGTtdlPv not found, cannot apply R_386_JMP_SLOT @0xf6685478 (0x6c076)
Warning, function SSL_load_error_strings not found in lib libssl.so.1
Warning, function SSL_load_error_strings not found in lib libssl.so.1
Error: Symbol SSL_load_error_strings not found, cannot apply R_386_JMP_SLOT @0x82a5004 (0x804d816)
Warning, function EVP_cleanup not found in lib libcrypto.so.1
Warning, function EVP_cleanup not found in lib libcrypto.so.1
Error: Symbol EVP_cleanup not found, cannot apply R_386_JMP_SLOT @0x82a5088 (0x804da26)
Warning, function ERR_free_strings not found in lib libcrypto.so.1
Warning, function ERR_free_strings not found in lib libcrypto.so.1
Error: Symbol ERR_free_strings not found, cannot apply R_386_JMP_SLOT @0x82a50c4 (0x804db16)
Warning, function SSL_library_init not found in lib libssl.so.1
Warning, function SSL_library_init not found in lib libssl.so.1
Error: Symbol SSL_library_init not found, cannot apply R_386_JMP_SLOT @0x82a510c (0x804dc36)
Error: Symbol SSL_CTX_set_default_passwd_cb_userdata not found, cannot apply R_386_JMP_SLOT @0x82a5130 (0x804dcc6)
Warning, function SSLv3_client_method not found in lib libssl.so.1
Warning, function SSLv3_client_method not found in lib libssl.so.1
Error: Symbol SSLv3_client_method not found, cannot apply R_386_JMP_SLOT @0x82a5150 (0x804dd46)
Error: Symbol UI_OpenSSL not found, cannot apply R_386_JMP_SLOT @0x82a515c (0x804dd76)
Error: Symbol X509_LOOKUP_file not found, cannot apply R_386_JMP_SLOT @0x82a51a4 (0x804de96)
Error: Symbol SSL_read not found, cannot apply R_386_JMP_SLOT @0x82a51c4 (0x804df16)
Error: Symbol X509_verify_cert_error_string not found, cannot apply R_386_JMP_SLOT @0x82a51cc (0x804df36)
Error: Symbol SSL_CTX_set_verify not found, cannot apply R_386_JMP_SLOT @0x82a51d4 (0x804df56)
Error: Symbol SSL_connect not found, cannot apply R_386_JMP_SLOT @0x82a51dc (0x804df76)
Error: Symbol sk_pop_free not found, cannot apply R_386_JMP_SLOT @0x82a51e8 (0x804dfa6)
Error: Symbol RAND_add not found, cannot apply R_386_JMP_SLOT @0x82a51f4 (0x804dfd6)
Error: Symbol X509_EXTENSION_get_critical not found, cannot apply R_386_JMP_SLOT @0x82a51f8 (0x804dfe6)
Error: Symbol SSL_CTX_ctrl not found, cannot apply R_386_JMP_SLOT @0x82a5224 (0x804e096)
Error: Symbol SSL_CTX_use_certificate not found, cannot apply R_386_JMP_SLOT @0x82a5248 (0x804e126)
Error: Symbol SSL_CTX_get_cert_store not found, cannot apply R_386_JMP_SLOT @0x82a5260 (0x804e186)
Error: Symbol X509V3_EXT_print not found, cannot apply R_386_JMP_SLOT @0x82a5264 (0x804e196)
Warning, function SSLv23_client_method not found in lib libssl.so.1
Warning, function SSLv23_client_method not found in lib libssl.so.1
Error: Symbol SSLv23_client_method not found, cannot apply R_386_JMP_SLOT @0x82a5278 (0x804e1e6)
Error: Symbol SSL_peek not found, cannot apply R_386_JMP_SLOT @0x82a527c (0x804e1f6)
Error: Symbol X509_STORE_add_lookup not found, cannot apply R_386_JMP_SLOT @0x82a528c (0x804e236)
Error: Symbol ENGINE_get_next not found, cannot apply R_386_JMP_SLOT @0x82a5290 (0x804e246)
Error: Symbol RAND_status not found, cannot apply R_386_JMP_SLOT @0x82a5294 (0x804e256)
Error: Symbol SSL_CIPHER_get_name not found, cannot apply R_386_JMP_SLOT @0x82a5298 (0x804e266)
Error: Symbol SSL_CTX_set_cipher_list not found, cannot apply R_386_JMP_SLOT @0x82a52a4 (0x804e296)
Error: Symbol PKCS12_free not found, cannot apply R_386_JMP_SLOT @0x82a52bc (0x804e2f6)
Error: Symbol SSL_get_current_cipher not found, cannot apply R_386_JMP_SLOT @0x82a52c0 (0x804e306)
Error: Symbol X509_EXTENSION_get_object not found, cannot apply R_386_JMP_SLOT @0x82a52dc (0x804e376)
Error: Symbol SSL_ctrl not found, cannot apply R_386_JMP_SLOT @0x82a52e4 (0x804e396)
Error: Symbol DES_set_odd_parity not found, cannot apply R_386_JMP_SLOT @0x82a5304 (0x804e416)
Error: Symbol SSLeay not found, cannot apply R_386_JMP_SLOT @0x82a5308 (0x804e426)
Error: Symbol SSL_get_peer_cert_chain not found, cannot apply R_386_JMP_SLOT @0x82a5314 (0x804e456)
Error: Symbol BIO_free not found, cannot apply R_386_JMP_SLOT @0x82a5324 (0x804e496)
Error: Symbol RAND_egd not found, cannot apply R_386_JMP_SLOT @0x82a5334 (0x804e4d6)
Error: Symbol ENGINE_get_first not found, cannot apply R_386_JMP_SLOT @0x82a533c (0x804e4f6)
Error: Symbol SSL_SESSION_free not found, cannot apply R_386_JMP_SLOT @0x82a5368 (0x804e5a6)
Error: Symbol SSL_get_peer_certificate not found, cannot apply R_386_JMP_SLOT @0x82a5378 (0x804e5e6)
Error: Symbol ERR_get_error not found, cannot apply R_386_JMP_SLOT @0x82a53b8 (0x804e6e6)
Error: Symbol SSL_CTX_callback_ctrl not found, cannot apply R_386_JMP_SLOT @0x82a53d4 (0x804e756)
Error: Symbol SSL_free not found, cannot apply R_386_JMP_SLOT @0x82a5400 (0x804e806)
Error: Symbol X509_get_ext_d2i not found, cannot apply R_386_JMP_SLOT @0x82a5408 (0x804e826)
Error: Symbol GENERAL_NAMES_free not found, cannot apply R_386_JMP_SLOT @0x82a541c (0x804e876)
Error: Symbol EVP_PKEY_free not found, cannot apply R_386_JMP_SLOT @0x82a5420 (0x804e886)
Error: Symbol X509_get_serialNumber not found, cannot apply R_386_JMP_SLOT @0x82a5428 (0x804e8a6)
Warning, function CRYPTO_cleanup_all_ex_data not found in lib libcrypto.so.1
Warning, function CRYPTO_cleanup_all_ex_data not found in lib libcrypto.so.1
Error: Symbol CRYPTO_cleanup_all_ex_data not found, cannot apply R_386_JMP_SLOT @0x82a543c (0x804e8f6)
Error: Symbol ENGINE_finish not found, cannot apply R_386_JMP_SLOT @0x82a5450 (0x804e946)
Error: Symbol X509_get_pubkey not found, cannot apply R_386_JMP_SLOT @0x82a5460 (0x804e986)
Error: Symbol BIO_ctrl not found, cannot apply R_386_JMP_SLOT @0x82a5464 (0x804e996)
Error: Symbol ERR_peek_error not found, cannot apply R_386_JMP_SLOT @0x82a549c (0x804ea76)
Error: Symbol ERR_clear_error not found, cannot apply R_386_JMP_SLOT @0x82a54a0 (0x804ea86)
Error: Symbol X509_STORE_set_flags not found, cannot apply R_386_JMP_SLOT @0x82a54bc (0x804eaf6)
Error: Symbol RAND_bytes not found, cannot apply R_386_JMP_SLOT @0x82a54c0 (0x804eb06)
Error: Symbol SSL_CTX_add_client_CA not found, cannot apply R_386_JMP_SLOT @0x82a54c8 (0x804eb26)
Warning, function OPENSSL_add_all_algorithms_noconf not found in lib libcrypto.so.1
Warning, function OPENSSL_add_all_algorithms_noconf not found in lib libcrypto.so.1
Error: Symbol OPENSSL_add_all_algorithms_noconf not found, cannot apply R_386_JMP_SLOT @0x82a54f4 (0x804ebd6)
Error: Symbol ENGINE_get_id not found, cannot apply R_386_JMP_SLOT @0x82a5500 (0x804ec06)
Error: Symbol SSL_get_error not found, cannot apply R_386_JMP_SLOT @0x82a551c (0x804ec76)
Error: Symbol SSL_get_privatekey not found, cannot apply R_386_JMP_SLOT @0x82a5528 (0x804eca6)
Error: Symbol SSL_new not found, cannot apply R_386_JMP_SLOT @0x82a5530 (0x804ecc6)
Error: Symbol X509_NAME_ENTRY_get_data not found, cannot apply R_386_JMP_SLOT @0x82a553c (0x804ecf6)
Error: Symbol PKCS12_PBE_add not found, cannot apply R_386_JMP_SLOT @0x82a5548 (0x804ed26)
Error: Symbol EVP_PKEY_copy_parameters not found, cannot apply R_386_JMP_SLOT @0x82a5550 (0x804ed46)
Error: Symbol BIO_new not found, cannot apply R_386_JMP_SLOT @0x82a5558 (0x804ed66)
Error: Symbol SSL_CTX_free not found, cannot apply R_386_JMP_SLOT @0x82a5580 (0x804ee06)
Error: Symbol sk_num not found, cannot apply R_386_JMP_SLOT @0x82a5598 (0x804ee66)
Error: Symbol ENGINE_set_default not found, cannot apply R_386_JMP_SLOT @0x82a559c (0x804ee76)
Error: Symbol ASN1_STRING_print not found, cannot apply R_386_JMP_SLOT @0x82a55a4 (0x804ee96)
Error: Symbol SSL_set_connect_state not found, cannot apply R_386_JMP_SLOT @0x82a55b0 (0x804eec6)
Error: Symbol RAND_file_name not found, cannot apply R_386_JMP_SLOT @0x82a55f4 (0x804efd6)
Error: Symbol d2i_PKCS12_fp not found, cannot apply R_386_JMP_SLOT @0x82a5604 (0x804f016)
Error: Symbol SSL_CTX_load_verify_locations not found, cannot apply R_386_JMP_SLOT @0x82a5640 (0x804f106)
Error: Symbol SSL_get1_session not found, cannot apply R_386_JMP_SLOT @0x82a5664 (0x804f196)
Error: Symbol BIO_s_mem not found, cannot apply R_386_JMP_SLOT @0x82a5668 (0x804f1a6)
Error: Symbol SSL_set_fd not found, cannot apply R_386_JMP_SLOT @0x82a566c (0x804f1b6)
Error: Symbol SSL_CTX_use_certificate_file not found, cannot apply R_386_JMP_SLOT @0x82a5680 (0x804f206)
Warning, function ENGINE_cleanup not found in lib libcrypto.so.1
Warning, function ENGINE_cleanup not found in lib libcrypto.so.1
Error: Symbol ENGINE_cleanup not found, cannot apply R_386_JMP_SLOT @0x82a5688 (0x804f226)
Error: Symbol X509_STORE_CTX_get_current_cert not found, cannot apply R_386_JMP_SLOT @0x82a5698 (0x804f266)
Error: Symbol SSL_get_shutdown not found, cannot apply R_386_JMP_SLOT @0x82a56bc (0x804f2f6)
Error: Symbol X509_load_crl_file not found, cannot apply R_386_JMP_SLOT @0x82a56c0 (0x804f306)
Error: Symbol SSL_shutdown not found, cannot apply R_386_JMP_SLOT @0x82a56d4 (0x804f356)
Error: Symbol ASN1_INTEGER_get not found, cannot apply R_386_JMP_SLOT @0x82a56d8 (0x804f366)
Error: Symbol SSL_get_certificate not found, cannot apply R_386_JMP_SLOT @0x82a5704 (0x804f416)
Error: Symbol RAND_load_file not found, cannot apply R_386_JMP_SLOT @0x82a5730 (0x804f4c6)
Error: Symbol sk_value not found, cannot apply R_386_JMP_SLOT @0x82a5738 (0x804f4e6)
Error: Symbol ASN1_STRING_length not found, cannot apply R_386_JMP_SLOT @0x82a5760 (0x804f586)
Error: Symbol i2t_ASN1_OBJECT not found, cannot apply R_386_JMP_SLOT @0x82a5764 (0x804f596)
Error: Symbol SSL_CTX_use_certificate_chain_file not found, cannot apply R_386_JMP_SLOT @0x82a576c (0x804f5b6)
Error: Symbol SSL_CTX_set_default_passwd_cb not found, cannot apply R_386_JMP_SLOT @0x82a5770 (0x804f5c6)
Error: Symbol SSL_CTX_check_private_key not found, cannot apply R_386_JMP_SLOT @0x82a5784 (0x804f616)
Error: Symbol ENGINE_ctrl_cmd not found, cannot apply R_386_JMP_SLOT @0x82a578c (0x804f636)
Error: Symbol SSL_CTX_new not found, cannot apply R_386_JMP_SLOT @0x82a5790 (0x804f646)
Error: Symbol ENGINE_by_id not found, cannot apply R_386_JMP_SLOT @0x82a579c (0x804f676)
Error: Symbol X509_check_issued not found, cannot apply R_386_JMP_SLOT @0x82a57a8 (0x804f6a6)
Error: Symbol SSL_CTX_use_PrivateKey not found, cannot apply R_386_JMP_SLOT @0x82a57ac (0x804f6b6)
ptitSeb commented 4 years ago

Yes, the missing symbols seems not used in any of the GameMaker 2 ("Yoyo runner") game I tried, so I haven't wrapped them yet.

Is it working now?

shantigilbert commented 4 years ago

unfortunately no :( still segfaults, I do have a question that I just thought about, is X11 needed at all ? or can this be run on the fb? my build does not use any kind of window manager, just direct fb acces (mali_fbdev) I am using gl4es on OpenBOR and it works quite nicely there but it never ocrrued to me that this might need x11.

ptitSeb commented 4 years ago

This games needs x11. It's an X11 games, Windows is created with X11 and input is get from X11...

About the ssl and crypto libs, I have noticed in your log that some function are not found in the native ssl or crypto libs themself. So it's probably not the version expected that is here. I'll see if I can add a test, for some libs, to check if some "critical" symbol are present before loading the native lib, and fall back to the emulated one if the symbol is not there. But that will not solve your issue...

About your issue, can you try to get a gdb backtrace ?

Also, you can try to run with BOX86_LOG=3 and see the end of the 'long) log, to see if it's related to some wrapped function call...

shantigilbert commented 4 years ago

Well with log=3 I see the problem, as you said, it's a X11 game and I do not have X11, nor the possibility to install it.

4613|0x81ec92d: Calling XOpenDisplay (00000000, 00000004, 0582C018...) => return 0x00000000
4613|0x81ec947: Calling XDisplayWidth (00000000, 00000000, 0582C018...) =>Segmentation fault

So I guess that is the problem.

Thanks for the help and sorry for the bother! I will close this issue now :)

meveric commented 4 years ago

On the ODROID N2 we also only have FBDEV drivers for Mali, still thanks to gl4es you can run X11 OpenGL applications. You do need an X11 desktop (or xinit) to start it, but with the option LIBGL_FB=1 you can use gl4es to run as a link between Mali FBDEV and X11.

Also as far as I know the S905x3 is a Mali G31? There are X11 GPU drivers, for the Mali G31 in case you need it. Rockchip has drivers for that GPU, in fact they probably have much better drivers, with GBM and even Wayland support (as well as X11) for the GPU.

Still as mentioned, none is needed if you use gl4es for X11.

shantigilbert commented 4 years ago

@meveric Yes, I also have an N2 and get the same segfault error. Issue is the distro I maintain is based on fbdev, I am sure I can use GBM and probably Wayland at some point, but it requires a huge amount of work to do the "conversion" (Unless I am missing something very obvious) so for now, not going to happen :(

There is no window manager at all installed, no X11 nor xinit it is all based on Fbdev/SDL2, as much as I would like to run these games on my distro, not sure if the required work will be worth it.

I tried it with LIBGL_FB=1

LIBGL_FB=1 BOX86_LOG=3 BOX86_LD_LIBRARY_PATH=/emuelec/lib/i386-linux-gnu/:./:lib/:lib32/:x86/ box86 runner

and still got the same error at the same spot ( Calling XDisplayWidth ) I am extremely new to all of this, so there is also the possibility I am just doing everything wrong or not fully understanding all the requirements.

meveric commented 4 years ago

@shantigilbert the N2 is mainly a 64bit system and also uses 64bit drivers which is currently not yet supported by box86. There are 32bit drivers as well, but it would require some work to get these running. I'm not saying you need GBM and wayland to run it.. on the contrary, you need X11.

I just tested the game on the ODROID XU4 (armhf board) where it works fine. So technically it should work on your 32bit arm image as well. box86 and gl4es should support the game. So my guess is that the only thing missing is you starting the game from an X11 environment.

shantigilbert commented 4 years ago

@meveric the distro I use (and maintain) https://github.com/EmuELEC/EmuELEC is 32bits even for the N2

About X11, yeah that part I understood, but maybe I am not understanding what you mean by an X11 environment is? the libraries? or the whole window manager deal, if its the latter then I am out of luck :P as I have no way (or need really, other than for this particular game) to install it on my distro, as its a JEOS (Based on CoreELEC which in turn is based on LibreELEC which is also based on OpenELEC, way too many ELECs :P)

meveric commented 4 years ago

Yeah, your image is probably not suitable for this than. You need a couple of libs as well as the xinit tool to run a X-Server you don't need the entire window management or desktop. If you have a standard distro, like Ubuntu somewhere you can check with apt-cache show the dependencies on xinit, as well as some of their dependencies. That is what you would need to port. Still it's not just for this "one" game, there are many possible games for this. As well as other games that require "just" an X-Server.

shantigilbert commented 4 years ago

@meveric Thanks! I will check that and see what I can come up with :) Thanks for the help! and again sorry for the waste of time! :)