HellOS icon indicating copy to clipboard operation
HellOS copied to clipboard

Fails to compile with stage2 zig compiler

Open cubranic opened this issue 6 years ago • 3 comments

Zig stage2 built from HEAD fails with the following error:

~/HellOS$ ../zig/build/stage2/bin/zig  build-exe hellos.zig --target-os freestanding --target-arch i386 --static  --linker-script linker.ld
Build 1 compile errors:
hellos.zig:14:31: error: Expected '=' or ';', found Keyword_section
export var multiboot align(4) section(".multiboot") = MultiBoot.{
                              ~~~~~~~

cubranic avatar Nov 06 '18 19:11 cubranic

This is https://github.com/ziglang/zig/issues/1152

But in general, stage2 is far from complete. See this section from the readme:

Note: Stage 2 compiler is not complete. Beta users of Zig should use the Stage 1 compiler for now.

andrewrk avatar Nov 06 '18 19:11 andrewrk

Ah, thanks, I don't know how I missed that part of Zig readme. So, close this bug?

cubranic avatar Nov 06 '18 19:11 cubranic

Well, it's not wrong :) Maybe I'll leave it up as motivation to get stage2 far enough to be able to build this.

andrewrk avatar Nov 06 '18 19:11 andrewrk