Open penberg opened 1 year ago
I'm running into the same issue.
FWIW, I was able to build for Pg 15 with zig version 0.11.0-dev.3857+7322aa118 -- but can't get it to build for 14.
@psarna
I wonder if this issue is platform-specific, with that specific zig 0.11 version as well. First thing, I'll try to make pg_turso work with zig 0.12 -- last time I tried, I hit a TODO implement readFromMemory for more types
. Zigs are released daily, so it might have been fixed already, otherwise I'll dig further and try to fix the compiler issue. Once I have that, I'll try to figure out why postgres 14 headers get properly generated for me, and not on your arch/OS.
Now I hit either https://github.com/ziglang/zig/issues/17287 or similar:
zig build-lib pg_turso Debug native: error: the following command failed with 2 compilation errors:
/usr/lib/zig/zig build-lib -freference-trace=256 /home/sarna/repo/pgturso/src/main.zig -lc --cache-dir /home/sarna/repo/pgturso/zig-cache --global-cache-dir /home/sarna/.cache/zig --name pg_turso -dynamic --version 0.1.0 -I /home/sarna/repo/pgturso/postgres/src/include --listen=-
Build Summary: 0/3 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
└─ install pg_turso transitive failure
└─ zig build-lib pg_turso Debug native 2 errors
/home/sarna/repo/pgturso/zig-cache/o/96c3fe63658d93a8238a5b8dd049db43/cimport.zig:4783:49: error: struct '.home.sarna.repo.pgturso.zig-cache.o.96c3fe63658d93a8238a5b8dd049db43.cimport.struct_OutputPluginCallbacks' depends on itself
pub const struct_OutputPluginCallbacks = extern struct {
~~~~~~~^~~~~~
it's weird though, when I look at the generated zig code, the struct doesn't seem to depend on itself... maybe it's some indirect dependency
We currently target PostgreSQL 15, but Fedora, for example, has PostgreSQL 14. Unfortunately due to PostgreSQL differences, the extension doesn't build: