Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 RISCV64 Compilation not supported #1348

Open
ifsheldon opened this issue Nov 9, 2024 · 0 comments
Open

🐛 RISCV64 Compilation not supported #1348

ifsheldon opened this issue Nov 9, 2024 · 0 comments
Labels
Priority: Normal Minor issue impacting one or more users Type: Bug Something isn't working

Comments

@ifsheldon
Copy link

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
    $(error This system's architecture $(LOCAL_ARCH) isn't supported)

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.

@ifsheldon ifsheldon added Priority: Normal Minor issue impacting one or more users Type: Bug Something isn't working labels Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Normal Minor issue impacting one or more users Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant