Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building instructions #2

Open
JanWerder opened this issue May 12, 2024 · 2 comments
Open

Building instructions #2

JanWerder opened this issue May 12, 2024 · 2 comments

Comments

@JanWerder
Copy link

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?

@hazelnutcloud
Copy link
Owner

I believe you would need to copy the built library from zig-out/lib into godot/addons/godot-llama-cpp/lib (create the lib directory if it's not already there).

@hazelnutcloud
Copy link
Owner

FYI I've just updated the readme to include more detailed build instructions. Let me know if you are running into any problems with it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants