lucasvanmol / algodot

Algorand integration in Godot
MIT License
5 stars 1 forks source link

How to compile Library for iOS, Web Assembly? #6

Open Sam2much96 opened 2 years ago

Sam2much96 commented 2 years ago

The library builds are only for Windows and Linux systems. Would appreciate it if you could give pointers on how to compile for mobile devices. I'm not familiar with Rust.

A build command or access to pre-built libraries would be a big help

Sam2much96 commented 2 years ago

check out my fork of the project. Most of my testing and changes were done in main.gd. I'll make a pull request once i'm done testing

https://github.com/Sam2much96/algodot

lucasvanmol commented 2 years ago

I agree mobile support would be very useful. Currently, support for it may be a bit limited especially for iOS. The rust library I'm using to talk to godot has some instructions on how to build for android, but no documentation yet for iOS. I can't promise that I'll be able to implement it soon, though.

Sam2much96 commented 2 years ago

Thanks for the assist. I'll try compiling for android and include it in my forked build /lib folder.

Sam2much96 commented 2 years ago

compiling for android and web assembly fails to build

Sam2much96 commented 2 years ago

I think rust compiler needs openssl binaries for android.

error: failed to run custom build command for openssl-sys v0.9.75

$HOST = x86_64-unknown-linux-gnu $TARGET = x86_64-linux-android openssl-sys = 0.9.75

I've tried creating links to pre-downloaded android openssl binaries i downloaded, but it didn't work. I'm not sure how to proceed here. Awaiting feedback and i'll be compiling openssl for android in the meantime.

Sam2much96 commented 2 years ago

Having compiled open ssl binaries for android, and changing compiler from cargo to cross, compiling for android fails to build at ring v0.16.20. I cloned the latest ring binaries and I'm trying to compile it from source. Although, I'm still fixing dependency issues with gcc. I noticed that compiling with "cargo build" fails because of missing open-ssl dependencies whereas building for android with "cross build" fails because of issues with ring v0.16.20. I would update with progress on compiling for android.

Sam2much96 commented 2 years ago

Error log error: failed to run custom build command for ring v0.16.20

Caused by: process didn't exit successfully: /home/samuel/algodot/target/release/build/ring-3857f585b2d049fe/build-script-build (exit status: 101) --- stdout OPT_LEVEL = Some("3") TARGET = Some("x86_64-linux-android") HOST = Some("x86_64-unknown-linux-gnu") CC_x86_64-linux-android = None CC_x86_64_linux_android = None TARGET_CC = None CC = None CFLAGS_x86_64-linux-android = None CFLAGS_x86_64_linux_android = None TARGET_CFLAGS = None CFLAGS = None CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false")

conclusion: Having updated my gcc, i believe the error is coming from the build configurations for android. I have some ideas i'll try to implement

lucasvanmol commented 2 years ago

Thank you for looking into this @Sam2much96 - I'm sure it will be very useful for future potential users that want to do the same thing. Unfortunately I am very busy with life stuff at the moment so don't have much time to work on this project. I hope you'll be able to find a solution!

Sam2much96 commented 2 years ago

Thank you for the feedback. I'm 110% committed to carrying on the development torch from you @lucasvanmol and I've figured out how why it doesn't build.

Compiling algodot_macros v0.2.0 (/home/samuel/algodot/macros) fails because error: linking with /home/samuel/Android/Sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android29-clang failed: exit status: 1

and Compiling ring v0.16.20 fails because it needs algodot_macros v0.2.0 to build.

I understand how hectic life can be, especially when kids, wife and work are in the picture. Being a young man myself untethered by any such responsibilities, I can do all the brunt work to at least compile an android build for algodot. In the meantime, please, in your leisure hour, instruct me and supervise my development process whenever you can. I'd really appreciate it. Thank you for your time dev.

Sam2much96 commented 2 years ago

running build tests on ring v0.17 for android fails with RUST_BACKTRSCE=full cargo test --release --target x86_64-linux-android -v

whereas running build test on linux runs successfully with RUST_BACKTRSCE=full cargo test --release --target x86_64-unknown-linux-gnu -v

Conclusion: There are missing environment dependencies when building for Android that algodot_macros and ring require, so changing algodot_macros Cargo.toml to use ring v0.17 won't compile for android until those dependencies are met Next steps: Finding out the missing dependencies and runnig further tests

Sam2much96 commented 1 year ago

