Building Engine Failing

Hello,

I am getting set up to build the engine locally and I’ve encountered the following issue:
Waf: Leaving directory C:\Citizen\defold\sourceCode\defold\engine\profiler\build' 'install' finished successfully (0.018s) Building engine for arm64-android [exec] python C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home/ext/bin/waf --prefix=C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home --skip-tests distclean configure build install --platform=arm64-android --skip-build-tests 'distclean' finished successfully (0.023s) Setting top to : C:\Citizen\defold\sourceCode\defold\engine\engine Setting out to : C:\Citizen\defold\sourceCode\defold\engine\engine\build Checking for program 'ccache' : not found [exec] C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home/../../scripts/windows/vswhere2/vswhere2.exe --sdk_root C:\Program Files (x86)\Windows Kits\10\ [exec] C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home/../../scripts/windows/vswhere2/vswhere2.exe --sdk_version 10.0.22621.0 [exec] C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home/../../scripts/windows/vswhere2/vswhere2.exe --includes C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um,C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt,C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared,C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include [exec] C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home/../../scripts/windows/vswhere2/vswhere2.exe --lib_paths C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x64,C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64,C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\lib\x64 [exec] C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home/../../scripts/windows/vswhere2/vswhere2.exe --bin_paths C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64,C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64 [exec] C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home/../../scripts/windows/vswhere2/vswhere2.exe --vs_root C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433 [exec] C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home/../../scripts/windows/vswhere2/vswhere2.exe --vs_version 14.42.34433 Checking for program 'd8' : C:\Users\citizen\AppData\Local\Android\Sdk\build-tools\35.0.0\d8.bat Checking for 'clang' (C compiler) : C:\Users\citizen\AppData\Local\Android\Sdk\ndk\28.0.12674087\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android21-clang.cmd Checking for 'clang++' (C++ compiler) : C:\Users\citizen\AppData\Local\Android\Sdk\ndk\28.0.12674087\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android21-clang++.cmd Checking for program 'clang' : C:\Users\citizen\AppData\Local\Android\Sdk\ndk\28.0.12674087\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe Checking for program 'clang++' : C:\Users\citizen\AppData\Local\Android\Sdk\ndk\28.0.12674087\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe Checking for program 'javac' : C:\Users\citizen\AppData\Local\Programs\Microsoft\jdk-21.0.5.11-hotspot\bin\javac.exe Checking for program 'java' : C:\Users\citizen\AppData\Local\Programs\Microsoft\jdk-21.0.5.11-hotspot\bin\java.exe Checking for program 'jar' : C:\Users\citizen\AppData\Local\Programs\Microsoft\jdk-21.0.5.11-hotspot\bin\jar.exe Checking for program 'javadoc' : C:\Users\citizen\AppData\Local\Programs\Microsoft\jdk-21.0.5.11-hotspot\bin\javadoc.exe Checking for file texc.py : C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home/bin\texc.py Checking for program 'ddfc_cxx' : C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home/bin\ddfc_cxx.bat 'configure' finished successfully (0.670s) Waf: Entering directory C:\Citizen\defold\sourceCode\defold\engine\engine\build’
[ 1/69] Compiling content\builtins\render\default.render_script
[ 2/69] Compiling content\builtins\graphics\particle_blob.png
[ 3/69] Compiling content\builtins\fonts\font-df-ms-singlelayer.fp
[ 4/69] Compiling content\builtins\connect\connect.gui_script
[ 5/69] Compiling content\builtins\connect\connect.collection
[ 6/69] Compiling content\builtins\render\default.render
[ 7/69] Compiling content\builtins\fonts\font-df-ms.fp
[ 8/69] Compiling content\builtins\scripts\mobdebug.lua
[ 9/69] Compiling content\builtins\graphics\particle_blob.tilesource
[10/69] Compiling content\builtins\scripts\debugger.lua
[11/69] Compiling content\builtins\render\default.display_profiles
[12/69] Compiling content\builtins\fonts\label.material
[13/69] Compiling content\builtins\materials\tile_map.vp
[14/69] Compiling content\builtins\fonts\default.font
[15/69] Compiling content\builtins\materials\tile_map.fp
[16/69] Compiling content\builtins\fonts\label-df.material
[17/69] Compiling content\builtins\materials\sprite_paged_atlas.material
[18/69] Compiling content\builtins\connect\connect.gui
[19/69] Compiling content\builtins\materials\sprite.vp
[20/69] Compiling content\builtins\materials\sprite.fp
env DM_BOB_ROOTFOLDER=C:\Users\citizen\AppData\Local\Temp\bob-light-7bksva7_

[21/69] Compiling content\builtins\fonts\debug\always_on_top.font
Exception in thread “main” java.lang.UnsupportedClassVersionError: com/dynamo/bob/pipeline/TextureGenerator has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Traceback (most recent call last):
File “C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home\bin\texc.py”, line 32, in
raise Exception(“Failed to compile texture (err: %d): %s” % (ret, args[0]))
Exception: Failed to compile texture (err: 1): …\content\builtins\graphics\particle_blob.png

2025-01-10 09:23:24 INFO
env DM_BOB_ROOTFOLDER=C:\Users\citizen\AppData\Local\Temp\bob-light-7bksva7_


I am building on a Windows machine, and the build for the host platform (Windows) completes successfully, but fails with above for platform=arm64-android.

Command that triggers the build is:
./scripts/build.py build_engine --platform=arm64-android --skip-docs --skip-tests – --skip-build-tests

The source code that is being built is the “master” branch (checked out yesterday).

I would appreciate some assistance in fixing this.

Seems like a java version mismatch.
What java version do you use?

Hi Mathias,

Thanks for looking into this. From the log I posted I would assume that this gets used:
C:\Users\citizen\AppData\Local\Programs\Microsoft\jdk-21.0.5.11-hotspot\bin\

However, maybe this guy:
File “C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home\bin\texc.py”

…ends up using something different somehow?

Actually I just checked:
$ which java
/c/Program Files (x86)/Common Files/Oracle/Java/java8path/java

Let me see if I can address this and I’ll get back to you.

As you see, texc invokes java.
So, what does the version say when you call java --version from the command line?

Thanks for the clue - it helped fix that issue.

To summarize, java.exe being used when running C:\Citizen\defold\sourceCode\defold\tmp\dynamo_home\bin\texc.py was not the one I expected.

It was:
$ which java
/c/Program Files (x86)/Common Files/Oracle/Java/java8path/java

After your clue, I have changed my PATH env variables so that:
/c/Users/amir/AppData/Local/Programs/Microsoft/jdk-21.0.5.11-hotspot/bin/java

…comes before and with that change I get:
$ which java
/c/Users/citizen/AppData/Local/Programs/Microsoft/jdk-21.0.5.11-hotspot/bin/java

After that change the issue with texc.py is gone.

The build is not completing yet however, now I got:
[94/98] Compiling build\proto\engine\engine_ddf.cpp
[95/98] Compiling build\content\builtins\connect\game.project.embed.cpp
[96/98] Compiling build\content\builtins.arcd.embed.cpp
…\src\engine_main.cpp:20:10: warning: non-portable path to file ‘<GLFW/glfw.h>’; specified path differs in case from file name on disk [-Wnonportable-include-path]
20 | #include <glfw/glfw.h>
| ^~~~~~~~~~~~~
| <GLFW/glfw.h>
…\src\engine_main.cpp:86:20: error: ‘ALooper_pollAll’ is unavailable: obsoleted in Android 1 - ALooper_pollAll may ignore wakes. Use ALooper_pollOnce instead. See The API documentation for more information
86 | if ((ident=ALooper_pollAll(300, NULL, &events, (void**)&source)) >= 0)
| ^
C:/Users/amir/AppData/Local/Android/Sdk/ndk/28.0.12674087/toolchains/llvm/prebuilt/windows-x86_64/bin/…/sysroot/usr/include/android/looper.h:228:5: note: ‘ALooper_pollAll’ has been explicitly marked unavailable here
228 | int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData)
| ^
1 warning and 1 error generated.

Waf: Leaving directory `C:\Amir\defold\sourceCode\defold\engine\engine\build’
Build failed


Any clues for this new issue? :slight_smile:

Yeah, we don’t support that sdk/ndk yet.
Use an older version, see sdk.py for versions we use.

Mathias, thank you for clarifying. Appreciate your quick responses today. :+1: