im-tomu / fomu-toolchain

A collection of tools for developing for Fomu
81 stars 11 forks source link

Zig example broken #27

Closed mithro closed 3 years ago

mithro commented 3 years ago

https://github.com/im-tomu/fomu-toolchain/runs/3501436881?check_suite_focus=true

RISC-V Zig Example
  + cd riscv-zig-blink
  + zig build
  .\src\fomu.zig:57:34: error: container 'std.io' has no member called 'Writer'
  pub const messibleWriter = std.io.Writer(void, WriteError, messibleWrite){ .context = {} };
                                   ^
  .\src\fomu.zig:43:5: note: referenced here
      messibleWriter.print("PANIC: {s}\r\n", .{message}) catch void;
      ^
  riscv-zig-blink...The following command exited with error code 1:
  C:\ProgramData\Chocolatey\lib\zig\tools\zig-windows-x86_64-0.6.0\zig.exe build-exe D:\a\fomu-toolchain\fomu-toolchain\riscv-zig-blink\src\main.zig --cache-dir D:\a\fomu-toolchain\fomu-toolchain\riscv-zig-blink\zig-cache --name riscv-zig-blink -target riscv32-freestanding-none -mcpu generic_rv32 --linker-script D:\a\fomu-toolchain\fomu-toolchain\riscv-zig-blink\ld\linker.ld --cache on 

  Build failed. The following command failed:
  D:\a\fomu-toolchain\fomu-toolchain\riscv-zig-blink\zig-cache\o\iitzuNv-_qFTArx5yWq3vlJWPHN3M0w1Kwt8wi5aRZ1UXEigtZDnYiSfBEFKUyIg\build.exe C:\ProgramData\Chocolatey\lib\zig\tools\zig-windows-x86_64-0.6.0\zig.exe D:\a\fomu-toolchain\fomu-toolchain\riscv-zig-blink D:\a\fomu-toolchain\fomu-toolchain\riscv-zig-blink\zig-cache
mithro commented 3 years ago

@daurnimator - Could you help here?

daurnimator commented 3 years ago

@daurnimator - Could you help here?

What version of zig do you have? zig version

EDIT: oh I see this is a running in CI question. https://github.com/im-tomu/fomu-toolchain/blob/0beffe71246f34c1223c7253fba3ddf6aff0b002/.github/workflows/update.yml#L85-L86

This needs updating to 0.8.0.

Breakage likely to be via https://github.com/im-tomu/fomu-workshop/pull/520/files ?

umarcor commented 3 years ago

I'm bumping it in #28.

As a further enhancement, once we get familiar with composite actions, we might want to reuse the steps that install zig, so that the versions used in fomu-workshop and here do always match.

umarcor commented 2 years ago

@daurnimator it seems that the Zig example is failing: https://github.com/im-tomu/fomu-toolchain/runs/5780475821?check_suite_focus=true#step:11:6457

  ./build.zig:17:32: error: no member named 'path' in '[]const u8'
      elf.setLinkerScriptPath(.{ .path = "ld/linker.ld" });

Would you mind having a look?

The build.zig file is https://github.com/im-tomu/fomu-workshop/blob/master/riscv-zig-blink/build.zig#L17

daurnimator commented 2 years ago

@umarcor the workshop repository upgraded to zig 0.9.0 (https://github.com/im-tomu/fomu-workshop/pull/610); it seems this repository needs to do the same.