Skip to content

Building instructions #2

@JanWerder

Description

@JanWerder

Godot version

v4.2.2

godot-cpp version

latest

System information

Windows 11

Issue description

Can you add some more details on how to build this addon?
It seems like it uses ziglang to build. So here's what I've done so far:

winget install zig.zig to install zig.
git clone https://github.com/hazelnutcloud/godot-llama-cpp.git
git submodule init
git submodule update
zig build

I get the error

thread 16232 panic: VK_SDK_PATH not set
C:\Users\janwe\dev\godot-llama-cpp\build.zig:289:74: 0x29b6ca in buildObj (build.exe.obj)
        const vk_path = params.b.graph.env_map.get("VK_SDK_PATH") orelse @panic("VK_SDK_PATH not set");
                                                                         ^
C:\Users\janwe\dev\godot-llama-cpp\build.zig:73:27: 0x298d14 in build (build.exe.obj)
    const llama = buildObj(.{
                          ^
C:\Users\janwe\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-windows-x86_64-0.12.0\lib\std\Build.zig:2080:43: 0x27d8b6 in runBuild__anon_8938 (build.exe.obj)
        .ErrorUnion => try build_zig.build(b),
                                          ^
C:\Users\janwe\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-windows-x86_64-0.12.0\lib\compiler\build_runner.zig:300:29: 0x279034 in main (build.exe.obj)
        try builder.runBuild(root);
                            ^
C:\Users\janwe\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-windows-x86_64-0.12.0\lib\std\start.zig:350:53: 0x27f8fc in WinStartup (build.exe.obj)
    std.os.windows.ntdll.RtlExitUserProcess(callMain());
                                                    ^
???:?:?: 0x7ffb7ab3257c in ??? (KERNEL32.DLL)
???:?:?: 0x7ffb7b5eaa47 in ??? (ntdll.dll)
error: unable to read results of configure phase from 'C:\Users\janwe\dev\godot-llama-cpp\zig-cache\tmp\f115ddaf0467eb8e': FileNotFound

VK SDK seems to be the Vulkan SDK, so I've installed that:
winget install KhronosGroup.VulkanSDK
This adds the Env-Variable, but the Console needs to be reopened.

After that the building completes successfully. But when I open the godot project in the godot-llama-cpp repo the project fails building in godot with the error Could not find type 'LlamaBackend' in the current scope.
It seems like I'm missing a step. Can you tell me what I need to do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions