andrewrk / HellOS

"hello world" x86 kernel example
261 stars 36 forks source link

Fails to compile with stage2 zig compiler #1

Open cubranic opened 5 years ago

cubranic commented 5 years ago

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.{
                              ~~~~~~~
andrewrk commented 5 years ago

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.

cubranic commented 5 years ago

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

andrewrk commented 5 years ago

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