Skip to content

Instantly share code, notes, and snippets.

@rtfb
Created August 22, 2026 20:47
Show Gist options
  • Select an option

  • Save rtfb/61a02abf04cee5c5f040818c874b9c23 to your computer and use it in GitHub Desktop.

Select an option

Save rtfb/61a02abf04cee5c5f040818c874b9c23 to your computer and use it in GitHub Desktop.
Build failure log for SDL and customised SDL_image
$ zig build run --fork=../zig-SDL_image/
info: fork ../zig-SDL_image/ matched 1 SDL_image packages
run
└─ run exe repro
└─ compile exe repro Debug native 1 errors
src/main.zig:36:64: error: expected type '[*c]sdl.struct_SDL_Surface', found '[*c]SDL_image.struct_SDL_Surface'
const texture = sdl.SDL_CreateTextureFromSurface(renderer, surface);
^~~~~~~
src/main.zig:36:64: note: pointer type child 'SDL_image.struct_SDL_Surface' cannot cast into pointer type child 'sdl.struct_SDL_Surface'
.zig-cache/o/bedec88e39ff71de5c94937e9cb51ed6/SDL_image.zig:2239:39: note: struct declared here
pub const struct_SDL_Surface = extern struct {
~~~~~~~^~~~~~
.zig-cache/o/9fb9eae5523fd6865d2348b9677536ea/sdl.zig:2170:39: note: struct declared here
pub const struct_SDL_Surface = extern struct {
~~~~~~~^~~~~~
.zig-cache/o/9fb9eae5523fd6865d2348b9677536ea/sdl.zig:6020:79: note: parameter type declared here
pub extern fn SDL_CreateTextureFromSurface(renderer: ?*SDL_Renderer, surface: [*c]SDL_Surface) [*c]SDL_Texture;
^~~~~~~~~~~~~~~
referenced by:
callMain [inlined]: /opt/homebrew/Cellar/zig/0.16.0_1/lib/zig/std/start.zig:698:59
callMainWithArgs [inlined]: /opt/homebrew/Cellar/zig/0.16.0_1/lib/zig/std/start.zig:638:20
main: /opt/homebrew/Cellar/zig/0.16.0_1/lib/zig/std/start.zig:663:28
1 reference(s) hidden; use '-freference-trace=4' to see all references
error: 1 compilation errors
failed command: /opt/homebrew/Cellar/zig/0.16.0_1/bin/zig build-exe -ODebug --dep sdl3 --dep sdl3_img -Mroot=/Users/rtfb/src/zig-sdl-image-build-repro/src/main.zig .zig-cache/o/9e7f3af4a8a467e8b6838979b692d6d3/libSDL3.a -ODebug -I .zig-cache/o/41636381bf1242a266dd9e10bab5a326 -Msdl3=.zig-cache/o/9fb9eae5523fd6865d2348b9677536ea/sdl.zig .zig-cache/o/b5f4da0174dc8a6b0d146b4d20d95dd6/libSDL3_image.a -ODebug -I .zig-cache/o/240f371839318cc6e23d0f52fa98ccb7 -Msdl3_img=.zig-cache/o/bedec88e39ff71de5c94937e9cb51ed6/SDL_image.zig -liconv .zig-cache/o/a31b202cb5664bfbe90da8d66170a6c4/libSDL3.a -framework Cocoa -framework IOKit -framework ForceFeedback -framework CoreVideo -framework CoreAudio -framework CoreHaptics -framework CoreFoundation -framework CoreMedia -framework CoreGraphics -framework Carbon -framework Metal -framework QuartzCore -framework AudioToolbox -framework AVFoundation -framework Foundation -framework GameController -framework CoreBluetooth -framework UniformTypeIdentifiers -framework ApplicationServices -lc --cache-dir .zig-cache --global-cache-dir /Users/rtfb/.cache/zig --name repro --zig-lib-dir /opt/homebrew/Cellar/zig/0.16.0_1/lib/zig/ --listen=-
Build Summary: 10/13 steps succeeded (1 failed)
run transitive failure
└─ run exe repro transitive failure
└─ compile exe repro Debug native 1 errors
error: the following build command failed with exit code 1:
.zig-cache/o/42a70a159a3855489231cf7555a13688/build /opt/homebrew/Cellar/zig/0.16.0_1/bin/zig /opt/homebrew/Cellar/zig/0.16.0_1/lib/zig /Users/rtfb/src/zig-sdl-image-build-repro .zig-cache /Users/rtfb/.cache/zig --seed 0x9f778ceb -Z65440bc69c0b59c3 run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment