Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

🐛 RISCV64 Compilation not supported

未关闭 适合新手
#1,348 0 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
go
领域
build-system

调研方向

从 Makefile 第 78 行附近的架构选择开始,检查报告中的 riscv64 分支。运行文档中说明的 RISC-V 设置和 make cloudflared;当构建完成并在 riscv64 上生成可正常工作的 cloudflared 二进制文件时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Priority: Normal Type: Bug

Describe the bug
RISC-V compilation is not supported, even though a minor change can unblock it. So, I'd make it a bug report, rather than a feature request.

To Reproduce
Steps to reproduce the behavior:

  1. Download the official Golang toolchain for RISC-V
  2. Set GOROOT_BOOTSTRAP to this go toolchain, e.g., $HOME/go
  3. Manually execute the commands in https://github.com/cloudflare/cloudflared/blob/master/.teamcity/install-cloudflare-go.sh
  4. Clone this repo
  5. Set GOPATH to the compiled cloudflare-flavored go, e.g., /tmp/go
  6. Run make cloudflared
  7. Then we get an error This system's architecture riscv64 isn't supported from here https://github.com/cloudflare/cloudflared/blob/1f3e3045adba24d855eb8287e521a089909345cb/Makefile#L78

Expected behavior
Compiling from source for RISC-V machines is supported.

Environment and versions

  • OS: Linux Debian
  • Architecture: riscv64
  • Version: master at 1f3e304

Simple Fix

I just appended two lines

else ifeq ($(LOCAL_ARCH),riscv64)
    TARGET_ARCH ?= riscv64

Then everything went smoothly and the compiled cloudflared worked great.

If you are willing to accept a PR, I can make one in no time.

主要语言
Go
星标
15.8k
派生
1.4k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cloudflare/cloudflared 的其他 Issue

查看 cloudflare/cloudflared 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。