Compiling Godot 2.0-stable for Android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Ol_Smaug
:warning: Old Version Published before Godot 3 was released.

I am attempting to compile Godot 2.0-stable for Android from source. It seems to make it pretty far without any issues but terminates at this point. Has anyone else ran into a similar issue or know how to get around this?

drivers\libdrivers1.android.debug.armv7.neon.a(pngrutil.android.debug.armv7.neon
.o):pngrutil.c:function png_init_filter_functions: error: undefined reference to
 'png_init_filter_functions_neon'
collect2.exe: error: ld returned 1 exit status

=====
scons: *** [bin\libgodot.android.debug.armv7.neon.so] Error 1
scons: building terminated because of errors.

Thanks in advance.

:bust_in_silhouette: Reply From: volzhs

It’s because windows can’t compile filter_neon.S file.
So, personally, I changed drivers/png/SCsub file like below.

25 import os
26 if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt":
27	env.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"])

this will disable arm neon optimizing but compile successfully.

Great, that worked! Thank you! :slight_smile:

Ol_Smaug | 2016-03-07 02:19

@volzhs: Could you make a pull request for this? As there is no real progress in understand how to actually fix it so that it works on Windows, better disable it as you suggested.

Akien | 2016-03-07 10:47

@Akien I am not quite sure that this is right way, but it solved compile problem on windows machine.
I will make a PR for this soon.

volzhs | 2016-03-07 11:49