Skip to content

🐛 RISCV64 Compilation not supported #1348

@ifsheldon

Description

@ifsheldon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: NormalMinor issue impacting one or more usersType: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions