From 83ca607c50ae09cb005c3cdcb795f2b72d1c3378 Mon Sep 17 00:00:00 2001 From: speak-agent <248744407+speak-agent@users.noreply.github.com> Date: Thu, 20 Aug 2026 17:23:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20riscv-virt-rt=200.4.1=20=E2=80=94?= =?UTF-8?q?=E2=80=94=200.4.0=20=E7=9A=84=E9=9B=B6=20libc=20=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E7=94=9F=E6=88=90=E5=87=BA=E6=9D=A5=E8=B7=91=E4=B8=8D?= =?UTF-8?q?=E8=B5=B7=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 脚手架会把模板自己的包注入为依赖(好让模板不与库脱节),而本包的模块 #include ⇒ 在没有 C 库的目标上,那个从未被请求的依赖在工程本身之前就编不过。 0.4.1 声明 [template.inject] self = false(需 mcpp 2026.8.20.2+),并把「没有 C 库」 从错误改为不贡献,同时**照常发模拟器** —— 哪个模拟器能启动这台机器与哪份 libc 无关。 0.4.0 保留:它的默认模板不受影响。 ⚠️ 这是本轮唯一一次发布之后才发现的缺陷,发现方式是用发布后的包从零走一遍新用户流程。 --- pkgs/r/riscv-virt-rt.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pkgs/r/riscv-virt-rt.lua b/pkgs/r/riscv-virt-rt.lua index 5442dab..a857526 100644 --- a/pkgs/r/riscv-virt-rt.lua +++ b/pkgs/r/riscv-virt-rt.lua @@ -16,6 +16,14 @@ -- xpm PLATFORM level because mcpp materializes `[xlings] deps` for the ROOT -- project only, so a consumer running `mcpp add riscv-virt-rt` would otherwise -- get a board package with no way to start it. +-- ⚠️ 0.4.0's `nolibc` template generates a project that does not run. The +-- scaffolder injects the template's own package as a dependency, and this +-- package's module includes — so on a target with no C library the +-- injected dependency fails to compile before the generated project is +-- reached. 0.4.1 declines the injection (`[template.inject] self = false`, +-- mcpp 2026.8.20.2+) and stops treating an absent C library as an error, while +-- still supplying the emulator. 0.4.0 stays listed; its default template is +-- unaffected. package = { spec = "1", namespace = "mcpplibs", @@ -59,6 +67,13 @@ package = { }, sha256 = "2eef43aefb00905236a72d49924129c379e9d085fafdc4dd5c868e8a52b0414e", }, + ["0.4.1"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.4.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.4.1/riscv-virt-rt-0.4.1.tar.gz", + }, + sha256 = "ec8c09c1954b3e6552f5378bd14c34d7fe63ed23efc1fed4454801a4d6e71b46", + }, }, macosx = { deps = { "xim:qemu-riscv@9.2.4-1" }, @@ -90,6 +105,13 @@ package = { }, sha256 = "2eef43aefb00905236a72d49924129c379e9d085fafdc4dd5c868e8a52b0414e", }, + ["0.4.1"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.4.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.4.1/riscv-virt-rt-0.4.1.tar.gz", + }, + sha256 = "ec8c09c1954b3e6552f5378bd14c34d7fe63ed23efc1fed4454801a4d6e71b46", + }, }, windows = { deps = { "xim:qemu-riscv@9.2.4-1" }, @@ -121,6 +143,13 @@ package = { }, sha256 = "2eef43aefb00905236a72d49924129c379e9d085fafdc4dd5c868e8a52b0414e", }, + ["0.4.1"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/riscv-virt-rt/archive/refs/tags/0.4.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/riscv-virt-rt/releases/download/0.4.1/riscv-virt-rt-0.4.1.tar.gz", + }, + sha256 = "ec8c09c1954b3e6552f5378bd14c34d7fe63ed23efc1fed4454801a4d6e71b46", + }, }, },