Skip to content

Cannot use system SDL3 #191

Description

@knightpp

It seems there's something wrong in build script with dvui setup? I cannot build with zig build -fsys=sdl3 which results in the following error.

$ zig build -fsys=sdl3
install
└─ install fizzy
   └─ compile exe fizzy Debug native
      └─ translate-c 2 errors
error: translation failure
/home/user/src/forks/fizzy/zig-pkg/dvui-0.5.0-dev-AQFJmWiB-gCtzdvo-D5qGOj-k7nNvIsFEq-nYctwzDvZ/src/backends/sdl3-c.h:29:10: error: 'SDL3/SDL.h' not found
#include "SDL3/SDL.h"
         ^
error: 2 compilation errors
failed command: /home/user/.cache/zig/p/N-V-__8AAFFSVRWqblwBIcA-Yqv-u7sbjsJoww8K0mWaHbmJ/zig translate-c -lc --cache-dir .zig-cache --global-cache-dir /home/user/.cache/zig /home/user/src/forks/fizzy/zig-pkg/dvui-0.5.0-dev-AQFJmWiB-gCtzdvo-D5qGOj-k7nNvIsFEq-nYctwzDvZ/src/backends/sdl3-c.h --listen=-

Build Summary: 40/44 steps succeeded (1 failed)
install transitive failure
└─ install fizzy transitive failure
   └─ compile exe fizzy Debug native transitive failure
      └─ translate-c 2 errors

error: the following build command failed with exit code 1:
.zig-cache/o/c999a1278854fd01c9f220be48da3318/build /home/user/.cache/zig/p/N-V-__8AAFFSVRWqblwBIcA-Yqv-u7sbjsJoww8K0mWaHbmJ/zig /home/user/.cache/zig/p/N-V-__8AAFFSVRWqblwBIcA-Yqv-u7sbjsJoww8K0mWaHbmJ/lib /home/user/src/forks/fizzy .zig-cache /home/user/.cache/zig --seed 0xa8690fa7 -Zc9264a5342a8ad69 -fsys=sdl3
fizzy

Pkg config shows sdl3 headers correctly.

$ pkg-config --cflags sdl3
-I/nix/store/snvmigqwhchfaj33vx7wq7qi9rvmvps4-sdl3-3.4.10-dev/include

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions