ikskuh / zyclone

A game engine modelled after the Acknex A8 engine which is used for Gamestudio A8.
Other
6 stars 1 forks source link

Can't compile with newest Zig #1

Open wilsonk opened 2 years ago

wilsonk commented 2 years ago

Using zig version 0.11.0-dev.19+c22f17e15 (from yesterday Nov 1, 2022), I received an 'access of inactive union field' error? Weird, I haven't seen this anywhere before? Anyways, here is the error output...maybe you have an idea what is going on :) :

Semantic Analysis [5807] thread 809597 panic: access of inactive union field
/home/wilsonk/Downloads/zig/src/Autodoc.zig:1174:53: 0x555c4beda44f in Autodoc.walkInstruction (zig2)
                .typeRef = self.decls.items[lhs.expr.declRef].value.typeRef,
                                                    ^
/home/wilsonk/Downloads/zig/src/Autodoc.zig:4300:36: 0x555c4bef1467 in Autodoc.walkRef (zig2)
        return self.walkInstruction(file, parent_scope, parent_src, zir_index, need_type);
                                   ^
.
.
.
/home/wilsonk/Downloads/zig/src/main.zig:230:31: 0x555c4bcf36db in main.mainArgs (zig2)
        return buildOutputType(gpa, arena, args, .{ .build = .Exe });
                              ^
/home/wilsonk/Downloads/zig/src/stage1.zig:56:24: 0x555c4bcf3095 in main (zig2)
        stage2.mainArgs(gpa, arena, args) catch unreachable;
                       ^
error: future_demo...
error: The following command terminated unexpectedly:
/home/wilsonk/Downloads/zig/build/zig2 build-exe /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/src/main/desktop.zig -lc -I/usr/include/SDL2 -D_REENTRANT -lSDL2 -cflags -std=c99 -- /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/src/rendering/stb_truetype.c /home/wilsonk/Downloads/zyclone/zig-cache/o/db3216b71d702da46f4c17a6300c7a93/libscintilla.a /home/wilsonk/Downloads/zyclone/zig-cache/o/ef7910f39b64b7595302dba7f9df28bd/libnfd.a /home/wilsonk/Downloads/zyclone/zig-cache/o/37cf7d9b5a9b2e8047b4fd7bb57968a3/libode.a /home/wilsonk/Downloads/zyclone/zig-cache/o/aac1917078c5379f054f9aa4d8232b51/libsoundio.a -lc -lc++ -lc -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -latk-1.0 -lgobject-2.0 -lglib-2.0 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lgobject-2.0 -lglib-2.0 -lgtk-3 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -lglib-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -lgobject-2.0 -lglib-2.0 -lc -lc++ -lc -ljack -lpulse -lasound -femit-docs=docs/ --cache-dir /home/wilsonk/Downloads/zyclone/zig-cache --global-cache-dir /home/wilsonk/.cache/zig --name future_demo --pkg-begin build_options /home/wilsonk/Downloads/zyclone/zig-cache/options/QSH5xRGomdRqazqOgOPZIbdFvo4ESr1hDA3Vr4a50SaUI2Rwzda9eQcTzvoFMQqC --pkg-end --pkg-begin sdl2 /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/SDL.zig/src/binding/sdl.zig --pkg-begin build_options /home/wilsonk/Downloads/zyclone/zig-cache/options/kh59p23UXKId3bWMadeQ0Yp6cv2kATA4qPk2nBQ2q_3IsG9JTjKRYS1YxdIMHL6s --pkg-end --pkg-end --pkg-begin application /home/wilsonk/Downloads/zyclone/src/entrypoint.zig --pkg-begin zero-graphics /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/src/zero-graphics.zig --pkg-begin zigimg /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/zigimg/zigimg.zig --pkg-end --pkg-begin ziglyph /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/ziglyph/src/ziglyph.zig --pkg-end --pkg-begin zigstr /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/zigstr/src/Zigstr.zig --pkg-begin ziglyph /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/ziglyph/src/ziglyph.zig --pkg-end --pkg-end --pkg-begin TextEditor /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/text-editor/src/TextEditor.zig --pkg-begin ziglyph /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/ziglyph/src/ziglyph.zig --pkg-end --pkg-end --pkg-end --pkg-begin ziggysynth /home/wilsonk/Downloads/zyclone/vendor/ziggysynth/src/ziggysynth.zig --pkg-end --pkg-begin zlm /home/wilsonk/Downloads/zyclone/vendor/zlm/zlm.zig --pkg-end --pkg-begin maps /home/wilsonk/Downloads/zyclone/vendor/maps/src/maps.zig --pkg-end --pkg-begin libgamestudio /home/wilsonk/Downloads/zyclone/vendor/libgamestudio/src/main.zig --pkg-end --pkg-begin ode /home/wilsonk/Downloads/zyclone/vendor/ode/src/ode.zig --pkg-begin precision /home/wilsonk/Downloads/zyclone/vendor/ode/src/ode-single.zig --pkg-end --pkg-begin native /home/wilsonk/.cache/zig/o/ff3982ed7ede601b8182f715c0259df3/template.zig --pkg-end --pkg-end --pkg-begin @GAME@ /home/wilsonk/Downloads/zyclone/demo/future/future.zig --pkg-begin zyclone /home/wilsonk/Downloads/zyclone/src/package.zig --pkg-end --pkg-end --pkg-end --pkg-begin application-meta /home/wilsonk/Downloads/zyclone/zig-cache/zero-graphics/o/56946151a38540826f83b3d6e501327286e4eba7/app-meta.zig --pkg-end --pkg-begin zigimg /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/zigimg/zigimg.zig --pkg-end --pkg-begin ziglyph /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/ziglyph/src/ziglyph.zig --pkg-end --pkg-begin zigstr /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/zigstr/src/Zigstr.zig --pkg-begin ziglyph /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/ziglyph/src/ziglyph.zig --pkg-end --pkg-end --pkg-begin TextEditor /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/text-editor/src/TextEditor.zig --pkg-begin ziglyph /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/ziglyph/src/ziglyph.zig --pkg-end --pkg-end --pkg-begin scintilla /home/wilsonk/.cache/zig/o/3468c0d9ef845460cbff4199408d65d5/code_editor.zig --pkg-end --pkg-begin nfd /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/nfd/src/lib.zig --pkg-end -I /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/vendor/stb -I /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/src/scintilla -I /home/wilsonk/Downloads/zyclone/vendor/soundio --main-pkg-path /home/wilsonk/Downloads/zyclone/vendor/zero-graphics/src --enable-cache 
error: the following build command failed with exit code 6:
/home/wilsonk/Downloads/zyclone/zig-cache/o/c12b9ec460afad1a47c291612fc4c2b6/build /home/wilsonk/Downloads/zig/build/zig2 /home/wilsonk/Downloads/zyclone /home/wilsonk/Downloads/zyclone/zig-cache /home/wilsonk/.cache/zig
ikskuh commented 2 years ago

Yeah, the autodoc is exploding. We should create a bug report from that (i can do that tomorrow). For now, you can disable the emit_doc in the build.zig to bypass this

wilsonk commented 2 years ago

Ok, sounds good. I will just bypass for now. I tried a couple other zig versions back to Oct 21 and still got the same error...just so you know (and others that may check this error :) ).

wilsonk commented 2 years ago

Ugh, nope...now I am getting this error (with a brand new zig from a couple minutes ago or one from 5 days ago):

LLVM Emit Object... zig: /home/wilsonk/Downloads/llvm-project-15/llvm/include/llvm/CodeGen/ValueTypes.h:289: llvm::MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() && "Expected a SimpleValueType!"' failed.
error: future_demo...