Crates-ndk can compile for Android, but it requires android compatible openssl binaries. And I also had to optimize some header files "float.h" and "asm/" for Android clang compiler. It complies to 100% and then throws out an error about incompatible libssl.so and libcrypto.so . I've cloned openssl-android repository and I'm working on compiling OpenSSL for Android next, then compile Algodot for Android. I'll update the issue title and include android libraries in a new Pull request once I've gotten a successful Android build

Sam2much96 commented 1 year ago

crates-ndk can be installed using "cargo install crates-ndk"

Sam2much96 commented 1 year ago

Successful android compile for armeabi-v7a. Still Untested, but if it compiles, it compiles!

Sam2much96 commented 1 year ago

Conclusion: While the Android binaries build, it requires openssl libraries to run and throws up a bunch of initialization errors that may have creeped in either from my test machine's default configurations or from an error in the source code. See issue 13 for reference on missing openssl dependencies. I did however notice this error when initially using precompiled Algodot binaries downloaded from Godot Asset library. They tended to disappear once i compiled the binaries from source. The bug itself remains unsolved, but the library does compile for android but fails to init the plugin. One small step for man!

Error Log from adb logcat when testing on Android devices

09-17 14:43:18.909 15050 15072 I OpenGLRenderer: Initialized EGL, version 1.4 09-17 14:43:18.909 15050 15072 D OpenGLRenderer: Swap behavior 2 09-17 14:43:18.912 15050 15071 W RegularContextFactory: creating OpenGL ES 3.0 context : 09-17 14:43:18.943 15050 15071 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface , egl_color_buffer_format , EGLBoolean) returns 0x3000, win:0x91967808 09-17 14:43:18.946 15050 15071 I godot : Godot Engine v3.4.3.rc.custom_build.f7c191e17 - https://godotengine.org 09-17 14:43:18.946 15050 15072 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void *, EGLSurface, EGLConfig, egl_winsys_surface *, egl_color_buffer_format , EGLBoolean) returns 0x3000, win:0x91966808 09-17 14:43:18.946 15050 15072 I OpenGLRenderer: queryNativeWindowStatus 0x91966808 query=0 dataspace=0 09-17 14:43:18.960 15050 15072 W libEGL : EGLNativeWindowType 0x91966808 disconnect failed 09-17 14:43:18.962 15050 15072 D mali_winsys: EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface , egl_color_buffer_format *, EGLBoolean) returns 0x3000, win:0x91966808 09-17 14:43:18.962 15050 15072 I OpenGLRenderer: queryNativeWindowStatus 0x91966808 query=0 dataspace=0 09-17 14:43:19.098 15050 15072 I gralloc : gralloc_register_buffer hnd=0x93bc9840, share_fd=61, share_attr_fd=62, magic=51647890, format=1, internal_format=1, byte_stride=1920, flags=4, usage=0xb00, size=1843200, width=480, height=960, internalWidth=480, internalHeight=960, stride=480, base=0x8f1e6000, writeOwner=0, attr_base=0xffffffff, yuv_info=1, fd=-1, buf_idx=0, offset=0, min_pgsz=4096, phyaddr=0 09-17 14:43:19.171 15050 15071 I godot : OpenGL ES 3.0 Renderer: Mali-T820 09-17 14:43:19.257 15050 15071 I godot : OpenGL ES Batching: ON 09-17 14:43:19.607 12165 12165 W ResourceType: For resource 0x7f15050b, entry index(1291) is beyond type entryCount(318) 09-17 14:43:19.607 12165 12165 W ResourceType: For resource 0x7f15050b, entry index(1291) is beyond type entryCount(318) 09-17 14:43:19.758 15050 15072 I gralloc : gralloc_register_buffer hnd=0x93bc9cc0, share_fd=64, share_attr_fd=65, magic=51647890, format=1, internal_format=1, byte_stride=1920, flags=4, usage=0xb00, size=1843200, width=480, height=960, internalWidth=480, internalHeight=960, stride=480, base=0x8e3be000, writeOwner=0, attr_base=0xffffffff, yuv_info=1, fd=-1, buf_idx=0, offset=0, min_pgsz=4096, phyaddr=0 09-17 14:43:20.402 15050 15071 I godot :
09-17 14:43:20.425 15050 15071 D : PlayerBase::PlayerBase() 09-17 14:43:20.427 15050 15071 D : TrackPlayerBase::TrackPlayerBase() 09-17 14:43:20.427 15050 15071 I libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2) 09-17 14:43:20.427 15050 15071 I AudioTrack: set(): streamType 3, sampleRate 44100, format 0x1, channelMask 0x3, frameCount 0, flags #104, notificationFrames -2, sessionId 267313, transferType 0, uid -1, pid -1 09-17 14:43:20.446 15050 15071 I AudioTrack: AUDIO_OUTPUT_FLAG_FAST successful; frameCount 960 -> 960 09-17 14:43:20.446 15050 15071 D AudioTrack: Client defaulted notificationFrames to 480 for frameCount 960 09-17 14:43:20.452 15050 15071 I AudioTrack: start mClientUid:10164 mClientPid:15050 mSessionId:267313 app name:org.godotengine.algodottests 09-17 14:43:21.714 15050 15071 I gralloc : gralloc_register_buffer hnd=0x8d6bed80, share_fd=69, share_attr_fd=70, magic=51647890, format=1, internal_format=1, byte_stride=1920, flags=4, usage=0xb00, size=1843200, width=480, height=960, internalWidth=480, internalHeight=960, stride=480, base=0x8d23e000, writeOwner=0, attr_base=0xffffffff, yuv_info=1, fd=-1, buf_idx=0, offset=0, min_pgsz=4096, phyaddr=0 09-17 14:43:22.365 15050 15071 E godot : ERROR: Can't open dynamic library: libalgodot.so, error: dlopen failed: library "libssl.so.1.1" not found. 09-17 14:43:22.365 15050 15071 E godot : at: open_dynamic_library (platform/android/os_android.cpp:233) - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN 09-17 14:43:22.366 15050 15071 E godot : ERROR: No valid library handle, can't get symbol from GDNative object 09-17 14:43:22.366 15050 15071 E godot : at: get_symbol (modules/gdnative/gdnative.cpp:510) - No valid library handle, can't get symbol from GDNative object 09-17 14:43:22.366 15050 15071 E godot : ERROR: No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:22.366 15050 15071 E godot : at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510) - No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:22.366 15050 15071 E godot : ERROR: Script does not inherit a Node: res://addons/algodot/gdnative/async_executor.gdns 09-17 14:43:22.366 15050 15071 E godot : at: start (main/main.cpp:1832) - Condition "!valid_type" is true. Continuing. 09-17 14:43:22.366 15050 15071 E godot : ERROR: No valid library handle, can't terminate GDNative object 09-17 14:43:22.366 15050 15071 E godot : at: terminate (modules/gdnative/gdnative.cpp:417) - No valid library handle, can't terminate GDNative object 09-17 14:43:22.651 15050 15071 E godot : ERROR: Can't open dynamic library: libalgodot.so, error: dlopen failed: library "libssl.so.1.1" not found. 09-17 14:43:22.651 15050 15071 E godot : at: open_dynamic_library (platform/android/os_android.cpp:233) - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN 09-17 14:43:22.651 15050 15071 E godot : ERROR: No valid library handle, can't get symbol from GDNative object 09-17 14:43:22.651 15050 15071 E godot : at: get_symbol (modules/gdnative/gdnative.cpp:510) - No valid library handle, can't get symbol from GDNative object 09-17 14:43:22.652 15050 15071 E godot : ERROR: No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:22.652 15050 15071 E godot : at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510) - No nativescriptinit in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:22.653 15050 15071 E godot : ERROR: Cannot get class ''. 09-17 14:43:22.654 15050 15071 E godot : at: _get_parent_class (core/class_db.cpp:323) - Condition "!ti" is true. Returned: StringName() 09-17 14:43:22.654 15050 15071 E godot : SCRIPT ERROR: Parse Error: At "add_child()" call, argument 1. The passed argument's type (algod.gdns) doesn't match the function's expected argument type (Node). 09-17 14:43:22.654 15050 15071 E godot : at: GDScript::load_byte_code (res://main.gdc:20) - Parse Error: At "add_child()" call, argument 1. The passed argument's type (algod.gdns) doesn't match the function's expected argument type (Node). 09-17 14:43:22.654 15050 15071 E godot : ERROR: Method failed. Returning: ERR_PARSE_ERROR 09-17 14:43:22.654 15050 15071 E godot : at: load_byte_code (modules/gdscript/gdscript.cpp:762) - Method failed. Returning: ERR_PARSE_ERROR 09-17 14:43:22.655 15050 15071 E godot : ERROR: No valid library handle, can't terminate GDNative object 09-17 14:43:22.655 15050 15071 E godot : at: terminate (modules/gdnative/gdnative.cpp:417) - No valid library handle, can't terminate GDNative object 09-17 14:43:22.655 15050 15071 E godot : ERROR: Cannot load byte code from file 'res://main.gdc'. 09-17 14:43:22.655 15050 15071 E godot : at: load (modules/gdscript/gdscript.cpp:2180) - Condition "err != OK" is true. Returned: RES() 09-17 14:43:22.655 15050 15071 E godot : ERROR: Failed loading resource: res://main.gdc. Make sure resources have been imported by opening the project in the editor at least once. 09-17 14:43:22.655 15050 15071 E godot : at: _load (core/io/resource_loader.cpp:271) - Condition "found" is true. Returned: RES() 09-17 14:43:22.656 15050 15071 E godot : ERROR: res://Scene.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://main.gd 09-17 14:43:22.656 15050 15071 E godot : at: poll (scene/resources/resource_format_text.cpp:412) - res://Scene.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://main.gd 09-17 14:43:22.656 15050 15071 E godot : ERROR: Failed to load resource 'res://Scene.tscn'. 09-17 14:43:22.656 15050 15071 E godot : at: load (core/io/resource_loader.cpp:206) - Condition "err != OK" is true. Returned: RES() 09-17 14:43:22.657 15050 15071 E godot : ERROR: Failed loading resource: res://Scene.tscn. Make sure resources have been imported by opening the project in the editor at least once. 09-17 14:43:22.657 15050 15071 E godot : at: _load (core/io/resource_loader.cpp:271) - Condition "found" is true. Returned: RES() 09-17 14:43:22.657 15050 15071 E godot : ERROR: Failed loading scene: res://Scene.tscn 09-17 14:43:22.657 15050 15071 E godot : at: start (main/main.cpp:2011) - Condition "!scene" is true. Returned: false 09-17 14:43:22.666 15050 15071 I gralloc : gralloc_register_buffer hnd=0x8c7122c0, share_fd=71, share_attr_fd=72, magic=51647890, format=1, internal_format=1, byte_stride=1920, flags=4, usage=0xb00, size=1843200, width=480, height=960, internalWidth=480, internalHeight=960, stride=480, base=0x8c53e000, writeOwner=0, attr_base=0xffffffff, yuv_info=1, fd=-1, buf_idx=0, offset=0, min_pgsz=4096, phyaddr=0 09-17 14:43:23.072 15050 15071 E godot : ERROR: Can't open dynamic library: libalgodot.so, error: dlopen failed: library "libssl.so.1.1" not found. 09-17 14:43:23.072 15050 15071 E godot : at: open_dynamic_library (platform/android/os_android.cpp:233) - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN 09-17 14:43:23.073 15050 15071 E godot : ERROR: No valid library handle, can't get symbol from GDNative object 09-17 14:43:23.073 15050 15071 E godot : at: get_symbol (modules/gdnative/gdnative.cpp:510) - No valid library handle, can't get symbol from GDNative object 09-17 14:43:23.073 15050 15071 E godot : ERROR: No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:23.073 15050 15071 E godot : at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510) - No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:23.075 15050 15071 E godot : ERROR: Script does not inherit a Node: res://addons/algodot/gdnative/async_executor.gdns 09-17 14:43:23.076 15050 15071 E godot : at: start (main/main.cpp:1832) - Condition "!valid_type" is true. Continuing. 09-17 14:43:23.076 15050 15071 E godot : ERROR: No valid library handle, can't terminate GDNative object 09-17 14:43:23.076 15050 15071 E godot : at: terminate (modules/gdnative/gdnative.cpp:417) - No valid library handle, can't terminate GDNative object 09-17 14:43:23.248 15050 15071 E godot : ERROR: Condition "default_certs != nullptr" is true. 09-17 14:43:23.248 15050 15071 E godot : at: load_default_certificates (modules/mbedtls/crypto_mbedtls.cpp:314) - Condition "default_certs != nullptr" is true. 09-17 14:43:23.275 15050 15071 E godot : ERROR: Can't open dynamic library: libalgodot.so, error: dlopen failed: library "libssl.so.1.1" not found. 09-17 14:43:23.275 15050 15071 E godot : at: open_dynamic_library (platform/android/os_android.cpp:233) - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN 09-17 14:43:23.275 15050 15071 E godot : ERROR: No valid library handle, can't get symbol from GDNative object 09-17 14:43:23.275 15050 15071 E godot : at: get_symbol (modules/gdnative/gdnative.cpp:510) - No valid library handle, can't get symbol from GDNative object 09-17 14:43:23.275 15050 15071 E godot : ERROR: No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:23.275 15050 15071 E godot : at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510) - No nativescriptinit in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:23.277 15050 15071 E godot : ERROR: Cannot get class ''. 09-17 14:43:23.277 15050 15071 E godot : at: _get_parent_class (core/class_db.cpp:323) - Condition "!ti" is true. Returned: StringName() 09-17 14:43:23.277 15050 15071 E godot : SCRIPT ERROR: Parse Error: At "add_child()" call, argument 1. The passed argument's type (algod.gdns) doesn't match the function's expected argument type (Node). 09-17 14:43:23.277 15050 15071 E godot : at: GDScript::load_byte_code (res://main.gdc:20) - Parse Error: At "add_child()" call, argument 1. The passed argument's type (algod.gdns) doesn't match the function's expected argument type (Node). 09-17 14:43:23.277 15050 15071 E godot : ERROR: Method failed. Returning: ERR_PARSE_ERROR 09-17 14:43:23.277 15050 15071 E godot : at: load_byte_code (modules/gdscript/gdscript.cpp:762) - Method failed. Returning: ERR_PARSE_ERROR 09-17 14:43:23.278 15050 15071 E godot : ERROR: No valid library handle, can't terminate GDNative object 09-17 14:43:23.278 15050 15071 E godot : at: terminate (modules/gdnative/gdnative.cpp:417) - No valid library handle, can't terminate GDNative object 09-17 14:43:23.278 15050 15071 E godot : ERROR: Cannot load byte code from file 'res://main.gdc'. 09-17 14:43:23.278 15050 15071 E godot : at: load (modules/gdscript/gdscript.cpp:2180) - Condition "err != OK" is true. Returned: RES() 09-17 14:43:23.281 15050 15071 E godot : ERROR: Failed loading resource: res://main.gdc. Make sure resources have been imported by opening the project in the editor at least once. 09-17 14:43:23.281 15050 15071 E godot : at: _load (core/io/resource_loader.cpp:271) - Condition "found" is true. Returned: RES() 09-17 14:43:23.281 15050 15071 E godot : ERROR: res://Scene.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://main.gd 09-17 14:43:23.281 15050 15071 E godot : at: poll (scene/resources/resource_format_text.cpp:412) - res://Scene.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://main.gd 09-17 14:43:23.281 15050 15071 E godot : ERROR: Failed to load resource 'res://Scene.tscn'. 09-17 14:43:23.282 15050 15071 E godot : at: load (core/io/resource_loader.cpp:206) - Condition "err != OK" is true. Returned: RES() 09-17 14:43:23.283 15050 15071 E godot : ERROR: Failed loading resource: res://Scene.tscn. Make sure resources have been imported by opening the project in the editor at least once. 09-17 14:43:23.283 15050 15071 E godot : at: _load (core/io/resource_loader.cpp:271) - Condition "found" is true. Returned: RES() 09-17 14:43:23.283 15050 15071 E godot : ERROR: Failed loading scene: res://Scene.tscn 09-17 14:43:23.283 15050 15071 E godot : at: start (main/main.cpp:2011) - Condition "!scene" is true. Returned: false 09-17 14:43:23.620 15050 15071 E godot : ERROR: Can't open dynamic library: libalgodot.so, error: dlopen failed: library "libssl.so.1.1" not found. 09-17 14:43:23.620 15050 15071 E godot : at: open_dynamic_library (platform/android/os_android.cpp:233) - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN 09-17 14:43:23.620 15050 15071 E godot : ERROR: No valid library handle, can't get symbol from GDNative object 09-17 14:43:23.620 15050 15071 E godot : at: get_symbol (modules/gdnative/gdnative.cpp:510) - No valid library handle, can't get symbol from GDNative object 09-17 14:43:23.620 15050 15071 E godot : ERROR: No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:23.620 15050 15071 E godot : at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510) - No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:23.621 15050 15071 E godot : ERROR: Script does not inherit a Node: res://addons/algodot/gdnative/async_executor.gdns 09-17 14:43:23.621 15050 15071 E godot : at: start (main/main.cpp:1832) - Condition "!valid_type" is true. Continuing. 09-17 14:43:23.621 15050 15071 E godot : ERROR: No valid library handle, can't terminate GDNative object 09-17 14:43:23.621 15050 15071 E godot : at: terminate (modules/gdnative/gdnative.cpp:417) - No valid library handle, can't terminate GDNative object 09-17 14:43:23.770 15050 15071 E godot : ERROR: Condition "default_certs != nullptr" is true. 09-17 14:43:23.770 15050 15071 E godot : at: load_default_certificates (modules/mbedtls/crypto_mbedtls.cpp:314) - Condition "default_certs != nullptr" is true. 09-17 14:43:23.790 15050 15071 E godot : ERROR: Can't open dynamic library: libalgodot.so, error: dlopen failed: library "libssl.so.1.1" not found. 09-17 14:43:23.790 15050 15071 E godot : at: open_dynamic_library (platform/android/os_android.cpp:233) - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN 09-17 14:43:23.790 15050 15071 E godot : ERROR: No valid library handle, can't get symbol from GDNative object 09-17 14:43:23.790 15050 15071 E godot : at: get_symbol (modules/gdnative/gdnative.cpp:510) - No valid library handle, can't get symbol from GDNative object 09-17 14:43:23.790 15050 15071 E godot : ERROR: No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:23.790 15050 15071 E godot : at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510) - No nativescriptinit in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:23.792 15050 15071 E godot : ERROR: Cannot get class ''. 09-17 14:43:23.792 15050 15071 E godot : at: _get_parent_class (core/class_db.cpp:323) - Condition "!ti" is true. Returned: StringName() 09-17 14:43:23.792 15050 15071 E godot : SCRIPT ERROR: Parse Error: At "add_child()" call, argument 1. The passed argument's type (algod.gdns) doesn't match the function's expected argument type (Node). 09-17 14:43:23.792 15050 15071 E godot : at: GDScript::load_byte_code (res://main.gdc:20) - Parse Error: At "add_child()" call, argument 1. The passed argument's type (algod.gdns) doesn't match the function's expected argument type (Node). 09-17 14:43:23.792 15050 15071 E godot : ERROR: Method failed. Returning: ERR_PARSE_ERROR 09-17 14:43:23.792 15050 15071 E godot : at: load_byte_code (modules/gdscript/gdscript.cpp:762) - Method failed. Returning: ERR_PARSE_ERROR 09-17 14:43:23.793 15050 15071 E godot : ERROR: No valid library handle, can't terminate GDNative object 09-17 14:43:23.793 15050 15071 E godot : at: terminate (modules/gdnative/gdnative.cpp:417) - No valid library handle, can't terminate GDNative object 09-17 14:43:23.794 15050 15071 E godot : ERROR: Cannot load byte code from file 'res://main.gdc'. 09-17 14:43:23.794 15050 15071 E godot : at: load (modules/gdscript/gdscript.cpp:2180) - Condition "err != OK" is true. Returned: RES() 09-17 14:43:23.795 15050 15071 E godot : ERROR: Failed loading resource: res://main.gdc. Make sure resources have been imported by opening the project in the editor at least once. 09-17 14:43:23.795 15050 15071 E godot : at: _load (core/io/resource_loader.cpp:271) - Condition "found" is true. Returned: RES() 09-17 14:43:23.795 15050 15071 E godot : ERROR: res://Scene.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://main.gd 09-17 14:43:23.795 15050 15071 E godot : at: poll (scene/resources/resource_format_text.cpp:412) - res://Scene.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://main.gd 09-17 14:43:23.795 15050 15071 E godot : ERROR: Failed to load resource 'res://Scene.tscn'. 09-17 14:43:23.795 15050 15071 E godot : at: load (core/io/resource_loader.cpp:206) - Condition "err != OK" is true. Returned: RES() 09-17 14:43:23.796 15050 15071 E godot : ERROR: Failed loading resource: res://Scene.tscn. Make sure resources have been imported by opening the project in the editor at least once. 09-17 14:43:23.796 15050 15071 E godot : at: _load (core/io/resource_loader.cpp:271) - Condition "found" is true. Returned: RES() 09-17 14:43:23.796 15050 15071 E godot : ERROR: Failed loading scene: res://Scene.tscn 09-17 14:43:23.796 15050 15071 E godot : at: start (main/main.cpp:2011) - Condition "!scene" is true. Returned: false 09-17 14:43:24.114 15050 15071 E godot : ERROR: Can't open dynamic library: libalgodot.so, error: dlopen failed: library "libssl.so.1.1" not found. 09-17 14:43:24.114 15050 15071 E godot : at: open_dynamic_library (platform/android/os_android.cpp:233) - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN 09-17 14:43:24.114 15050 15071 E godot : ERROR: No valid library handle, can't get symbol from GDNative object 09-17 14:43:24.114 15050 15071 E godot : at: get_symbol (modules/gdnative/gdnative.cpp:510) - No valid library handle, can't get symbol from GDNative object 09-17 14:43:24.114 15050 15071 E godot : ERROR: No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:24.114 15050 15071 E godot : at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510) - No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:24.114 15050 15071 E godot : ERROR: Script does not inherit a Node: res://addons/algodot/gdnative/async_executor.gdns 09-17 14:43:24.114 15050 15071 E godot : at: start (main/main.cpp:1832) - Condition "!valid_type" is true. Continuing. 09-17 14:43:24.115 15050 15071 E godot : ERROR: No valid library handle, can't terminate GDNative object 09-17 14:43:24.115 15050 15071 E godot : at: terminate (modules/gdnative/gdnative.cpp:417) - No valid library handle, can't terminate GDNative object 09-17 14:43:24.221 15050 15071 E godot : ERROR: Condition "default_certs != nullptr" is true. 09-17 14:43:24.221 15050 15071 E godot : at: load_default_certificates (modules/mbedtls/crypto_mbedtls.cpp:314) - Condition "default_certs != nullptr" is true. 09-17 14:43:24.237 15050 15071 E godot : ERROR: Can't open dynamic library: libalgodot.so, error: dlopen failed: library "libssl.so.1.1" not found. 09-17 14:43:24.238 15050 15071 E godot : at: open_dynamic_library (platform/android/os_android.cpp:233) - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN 09-17 14:43:24.238 15050 15071 E godot : ERROR: No valid library handle, can't get symbol from GDNative object 09-17 14:43:24.238 15050 15071 E godot : at: get_symbol (modules/gdnative/gdnative.cpp:510) - No valid library handle, can't get symbol from GDNative object 09-17 14:43:24.238 15050 15071 E godot : ERROR: No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:24.238 15050 15071 E godot : at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510) - No nativescriptinit in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:24.239 15050 15071 E godot : ERROR: Cannot get class ''. 09-17 14:43:24.239 15050 15071 E godot : at: _get_parent_class (core/class_db.cpp:323) - Condition "!ti" is true. Returned: StringName() 09-17 14:43:24.239 15050 15071 E godot : SCRIPT ERROR: Parse Error: At "add_child()" call, argument 1. The passed argument's type (algod.gdns) doesn't match the function's expected argument type (Node). 09-17 14:43:24.239 15050 15071 E godot : at: GDScript::load_byte_code (res://main.gdc:20) - Parse Error: At "add_child()" call, argument 1. The passed argument's type (algod.gdns) doesn't match the function's expected argument type (Node). 09-17 14:43:24.239 15050 15071 E godot : ERROR: Method failed. Returning: ERR_PARSE_ERROR 09-17 14:43:24.239 15050 15071 E godot : at: load_byte_code (modules/gdscript/gdscript.cpp:762) - Method failed. Returning: ERR_PARSE_ERROR 09-17 14:43:24.240 15050 15071 E godot : ERROR: No valid library handle, can't terminate GDNative object 09-17 14:43:24.240 15050 15071 E godot : at: terminate (modules/gdnative/gdnative.cpp:417) - No valid library handle, can't terminate GDNative object 09-17 14:43:24.240 15050 15071 E godot : ERROR: Cannot load byte code from file 'res://main.gdc'. 09-17 14:43:24.241 15050 15071 E godot : at: load (modules/gdscript/gdscript.cpp:2180) - Condition "err != OK" is true. Returned: RES() 09-17 14:43:24.241 15050 15071 E godot : ERROR: Failed loading resource: res://main.gdc. Make sure resources have been imported by opening the project in the editor at least once. 09-17 14:43:24.241 15050 15071 E godot : at: _load (core/io/resource_loader.cpp:271) - Condition "found" is true. Returned: RES() 09-17 14:43:24.241 15050 15071 E godot : ERROR: res://Scene.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://main.gd 09-17 14:43:24.241 15050 15071 E godot : at: poll (scene/resources/resource_format_text.cpp:412) - res://Scene.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://main.gd 09-17 14:43:24.241 15050 15071 E godot : ERROR: Failed to load resource 'res://Scene.tscn'. 09-17 14:43:24.241 15050 15071 E godot : at: load (core/io/resource_loader.cpp:206) - Condition "err != OK" is true. Returned: RES() 09-17 14:43:24.243 15050 15071 E godot : ERROR: Failed loading resource: res://Scene.tscn. Make sure resources have been imported by opening the project in the editor at least once. 09-17 14:43:24.243 15050 15071 E godot : at: _load (core/io/resource_loader.cpp:271) - Condition "found" is true. Returned: RES() 09-17 14:43:24.243 15050 15071 E godot : ERROR: Failed loading scene: res://Scene.tscn 09-17 14:43:24.243 15050 15071 E godot : at: start (main/main.cpp:2011) - Condition "!scene" is true. Returned: false 09-17 14:43:24.514 15050 15071 E godot : ERROR: Can't open dynamic library: libalgodot.so, error: dlopen failed: library "libssl.so.1.1" not found. 09-17 14:43:24.514 15050 15071 E godot : at: open_dynamic_library (platform/android/os_android.cpp:233) - Condition "!p_library_handle" is true. Returned: ERR_CANT_OPEN 09-17 14:43:24.514 15050 15071 E godot : ERROR: No valid library handle, can't get symbol from GDNative object 09-17 14:43:24.514 15050 15071 E godot : at: get_symbol (modules/gdnative/gdnative.cpp:510) - No valid library handle, can't get symbol from GDNative object 09-17 14:43:24.514 15050 15071 E godot : ERROR: No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:24.514 15050 15071 E godot : at: init_library (modules/gdnative/nativescript/nativescript.cpp:1510) - No nativescript_init in "res://addons/algodot/lib/armeabi-v7a/libalgodot.so" found 09-17 14:43:24.515 15050 15071 E godot : ERROR: Script does not inherit a Node: res://addons/algodot/gdnative/async_executor.gdns 09-17 14:43:24.515 15050 15071 E godot : at: start (main/main.cpp:1832) - Condition "!valid_type" is true. Continuing. 09-17 14:43:24.515 15050 15071 E godot : ERROR: No valid library handle, can't terminate GDNative object 09-17 14:43:24.515 15050 15071 E godot : at: terminate (modules/gdnative/gdnative.cpp:417) - No valid library handle, can't terminate GDNative object 09-17 14:43:24.587 282 303 D lowmemorykiller: received lmk:10164,15050,0 09-17 14:43:24.587 282 303 D lowmemorykiller: handle killing 15050 done 09-17 14:43:24.587 530 772 D LmKillerTracker: doLmkForceStop pid=15050 09-17 14:43:24.587 530 772 I LmKillerTracker: Skipped process pkgName:org.godotengine.algodottests, pid:15050, has activity in top task ! 09-17 14:43:24.949 530 4816 I ActivityManager: Process org.godotengine.algodottests (pid 15050) has died: fore TOP 09-17 14:43:24.949 530 607 W zygote : kill(-15050, 9) failed: No such process 09-17 14:43:24.949 530 607 I zygote : Successfully killed process cgroup uid 10164 pid 15050 in 0ms 09-17 14:43:25.097 530 614 W ActivityManager: setHasOverlayUi called on unknown pid: 15050 09-17 14:43:31.023 15454 15454 W ResourceType: For resource 0x7f15050b, entry index(1291) is beyond type entryCount(318) 09-17 14:43:31.023 15454 15454 W ResourceType: For resource 0x7f15050b, entry index(1291) is beyond type entryCount(318)

Sam2much96 commented 1 year ago

Run logcat tests with: adb logcat | grep -F "adb shell ps | grep org.godotengine.algodottests | tr -s [:space:] ' ' | cut -d' ' -f2"

Sam2much96 commented 1 year ago

Compiles for Android armv7-linux-androideabi can be done using Android CI and would be hosted as an Artifact. I'll be removing Android compile from this Issue, as it has been fixed.

Sam2much96 commented 1 year ago

Finished running integration tests for Algodot on Android mobile device. It works! I'll be leaving compiler instructions in my fork and making a pull request with the libraries

Sam2much96 commented 1 year ago

I agree mobile support would be very useful. Currently, support for it may be a bit limited especially for iOS. The rust library I'm using to talk to godot has some instructions on how to build for android, but no documentation yet for iOS. I can't promise that I'll be able to implement it soon, though.

I've implemented it, along with an Android CI for compiling from source