Build failure due to multiple undefined references

Hi, Unreal developers on Android,

I was trying to build the APK file for my project on my UE4Editor, which is a Linux version just built as release “4.14.2-release”

When I try to do so, it really weird to see it fail at some message like this:


...
UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: [15/17] arm-linux-androideabi-ar UE4-OnlineSubsystemGooglePlay-armv7-es2.a
UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: [16/17] arm-linux-androideabi-ar UE4-AndroidMediaFactory-armv7-es2.a
UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: [17/17] clang++ UE4Game-armv7-es2.so
UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h:306: error: undefined reference to 'srand'
UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: Runtime/Core/Public/Android/AndroidString.h:319: error: undefined reference to 'atof'
UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: Runtime/Core/Public/Android/AndroidString.h:319: error: undefined reference to 'atof'
UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: Runtime/Core/Public/Android/AndroidString.h:319: error: undefined reference to 'atof'
UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: Runtime/Core/Public/Android/AndroidString.h:319: error: undefined reference to 'atof'
UATHelper: Packaging (Android (ETC1)): UnrealBuildTool: Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h:303: error: undefined reference to 'rand'

After build other 16 .a files, the procedure somehow fail at some common basic callback references. But I don’t know where to check its include or lib paths.
I personally write Autoconf, CMake project before, but never try tracing the building failure for Unreal or CLang project.

May someone tell me how could this happen, or share some tips about tracing the details of Unreal building procedure?
The full log is located here

Thank you.

I’ve seen this before if you had an older NDK. 4.14 should use r11c or r12b preferably.