Scons Compile Android Export Template Stop by Error "size mismatch"

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By pengyou

Hello. I am trying to export a template with scons in godot but bump into this error message:

b'modules\\gdnative\\gdnative\\callable.cpp:41:1: error: static_assert failed due to requirement \'sizeof(godot_callable) == sizeof(Callable)\' "Callable size mismatch"\r\nstatic_assert(sizeof(godot_callable) == sizeof(Callable), "Callable size mismatch");\r\n^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nmodules\\gdnative\\gdnative\\callable.cpp:42:1: error: static_assert failed due to requirement \'sizeof(godot_signal) == sizeof(Signal)\' "Signal size mismatch"\r\nstatic_assert(sizeof(godot_signal) == sizeof(Signal), "Signal size mismatch");\r\n^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n2 errors generated.\r\n'
=====
scons: *** [modules\gdnative\gdnative\callable.android.opt.x86.o] Error 1
scons: building terminated because of errors.

Can anyone please guides me on what am I doing wrong?

Below is my template content:

module_arkit_enabled = "no"
module_assimp_enabled = "no"
module_bmp_enabled = "no"
module_bullet_enabled = "no"
module_camera_enabled = "no"
module_csg_enabled = "no"
module_dds_enabled = "no"
module_enet_enabled = "no"
module_gridmap_enabled = "no"
module_hdr_enabled = "no"
module_jsonrpc_enabled = "no"
module_mbedtls_enabled = "no"
module_mobile_vr_enabled = "no"
module_opensimplex_enabled = "no"
module_opus_enabled = "no"
module_pvr_enabled = "no"
module_recast_enabled = "no"
module_regex_enabled = "no"
module_bullet_enabled = "no"
module_squish_enabled = "no"
module_svg_enabled = "no"
module_tga_enabled = "no"
module_theora_enabled = "no"
module_tinyexr_enabled = "no"
module_upnp_enabled = "no"
module_vhacd_enabled = "no"
module_vorbis_enabled = "no"
module_webm_enabled = "no"
module_webp_enabled = "no"
module_webrtc_enabled = "no"
module_websocket_enabled = "no"
module_xatlas_unwrap_enabled = "no"
module_visual_script_enabled = "no"
tools = "no"
platform = "android"
disable_3d = "yes"
disable_advanced_gui= "yes"
android_arch = "x86"
target = "release"
builtin_bullet = "no"
builtin_enet = "no"
builtin_vulkan = "no"
deprecated = "no"
use_lto = "no"
:bust_in_silhouette: Reply From: Becbunzen

Have you been able to export a minimum template? Just to check there is nothing basic that is wrong?
Maybe this can help:
https://godotforums.org/discussion/20924/how-do-you-use-scons
Edit: Updated

The error shows when im executing scons command during it run arround 19%. Not sure if it is due to i am using the latest ndk. Will try downgrade the ndk and try again. Thanks.

pengyou | 2020-06-03 13:45

Have you tested with an example setup, just to verify that the system works? If that works, you can start with a minimal version of your own code, add more until it breaks, and identify that.

Becbunzen | 2020-06-03 14:16

Thanks! That’s actually a cool idea! I tried with basic build and it is 100% completed! Seems like some module is internally dependent on other module. I will continue with your method until I reach an optimum scons build. Thanks!

pengyou | 2020-06-03 15:56

Feel free to update your answer and will mark it as an answer for this question

pengyou | 2020-06-03 16:00

Hmm, how do you mean I should update my answer? I am new to this forum.

Becbunzen | 2020-06-03 18:09

Hello, there’s a 3 dot icon at the bottom right corner of the content. Choose ‘edit’ and and update anything on your written context. :slight_smile:

pengyou | 2020-06-04 05:29

Ok, done. Weird that it cannot be chosen unless it is updated.

Becbunzen | 2020-06-04 06:46