0 votes

I cloned the latest engine code and compile it with following command:

scons platform=android target=release

but failed, the compile log is

    In file included from core/hashfuncs.h:35:
In file included from core/math/math_funcs.h:40:
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:661:91: error: 
      use of undeclared identifier 'acosl'
  ...long double acos(long double __lcpp_x) _NOEXCEPT {return acosl(__lcpp_x);}
                                                              ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:673:91: error: 
      use of undeclared identifier 'asinl'
  ...long double asin(long double __lcpp_x) _NOEXCEPT {return asinl(__lcpp_x);}
                                                              ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:685:91: error: 
      use of undeclared identifier 'atanl'
  ...long double atan(long double __lcpp_x) _NOEXCEPT {return atanl(__lcpp_x);}
                                                              ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:697:114: error: 
      use of undeclared identifier 'atan2l'
  ...double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return atan2l(__lcpp_y...
                                                              ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:732:90: error: 
      use of undeclared identifier 'cosl'
  ...long double cos(long double __lcpp_x) _NOEXCEPT {return cosl(__lcpp_x);}
                                                             ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:744:91: error: 
      use of undeclared identifier 'coshl'
  ...long double cosh(long double __lcpp_x) _NOEXCEPT {return coshl(__lcpp_x);}
                                                              ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:756:90: error: 
      use of undeclared identifier 'expl'
  ...long double exp(long double __lcpp_x) _NOEXCEPT {return expl(__lcpp_x);}
                                                             ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:792:113: error: 
      use of undeclared identifier 'fmodl'
  ...double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return fmodl(__lcpp_x...
                                                              ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:839:90: error: 
      use of undeclared identifier 'logl'
  ...long double log(long double __lcpp_x) _NOEXCEPT {return logl(__lcpp_x);}
                                                             ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:851:92: error: 
      use of undeclared identifier 'log10l'
  ...long double log10(long double __lcpp_x) _NOEXCEPT {return log10l(__lcpp_...
                                                               ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:863:114: error: 
      use of undeclared identifier 'modfl'
  ...double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return modfl(__lcpp_x...
                                                               ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:870:112: error: 
      use of undeclared identifier 'powl'
  ...double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return powl(__lcpp_x, ...
                                                              ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:893:90: error: 
      use of undeclared identifier 'sinl'
  ...long double sin(long double __lcpp_x) _NOEXCEPT {return sinl(__lcpp_x);}
                                                             ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:905:91: error: 
      use of undeclared identifier 'sinhl'
  ...long double sinh(long double __lcpp_x) _NOEXCEPT {return sinhl(__lcpp_x);}
                                                              ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:917:91: error: 
      use of undeclared identifier 'sqrtl'
  ...long double sqrt(long double __lcpp_x) _NOEXCEPT {return sqrtl(__lcpp_x);}
                                                              ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:931:90: error: 
      use of undeclared identifier 'tanl'
  ...long double tan(long double __lcpp_x) _NOEXCEPT {return tanl(__lcpp_x);}
                                                             ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:943:91: error: 
      use of undeclared identifier 'tanhl'
  ...long double tanh(long double __lcpp_x) _NOEXCEPT {return tanhl(__lcpp_x);}
                                                              ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:955:92: error: 
      use of undeclared identifier 'acoshl'
  ...long double acosh(long double __lcpp_x) _NOEXCEPT {return acoshl(__lcpp_...
                                                               ^
/Users/att/Work/SDK/Android/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/math.h:967:92: error: 
      use of undeclared identifier 'asinhl'
  ...long double asinh(long double __lcpp_x) _NOEXCEPT {return asinhl(__lcpp_...
                                                               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
in Engine by (68 points)

I also just tried NDK = android-ndk-r13b = r13b and get a very similar error (see below error).

However when I build for X11 the build works well with no errors.

scons --debug=presub platform=android target=debug android_stl=true verbose=true

/home/stewart/Android/Sdk/android-ndk-r13b/toolchains/llvm/prebuilt/linux-x8664/bin/clang++ -o thirdparty/bullet/BulletInverseDynamics/IDMath.android.debug.armv7.neon.o -c -frtti -std=gnu++14 -w -Werror=return-type -DZSTDSTATICLINKINGONLY -DDEBUGMEMORYALLOC -DSCINAMESPACE -O0 -DDEBUG -UNDEBUG -DDEBUGENABLED -DDEBUGMEMORYENABLED -g -fno-limit-debug-info -isystem /home/stewart/Android/Sdk/android-ndk-r13b/platforms/android-18/arch-arm/usr/include -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing -DNOSTATVFS -DGLESENABLED -DARMARCH7 -DARMARCH7A -march=armv7-a -mfloat-abi=softfp -mfpu=neon -DARM_NEON -target armv7-none-linux-androideabi -fno-integrated-as -gcc-toolchain /home/stewart/Android/Sdk/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x8664 -isystem /home/stewart/Android/Sdk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include -isystem /home/stewart/Android/Sdk/android-ndk-r13b/sources/cxx-stl/llvm-libc++abi/include -DANDROIDENABLED -DUNIXENABLED -DNOFCNTL -DMPCFIXEDPOINT -DPTRCALLENABLED -DGDSCRIPTENABLED -DMINIZIPENABLED -DXMLENABLED -DMODULEBULLETENABLED -Icore -Icore/math -Ieditor -Idrivers -I. -Iplatform/android -Ithirdparty/zstd -Ithirdparty/zstd/common -Ithirdparty/zlib -Ithirdparty/bullet thirdparty/bullet/BulletInverseDynamics/IDMath.cpp
In file included from thirdparty/bullet/BulletInverseDynamics/IDMath.cpp:1:
In file included from thirdparty/bullet/BulletInverseDynamics/IDMath.hpp:6:
In file included from thirdparty/bullet/BulletInverseDynamics/IDConfig.hpp:105:
In file included from thirdparty/bullet/BulletInverseDynamics/details/IDLinearMathInterface.hpp:4:
/home/stewart/Android/Sdk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/cstdlib:108:9: error: no member named 'strtold' in the global namespace
using ::strtold;
~~^
/home/stewart/Android/Sdk/android-ndk-r13b/sources/cxx-stl/llvm-libc++/include/cstdlib:126:9: error: no member named '
Exit' in the global namespace
using ::_Exit;

Please help!

I get a very similar error, please see below. Please take a look at the compiler switches and tool chain.

Android NDK = Pkg.Revision = 18.1.506304

scons --debug=presub platform=android target=debug verbose=true
I get the same error with:
scons --debug=presub platform=android target=debug android_stl=true verbose=true

scons: Reading SConscript files ...
Building for Android (armv7) (with NEON)
Using NDK unified headers
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 24%] Building thirdparty/bullet/BulletInverseDynamics/IDMath.android.debug.armv7.neon.o with action:
$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES

/home/stewart/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x8664/bin/clang++ -o thirdparty/bullet/BulletInverseDynamics/IDMath.android.debug.armv7.neon.o -c -frtti -std=gnu++14 -w -Werror=return-type -DZSTDSTATICLINKINGONLY -DDEBUGMEMORYALLOC -DSCINAMESPACE -O0 -DDEBUG -UNDEBUG -DDEBUGENABLED -DDEBUGMEMORYENABLED -g -fno-limit-debug-info -isystem /home/stewart/Android/Sdk/ndk-bundle/sysroot/usr/include -isystem /home/stewart/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -DANDROID_API=18 -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing -DNOSTATVFS -DGLESENABLED -DARMARCH7 -DARMARCH7A -march=armv7-a -mfloat-abi=softfp -mfpu=neon -DARM_NEON -target armv7-none-linux-androideabi -fno-integrated-as -gcc-toolchain /home/stewart/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x8664 -isystem /home/stewart/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include -isystem /home/stewart/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -DANDROIDENABLED -DUNIXENABLED -DNOFCNTL -DMPCFIXEDPOINT -DPTRCALLENABLED -DGDSCRIPTENABLED -DMINIZIPENABLED -DXMLENABLED -DMODULEBULLET_ENABLED -Icore -Icore/math -Ieditor -Idrivers -I. -Iplatform/android -Ithirdparty/zstd -Ithirdparty/zstd/common -Ithirdparty/zlib -Ithirdparty/bullet thirdparty/bullet/BulletInverseDynamics/IDMath.cpp

In file included from thirdparty/bullet/BulletInverseDynamics/IDMath.cpp:3:
/home/stewart/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/cmath:313:9: error: no member named 'signbit' in the global namespace
using ::signbit;

1 Answer

0 votes

I have resolved my above issue.

My change was that I am no longer compiling with "godot-3.0.6-stable" I using using the latest godot source from the main git trunk.

This is the environment that worked:

  • build machine Ubuntu 16.04
  • env variables:
    export NDKTARGET=arm-linux-androideabi-4.9 (I'm not sure if this has anything to do with success)
    export ANDROID
    HOME=/home/stewart/Android/Sdk
    export J2SDKDIR=/usr/lib/jvm/java-8-oracle
    export ANDROIDNDKROOT=/home/stewart/Android/Sdk/ndk-bundle

Where Android NDK = Pkg.Revision = 18.1.506304

My Godot source code is the latest from: " https://github.com/godotengine/godot.git"

Build command:
scons --debug=presub platform=android target=debug android_stl=true verbose=true

which resulted in the following compiler switches:

/home/stewart/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x8664/bin/clang++
-o core/string
db.android.debug.armv7.neon.o
-c
-frtti
-std=gnu++14
-Wall
-Wno-sign-compare
-Werror=return-type
-DZSTDSTATICLINKINGONLY
-DFREETYPE
ENABLED
-DSVGENABLED
-O0
-D
DEBUG
-UNDEBUG
-DDEBUGENABLED
-DDEBUG
MEMORYENABLED
-g
-fno-limit-debug-info
-isystem /home/stewart/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include
-isystem /home/stewart/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include
--sysroot=/home/stewart/Android/Sdk/ndk-bundle/sysroot
-isystem /home/stewart/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi
-isystem /home/stewart/Android/Sdk/ndk-bundle/sources/android/support/include
-DANDROID_API=18
-fpic
-ffunction-sections
-funwind-tables
-fstack-protector-strong
-fvisibility=hidden
-fno-strict-aliasing
-DNO
STATVFS
-DGLESENABLED
-DARMARCH7
-DARMARCH7A
-march=armv7-a
-mfloat-abi=softfp
-mfpu=neon
-DARM_NEON
-target armv7-none-linux-androideabi
-fno-integrated-as-gcc-toolchain /home/stewart/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86
64
-DANDROIDENABLED
-DUNIX
ENABLED
-DNOFCNTL
-DMPC
FIXEDPOINT
-DDEBUG
MEMORYALLOC
-DDISABLE
FORCEDINLINE
-DPTRCALL
ENABLED
-DGDSCRIPTENABLED
-DMINIZIP
ENABLED
-DHAVEMNTENT -Ieditor
-I.
-Iplatform/android
-Ithirdparty/zlib
-Ithirdparty/zstd
-Ithirdparty/libpng
-Ithirdparty/freetype/include
-Ithirdparty/nanosvg core/string
db.cpp

by (19 points)
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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.