How to install NDK for building engine from source

The one that’s really causing me trouble is this:

Correcting that, leads to this:

Output

Waf: Leaving directory `d:\defold\engine\dlib\build’
At least one compiler (g++, …) must be selected
None
Traceback (most recent call last):
File “./scripts/build.py”, line 2227, in
f()
File “./scripts/build.py”, line 1102, in build_engine
self._build_engine_lib(args, lib, target_platform)
File “./scripts/build.py”, line 1039, in _build_engine_lib
run.env_command(self._form_env(), args + plf_args + self.waf_options + skip_build_tests, cwd = cwd)
File “d:\defold\build_tools\run.py”, line 77, in env_command
return _exec_command(args, shell = False, stdout = None, env = env, **kwargs)
File “d:\defold\build_tools\run.py”, line 55, in _exec_command
raise ExecException(process.returncode, output)
run.ExecException

which is similar to this thread where your advice was to print the environment, which leads to this:

Summary

‘AR’ ‘d:\defold\tmp\dynamo_home\ext\SDKs\android-ndk-r20/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ar’
‘BOB_BUILD_PLATFORM’ ‘armv7-android’
‘BUILD_PLATFORM’ ‘x86_64-win32’
‘CC’ ‘d:\defold\tmp\dynamo_home\ext\SDKs\android-ndk-r20/toolchains/llvm/prebuilt/windows-x86_64/bin/armv7a-linux-androideabi16-clang’
‘CCACHE’ ‘’
‘CPP’ ‘d:\defold\tmp\dynamo_home\ext\SDKs\android-ndk-r20/toolchains/llvm/prebuilt/windows-x86_64/bin/armv7a-linux-androideabi16-clang -E’
‘CXX’ ‘d:\defold\tmp\dynamo_home\ext\SDKs\android-ndk-r20/toolchains/llvm/prebuilt/windows-x86_64/bin/armv7a-linux-androideabi16-clang++’
‘DX’ ‘d:\defold\tmp\dynamo_home\ext\SDKs/android-sdk/build-tools/30.0.3/dx’
‘DYNAMO_HOME’ ‘d:\defold\tmp\dynamo_home’
‘LD’ ‘d:\defold\tmp\dynamo_home\ext\SDKs\android-ndk-r20/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ld’
‘LINK_CXX’ ‘d:\defold\tmp\dynamo_home\ext\SDKs\android-ndk-r20/toolchains/llvm/prebuilt/windows-x86_64/bin/armv7a-linux-androideabi16-clang++’
‘PLATFORM’ ‘armv7-android’
‘PREFIX’ ‘d:\defold\tmp\dynamo_home’
‘RANLIB’ ‘d:\defold\tmp\dynamo_home\ext\SDKs\android-ndk-r20/toolchains/llvm/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ranlib’
‘VALGRIND’ ‘’
Checking for program gcc,cc : ok d:\defold\tmp\dynamo_home\ext\SDKs\android-ndk-r20/toolchains/llvm/prebuilt/windows-x86_64/bin/armv7a-linux-androideabi16-clang
Checking for msvc : ok
Checking for program javac : ok D:\Installs\jdk-11.0.1\bin\javac.exe
Checking for program java : ok D:\Installs\jdk-11.0.1\bin\java.exe
Checking for program jar : ok D:\Installs\jdk-11.0.1\bin\jar.exe

Unlike the situation in the other thread, the compiler does exist at that path. I assume the mixed paths are OK because I ran Process Monitor and the file is being accessed.

There’s a comment in waf_dynamo.pf which seems relevant because it’s the absence of CXX_NAME that triggers the error - any idea what might be happening under the hood?

#NOTE: We override after check_tool. Otherwise waf gets confused and CXX_NAME etc are missing…

edit: Change of plan - I’m giving WSL a try.

1 Like