gpu-dawn: update README to clarify how to build as separate repo #203

Closed
opened 2022-04-01 01:49:37 +00:00 by emidoots · 2 comments
emidoots commented 2022-04-01 01:49:37 +00:00 (Migrated from github.com)

Moved here from https://github.com/hexops/mach-gpu-dawn/issues/1 (trying to keep all issues in this tracker)

@freakynit wrote:


Just tried building from source using following 3 commands:

git clone https://github.com/hexops/mach-gpu-dawn
cd mach-gpu-dawn
zig build -Ddawn-from-source=true

Getting build error immediately:

/Users/nitin/dev/github/mach-gpu-dawn/build.zig:4:28: error: unable to load '/Users/nitin/dev/github/mach-gpu-dawn/libs/mach-glfw/system_sdk.zig': FileNotFound
const system_sdk = @import("libs/mach-glfw/system_sdk.zig");
                           ^
/Users/nitin/dev/github/mach-gpu-dawn/build.zig:3:22: error: unable to load '/Users/nitin/dev/github/mach-gpu-dawn/libs/mach-glfw/build.zig': FileNotFound
const glfw = @import("libs/mach-glfw/build.zig");

zig version: 0.9.0

My system:
MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)
macos BigSur (Version: 11.5.1 (20G80))
Processor: 2 GHz Quad-Core Intel Core i5
Graphics: Intel Iris Plus Graphics 1536 MB

Moved here from https://github.com/hexops/mach-gpu-dawn/issues/1 (trying to keep all issues in this tracker) @freakynit wrote: --- Just tried building from source using following 3 commands: ``` git clone https://github.com/hexops/mach-gpu-dawn cd mach-gpu-dawn zig build -Ddawn-from-source=true ``` Getting build error immediately: ``` /Users/nitin/dev/github/mach-gpu-dawn/build.zig:4:28: error: unable to load '/Users/nitin/dev/github/mach-gpu-dawn/libs/mach-glfw/system_sdk.zig': FileNotFound const system_sdk = @import("libs/mach-glfw/system_sdk.zig"); ^ /Users/nitin/dev/github/mach-gpu-dawn/build.zig:3:22: error: unable to load '/Users/nitin/dev/github/mach-gpu-dawn/libs/mach-glfw/build.zig': FileNotFound const glfw = @import("libs/mach-glfw/build.zig"); ``` zig version: 0.9.0 **My system:** MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports) macos BigSur (Version: 11.5.1 (20G80)) Processor: 2 GHz Quad-Core Intel Core i5 Graphics: Intel Iris Plus Graphics 1536 MB
emidoots commented 2022-04-01 01:49:48 +00:00 (Migrated from github.com)

Thanks for filing this, sorry I didn't see it sooner.

You will need to replace a symlinks with a clone of a dependency, this is a bit of a hack until Zig gets a proper package manager, sorry about that.

git clone https://github.com/hexops/mach-gpu-dawn
cd mach-gpu-dawn/
rm -rf libs/mach-glfw
git clone https://github.com/hexops/mach-glfw libs/mach-glfw

Then you should be able to proceed with zig build -Ddawn-from-source=true

Please make sure to use Zig v0.10 (nightly), not v0.9, which you can get a binary release of at the top of this page: https://ziglang.org/download/

I'll update the README soon to clarify this, sorry for the trouble! Let me know if that doesn't help.

Thanks for filing this, sorry I didn't see it sooner. You will need to replace a symlinks with a clone of a dependency, this is a bit of a hack until Zig gets a proper package manager, sorry about that. ``` git clone https://github.com/hexops/mach-gpu-dawn cd mach-gpu-dawn/ rm -rf libs/mach-glfw git clone https://github.com/hexops/mach-glfw libs/mach-glfw ``` Then you should be able to proceed with `zig build -Ddawn-from-source=true` Please make sure to use Zig v0.10 (nightly), not v0.9, which you can get a binary release of at the top of this page: https://ziglang.org/download/ I'll update the README soon to clarify this, sorry for the trouble! Let me know if that doesn't help.
freakynit commented 2022-04-02 09:26:40 +00:00 (Migrated from github.com)

It worked 👍 Thanks @slimsag

It worked 👍 Thanks @slimsag
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#203
No description provided.