Error jmemmgr.c while building jarvis under ubuntu

Hi,
I’m trying to build kodi for android (with no modification) just for learning and for fun and i’m stuck while building dependencies

I’m following the steps described at https://github.com/xbmc/xbmc/blob/master…ME.android

I’m using ndk r12b and latest sdk available.
Working under Ubuntu 16.04 x64

This is the configure command ran from kodi-android/tools/depends

Quote:./configure –with-tarballs=/opt/xbmc-tarballs –host=arm-linux-androideabi –with-sdk-path=/opt/android-sdk-linux –with-ndk=/opt/android-ndk-r12b –with-toolchain=/opt/arm-linux-androideabi-4.9-vanilla/android-21 –prefix=/opt/xbmc-depends

This is the relevant part of the error when i run single threaded “make”:

Quote:make[5]: se entra en el directorio ‘/home/neil/kodi-android/tools/depends/target/libjpeg-turbo/arm-linux-androideabi-android-21’
CC jmemmgr.lo
jmemmgr.c: In function ‘realize_virt_arrays’:
jmemmgr.c:659:11: error: ‘SIZE_MAX’ undeclared (first use in this function)
if (SIZE_MAX – maximum_space < new_space)
^
jmemmgr.c:659:11: note: each undeclared identifier is reported only once for each function it appears in
Makefile:1170: fallo en las instrucciones para el objetivo ‘jmemmgr.lo’
make[5]: *** [jmemmgr.lo] Error 1
make[5]: se sale del directorio ‘/home/neil/kodi-android/tools/depends/target/libjpeg-turbo/arm-linux-androideabi-android-21’
Makefile:2031: fallo en las instrucciones para el objetivo ‘all-recursive’
make[4]: *** [all-recursive] Error 1
make[4]: se sale del directorio ‘/home/neil/kodi-android/tools/depends/target/libjpeg-turbo/arm-linux-androideabi-android-21’
Makefile:790: fallo en las instrucciones para el objetivo ‘all’
make[3]: *** [all] Error 2
make[3]: se sale del directorio ‘/home/neil/kodi-android/tools/depends/target/libjpeg-turbo/arm-linux-androideabi-android-21’
Makefile:30: fallo en las instrucciones para el objetivo ‘arm-linux-androideabi-android-21/.libs/libjpeg.a’
make[2]: *** [arm-linux-androideabi-android-21/.libs/libjpeg.a] Error 2
make[2]: se sale del directorio ‘/home/neil/kodi-android/tools/depends/target/libjpeg-turbo’
Makefile:114: fallo en las instrucciones para el objetivo ‘libjpeg-turbo’
make[1]: *** [libjpeg-turbo] Error 2
make[1]: se sale del directorio ‘/home/neil/kodi-android/tools/depends/target’
Makefile:11: fallo en las instrucciones para el objetivo ‘target/.installed-arm-linux-androideabi-android-21’
make: *** [target/.installed-arm-linux-androideabi-android-21] Error 2

Complete log is uploaded here http://paste.ubuntu.com/23711219/

Can you please point me in the right direction?