# Translate C failure after upgrade to 0.16

**URL:** <https://ziggit.dev/t/translate-c-failure-after-upgrade-to-0-16/15067>\
**Category:** Help\
**Tags:** zig-0-16, translate-c\
**Created:** [April 20, 2026, 2:57pm UTC](https://ziggit.dev/t/translate-c-failure-after-upgrade-to-0-16/15067 "2026-04-20T14:57:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Southporter](https://ziggit.dev/user_avatar/ziggit.dev/southporter/32/2500_2.png) [@Southporter](https://ziggit.dev/u/Southporter)\
**Post date:** [April 20, 2026, 2:57pm UTC](https://ziggit.dev/t/translate-c-failure-after-upgrade-to-0-16/15067/1 "2026-04-20T14:57:32Z")

</div>

Code translation was working just fine in 0.15.2 using the `b.addTranslateC` step. After upgrading to 0.16, I’m now getting wall of issues from `glib`:

```zig
error: translation failure
/usr/include/glib-2.0//glib/gutils.h:327:1: error: unknown type name 'pragma'
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
^
/usr/include/glib-2.0//glib/gmacros.h:757:39: note: expanded from here
  _Pragma ("GCC diagnostic push")   
                                      ^
<scratch space>:74:2: note: expanded from here
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 ^
/usr/include/glib-2.0//glib/gutils.h:327:1: error: expected ';', found 'an identifier'
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
^
/usr/include/glib-2.0//glib/gmacros.h:757:39: note: expanded from here
  _Pragma ("GCC diagnostic push")   
                                      ^
<scratch space>:74:13: note: expanded from here
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

```

ad nauseum

I didn’t change anything with the translate C step

Build.zig

```zig
    const deps = b.addTranslateC(.{
        .root_source_file = b.path("c-deps.h"),
        .target = target,
        .optimize = optimize,
    });
    deps.addSystemIncludePath(.{ .cwd_relative = "/usr/include/gdk-pixbuf-2.0/" });
    deps.addSystemIncludePath(.{ .cwd_relative = "/usr/include/glib-2.0/" });
    deps.addSystemIncludePath(.{ .cwd_relative = "/usr/lib64/glib-2.0/include/" });
    deps.addSystemIncludePath(.{ .cwd_relative = "/usr/include/cairo/" });

```

header file:

```c
#include <cairo.h>
#include <gdk-pixbuf/gdk-pixbuf.h>

```

What am I missing?

---

<div class="post-metadata">

**Author:** ![vulpesx](https://ziggit.dev/user_avatar/ziggit.dev/vulpesx/32/3989_2.png) [@vulpesx](https://ziggit.dev/u/vulpesx)\
**Post date:** [April 20, 2026, 3:11pm UTC](https://ziggit.dev/t/translate-c-failure-after-upgrade-to-0-16/15067/2 "2026-04-20T15:11:09Z")

</div>

arocc is likely just not adding `#def`s it should be.

If you can figure out what those are, you can look for or make an issue since it is certainly a bug as it is _supposed_ to be a drop-in replacement.

---

<div class="post-metadata">

**Author:** ![Southporter](https://ziggit.dev/user_avatar/ziggit.dev/southporter/32/2500_2.png) [@Southporter](https://ziggit.dev/u/Southporter)\
**Post date:** [April 20, 2026, 3:23pm UTC](https://ziggit.dev/t/translate-c-failure-after-upgrade-to-0-16/15067/3 "2026-04-20T15:23:15Z")

</div>

That was what I thought as well. I think I found an issue related to it: [https://codeberg.org/ziglang/translate-c/issues/328](https://codeberg.org/ziglang/translate-c/issues/328)

I’ll have to wait for that to be resolved. (Or if I have time try to contribute a fix if I can figure it out).

---

<div class="post-metadata">

**Author:** ![LucasSantos91](https://ziggit.dev/user_avatar/ziggit.dev/lucassantos91/32/440_2.png) [@LucasSantos91](https://ziggit.dev/u/LucasSantos91)\
**Post date:** [April 20, 2026, 11:49pm UTC](https://ziggit.dev/t/translate-c-failure-after-upgrade-to-0-16/15067/4 "2026-04-20T23:49:26Z")

</div>

I think what changed was [this](https://ziglang.org/download/0.16.0/release-notes.html#C-Translation):

> Zig’s implementation of translate-c is now based on arocc and translate-c instead of libclang.

---

<div class="post-metadata">

**Author:** ![pachde](https://ziggit.dev/user_avatar/ziggit.dev/pachde/32/2485_2.png) [@pachde](https://ziggit.dev/u/pachde)\
**Post date:** [April 21, 2026, 3:54am UTC](https://ziggit.dev/t/translate-c-failure-after-upgrade-to-0-16/15067/5 "2026-04-21T03:54:41Z")

</div>

Yes, so what the situation now is working out all the implicit assumptions, accrued dependencies, and idiosyncratic accumulated cruft of two different implementatons of something we hoped was “standard” (C)

AKA ideal theory versus reality.

So, stuff comes up 🙂
