Zig or Raylib issue?

Just started learning Zig! I was messing around with Raylib in version 0.16. Just upgraded to version 0.17 and started a new project. I fetched this commit hash of Raylib for my build.zig.zon file: GitHub - raylib-zig/raylib-zig: Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib · GitHub

But when I run my program, I see what looks like an assertion error. I never saw this when running 0.16. The only source file is a main.zig file:

const rl = @import("raylib");

pub fn main() !void {}

And when I zig build run this is the output:

run
└─ run exe zig_raylib_test_17
   └─ compile exe zig_raylib_test_17 debug native
      └─ compile lib raylib debug native failure

(pkg-config:15311): GLib-CRITICAL **: 20:17:06.303: g_string_insert_len: assertion 'len == 0 || val != NULL' failed
error: 
       (pkg-config:15311): GLib-CRITICAL **: 20:17:06.303: g_string_insert_len: assertion 'len == 0 || val != NULL' failed
       

The weird thing is, if I add more stuff to the program, like a render loop with a red rectangle I can move with arrow keys, the program seems to work fine. I guess nothing’s actually wrong? Is that error an issue with Raylib or my code? What’s going on here?

To me it looks like an issue with pkg-config? That is, neither your code, nor Raylib, but with your system. Googling your error message gives this result which might be a useful breadcrumb for you to follow.

https://askubuntu.com/questions/1134494/strange-glib-error-in-pkg-config-result

@OffsetMagnet Were you able to find a solution? I’ve tried re-installing my glibc, and it doesn’t seem to have made a difference for me.

@TrashBandit No I haven’t solved this. @alanza Thank you for that link. I tried some of the suggestions there but nothing removed the error. The main thing I tried was re-installing pkg-config but that had no effect. I also ran sudo dpkg --verify. And one of the packages it listed as missing was gdk-pixbuf-2.0. Since that package seems to deal with image loading (something Raylib might interact with) I tried installing that. But no change. dpkg --verify even still lists it as missing.

But most importantly, this hasn’t stopped me from coding in Zig or messing around with Raylib. Other than this error everything seems to behave normally. So I’m tempted to just ignore it.

Thanks for the update! I couldn’t find anything either, but I did eventually get zig to compile with 0.16.0 so I’m gonna ignore it for now too. I kinda think an update to my OS is causing it (pop_os), so maybe it’ll fix itself with a future update!

I’m on pop_os too! That’s weirdly encouraging. It must be a system issue then.

Ah! Okay, I’m encouraged by that too! Hopefully another update will magically fix it :rofl: