View Issue Details

IDProjectCategoryView StatusLast Update
0000019Kohi EngineBugspublic2026-11-11 14:16
Reporteraski97 Assigned Totravisvroman  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformDesktop (Windows)OSWindowsOS Version10+
Product Versionv0.14.0 
Target Versionv0.14.0Fixed in Versionv0.14.0 
Summary0000019: Windows: clean checkout needs several manual fixes to build and run (Makefile, OpenAL SDK, Assimp, shell)
Description

This is a follow-up to my previous report (0000018). Thanks for fixing it, the Windows dependencies now install correctly.

To verify the whole setup, I repeated it from scratch in a new folder, following the README. The build still cannot complete on Windows without a few manual interventions. With the workarounds described below, everything builds and testbed.kapp.exe runs fine (two screenshots attached).

Environment: Windows 11 Pro 64-bit, GNU Make from w64devkit 1.20.0 (so sh.exe is in PATH), clang, Vulkan SDK, Assimp (vc145 build), Intel Iris Xe, building with build-debug.bat.

BLOCKING PROBLEMS (in the order I hit them)

1) make uses sh.exe instead of cmd.exe
Because sh.exe is in PATH (w64devkit, Git for Windows), make runs the recipes with it, but the Windows recipes use cmd syntax. Running "make setup" exactly as written in the README fails with:

sh: syntax error: unexpected end of file (expecting "then")

and, in the sub-makes, with "sh: dir: not found" in scaffold-win32. build-debug.bat passes SHELL=cmd.exe only to the top-level make, so the sub-makes (make -C kohi.core ...) still pick sh. What worked: "make SHELL=cmd.exe setup", and "set MAKEFLAGS=SHELL=cmd.exe" before running build-debug.bat. A permanent fix could be setting SHELL := cmd.exe in the Windows branch of Makefile and Makefile.prefix, or documenting the workaround in the README.

2) Makefile.prefix: "DIR_SLASH=\" is treated as a line continuation
In the Win32 block, the line "DIR_SLASH=\" followed by "TOOLS_EXT=.exe" is parsed as a single line, "DIR_SLASH= TOOLS_EXT=.exe". DIR_SLASH ends up containing the text "TOOLS_EXT=.exe" while TOOLS_EXT stays empty, so genversion fails with:

"..TOOLS_EXT" is not recognized as an internal or external command
make[1]: *** [../Makefile.prefix:176: genversion] Error 1

Setting DIR_SLASH=/ fixed it (DIR_SLASH=$(subst /,\,/) also worked).

3) Makefile.prefix: the version header is generated after compilation
flags-prereq is "link compile genversion", so on a clean build the *_version.h files do not exist yet when the .c files are compiled:

src/core/engine.c:20:10: fatal error: 'kohi.runtime_version.h' file not found

The same happens with kohi.plugin.renderer.vulkan_version.h. Changing the line to "flags-prereq: genversion compile link" fixed it.

4) OpenAL: only the runtime is installed, and the SDK path is hardcoded
After the 0000018 fix, CreativeTechnology.OpenAL installs correctly, but it only provides the runtime installer (oalinst.exe in C:\Program Files (x86)\OpenAL), with no headers and no import library. kohi.plugin.audio.openal/Makefile points to "C:\Program Files (x86)\OpenAL 1.1 SDK\include" and "...\libs\Win64", which do not exist after the setup, so the build stops with:

src/openal_backend.c:8:11: fatal error: 'al.h' file not found

I downloaded the OpenAL SDK manually, extracted it to C:\openal-soft and edited ADDL_WIN32_INCLUDES and ADDL_WIN32_LDFLAGS to point there. It would help to document this manual step in the README (as is already done for Assimp), or to make the path configurable through an environment variable.

5) Assimp: the library name is hardcoded
kohi.plugin.utils/Makefile links against -lassimp-vc143-mt, but the current Assimp installer provides assimp-vc145-mt.lib, so linking fails with:

lld-link: error: could not open 'assimp-vc143-mt.lib'

I changed it to -lassimp-vc145-mt. Making the name configurable, or documenting the required Assimp version, would avoid this.

6) The ASSIMP environment variable
The top-level Makefile (copy-top-level-win32) relies on $(ASSIMP), and the usual install path contains a space. From an administrator prompt, this sets it system-wide (a new terminal is needed afterwards):

setx ASSIMP "C:\Program Files\Assimp" /M

Adding this command to the README (Windows, step 3) and quoting the variable wherever it is used, e.g. -L"$(ASSIMP)\lib\x64", would help.

NON-BLOCKING PROBLEMS

7) copy-utils-win32 fails when the build runs under ktime.exe
build-debug.bat runs "misc\ktime.exe make ... build-debug". At the end, "copy utils\bin* misc" tries to overwrite the running ktime.exe:

The process cannot access the file because it is being used by another process.
make: *** [Makefile:74: copy-utils-win32] Error 1

This stops copy-top-level and leaves bin\ incomplete. I ran "make SHELL=cmd.exe copy-top-level" manually afterwards and it worked. Skipping ktime.exe when it already exists, or prefixing the copy with "-", would avoid it.

8) "svn" is not recognized
For every module, versiongen prints '"svn" is not recognized as an internal or external command' when svn is not in PATH. It does not stop the build, but it is confusing on a fresh setup.

9) import-updated-assets.bat reports success despite errors
Two audio imports fail, yet the script still prints that all assets were imported successfully, because the exit code stays 0:

[ERROR]: Error opening file: 'testbed.kapp/./assets/music/source/Woodland Fantasy mono.mp3' (the source file seems to be missing)
[ERROR]: Failed to import OGG Vorbis file. (Unlock.ogg; the other .ogg files import fine)

kohi.tools importmanifest could return a non-zero exit code when an import fails. Also, the \033[0;32m escape codes in the final message are printed literally by cmd.exe.

10) Runtime messages in the testbed (which otherwise runs fine)
On every "load_scene test_zone" the log shows "Package 'Testbed': No entry called 'test_scene_terrain' exists", followed by "Failed to deserialize hf_terrain asset", and no terrain is rendered. Many .kmt files also log "Read size/file size mismatch" with a difference of roughly 30-50 bytes, possibly caused by CRLF line endings after checkout on Windows.

Additional Information

revision: 86
OS: Windows 11 Pro 64-bit (10.0.26300), Intel Core i7-1165G7, Intel Iris Xe (Vulkan 1.3.3), 8 GB RAM
Kohi Runtime v0.14.0 (Debug)

Hardware note: this is a modest laptop (integrated GPU, 8 GB of RAM, about 28-36 FPS in the Sponza scene). The goal of this test was only to check that the engine builds and runs on a clean Windows setup, not to evaluate performance.

Once, before I updated the Intel graphics driver, testbed.kapp.exe crashed after loading test_zone with:

[FATAL]: Assertion Failure: vulkan_expr_result == VK_SUCCESS, message: 'VK_ERROR_DEVICE_LOST ...' (src/vulkan_command_buffer.c:234)

It did not happen again after the driver update, so it is probably unrelated to the engine. I mention it only for reference.

Tagsassets, build, dependencies, makefile, Windows
Attached Files
Revision

Activities

travisvroman

2026-10-28 17:43

administrator   ~0000005

@aski97 Thanks for reporting this! I'll look into getting this fixed asap, and probably cut a 0.13.1 release as a result.

aski97

2026-10-28 20:04

reporter   ~0000006

Vulkan 1.3.3 was before the driver update. The running version is Vulkan 1.4.4.

Screenshot 2026-10-27 231937.png (162,566 bytes)   
Screenshot 2026-10-27 231937.png (162,566 bytes)   
Screenshot 2026-10-27 232254.png (143,848 bytes)   
Screenshot 2026-10-27 232254.png (143,848 bytes)   
Screenshot 2026-10-27 232309.png (105,547 bytes)   
Screenshot 2026-10-27 232309.png (105,547 bytes)   

travisvroman

2026-10-29 03:00

administrator   ~0000007

Last edited: 2026-10-29 13:59

All issues should be fixed as of rev. 90. Some of them are rendered moot as the OpenAL SDK and Assimp no longer need to be installed (see changelog). Can you please verify that these fixes are all good? Everything looks ok here on my end.

Thank you!

aski97

2026-10-30 22:14

reporter   ~0000008

Hello, I just tried on a clean checkout and I found two small things left:

1) "make setup" still fails because the shell cmd is not set in the top-level Makefile and in utils/Makefile.

2) The last step of "make build-debug" fails:
"copy deps\assimp\bin\x64\assimp*.dll bin
The system cannot find the path specified."
The folder deps\assimp\bin does not exist (only include and lib).

I am so excited for this project btw, I really admire your patience and determination with it!

travisvroman

2026-11-11 14:16

administrator   ~0000009

Thanks for re-checking this! The last 2 items should be resolved in trunk as of r114. At this point I'm just going to write off v0.13 since there are also a lot of changes for v0.14 in there.

Issue History

Date Modified Username Field Change
2026-10-27 21:54 aski97 New Issue
2026-10-27 21:54 aski97 Status new => assigned
2026-10-27 21:54 aski97 Assigned To => travisvroman
2026-10-27 21:54 aski97 Tag Attached: assets
2026-10-27 21:54 aski97 Tag Attached: build
2026-10-27 21:54 aski97 Tag Attached: dependencies
2026-10-27 21:54 aski97 Tag Attached: makefile
2026-10-27 21:54 aski97 Tag Attached: Windows
2026-10-27 21:54 aski97 File Added: Screenshot 2026-10-27 223034.png
2026-10-27 21:54 aski97 File Added: Screenshot 2026-10-27 223226.png
2026-10-28 17:43 travisvroman Note Added: 0000005
2026-10-28 20:04 aski97 Note Added: 0000006
2026-10-28 20:04 aski97 File Added: Screenshot 2026-10-27 231937.png
2026-10-28 20:04 aski97 File Added: Screenshot 2026-10-27 232254.png
2026-10-28 20:04 aski97 File Added: Screenshot 2026-10-27 232309.png
2026-10-29 03:00 travisvroman Note Added: 0000007
2026-10-29 13:59 travisvroman Note Edited: 0000007
2026-10-30 22:14 aski97 Note Added: 0000008
2026-11-11 14:16 travisvroman Priority normal => high
2026-11-11 14:16 travisvroman Status assigned => resolved
2026-11-11 14:16 travisvroman Resolution open => fixed
2026-11-11 14:16 travisvroman Product Version => v0.14.0
2026-11-11 14:16 travisvroman Fixed in Version => v0.14.0
2026-11-11 14:16 travisvroman Target Version => v0.14.0
2026-11-11 14:16 travisvroman Note Added: 0000009