0 votes

I've tried to compile the library to use AdMob in my android game, but scons says that included file alloca.h is missing and stops the process. I've read the manual and installed all necessary tools, but the error is still here. Does anybody know how to fix that?

c:\godot>scons platform=android target=release
scons: Reading SConscript files ...

MSVC not detected, attempting Mingw.
- gcc detected.
Godot Android!!!!! (armv7) (with neon)
scons: done reading SConscript files.
scons: Building targets ...
c:\Users\Little_Deer\AppData\Local\Android\Sdk\ndk-bundle\/toolchains/llvm/prebu
ilt/windows-x86_64/bin/clang++ -o platform\android\os_android.os -c -fno-rtti -f
no-exceptions -DNO_SAFE_CAST -Wall -DNDEBUG -DFREETYPE_ENABLED -DENABLE_DEPRECAT
ED -isystem c:\Users\Little_Deer\AppData\Local\Android\Sdk\ndk-bundle\/platforms
/android-14/arch-arm/usr/include -fpic -ffunction-sections -funwind-tables -fsta
ck-protector-strong -fvisibility=hidden -fno-strict-aliasing -DANDROID -DNO_STAT
VFS -DGLES2_ENABLED -D__ARM_ARCH_7__ -D__ARM_ARCH_7A__ -march=armv7-a -mfloat-ab
i=softfp -mfpu=neon -D__ARM_NEON__ -target armv7-none-linux-androideabi -fno-int
egrated-as -gcc-toolchain c:\Users\Little_Deer\AppData\Local\Android\Sdk\ndk-bun
dle\/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 -O2 -DNDEBUG -
ffast-math -funsafe-math-optimizations -fomit-frame-pointer -ftree-vectorize -DA
NDROID_ENABLED -DUNIX_ENABLED -DNO_FCNTL -DMPC_FIXED_POINT -DGDSCRIPT_ENABLED -D
MINIZIP_ENABLED -DXML_ENABLED -Icore -Icore\math -Ieditor -Idrivers -I. -Iplatfo
rm\android -Ithirdparty\zlib -Ithirdparty\freetype -Ithirdparty\freetype\include
 -Ithirdparty\libpng platform\android\os_android.cpp
=====
In file included from platform\android\os_android.cpp:30:
In file included from platform\android/os_android.h:33:
In file included from .\drivers/unix/os_unix.h:39:
In file included from .\drivers/unix/ip_unix.h:33:
In file included from core\io/ip.h:33:
In file included from core\io/ip_address.h:33:
In file included from core\ustring.h:33:
In file included from core/array.h:33:
In file included from core/typedefs.h:38:
platform\android\platform_config.h:30:10: fatal error: 'alloca.h' file not found

#include <alloca.h>
         ^~~~~~~~~~
1 error generated.

=====
scons: *** [platform\android\os_android.os] Error 1
scons: building terminated because of errors.
asked Jan 8, 2018 in Engine by Little_Deer (16 points)

I think godot need explain more the export template

Godot 3, where the ios export xcode project

There no docs to how build godot 3 game on ios,,.??

Best regards

your ndk version?
try with latest ndk.

I've already updated NDK to the latest version. Actually those .h files scons can't find are in the NDK folder, but for some reason scons can't reach them.

1 Answer

0 votes

So the problem really was with the NDK. Google changed the header folder in later versions of NDK!
So for anyone building the android export templates: USE NDK 13b, otherwise scons never find the headers!

answered Jan 9, 2018 by Little_Deer (16 points)

Compiling using the Android NDK r16b with the latest Android SDK on Linux works for me.

What's your version of Godot?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.