Skip to content

Add RISC-V (riscv64) architecture support#1008

Merged
schollz merged 3 commits intomainfrom
copilot/fix-croc-installer-riscv
Nov 20, 2025
Merged

Add RISC-V (riscv64) architecture support#1008
schollz merged 3 commits intomainfrom
copilot/fix-croc-installer-riscv

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 20, 2025

The installer script fails on RISC-V systems with a 404 error because riscv64 architecture maps to unknown, generating a non-existent release filename (croc_v10.3.0_Linux-unknown.tar.gz).

Changes

  • .github/workflows/release.yml: Added RISC-V to the build matrix

    - goos: linux
      goarch: riscv64
      name: Linux-RISCV64
      ext: ""
      archive: tar.gz
  • .github/workflows/ci.yml: Added RISC-V build to CI testing

    CGO_ENABLED=0 GOOS=linux GOARCH=riscv64 go build -ldflags '-extldflags "-static"' -o croc-linux-riscv64
  • src/install/default.txt: Added architecture mapping

    "riscv64" ) croc_arch="RISCV64";;

GitHub Actions will now build croc_v10.3.0_Linux-RISCV64.tar.gz during releases and the installer will correctly download it on RISC-V systems.

[!WARNING]

Original prompt

This section details on the original issue you should resolve

<filter_complete></filter_complete>

<issue_title>[Bug]: Croc Installer failed on RISC-V</issue_title>
<issue_description>### What happened?

I tried to install croc from the command line, but the installer failed:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 25607 100 25607   0     0 31509     0  --:--:-- --:--:-- --:--:-- 31496
=================================================
              ____
             / ___|_ __ ___   ___
            | |   | '__/ _ \ / __|
            | |___| | | (_) | (__
             \____|_|  \___/ \___|

       ___           _        _ _
      |_ _|_ __  ___| |_ __ _| | | ___ _ __
       | || '_ \/ __| __/ _` | | |/ _ \ '__|
       | || | | \__ \ || (_| | | |  __/ |
      |___|_| |_|___/\__\__,_|_|_|\___|_| 
==================================================
== Install prefix set to /usr/local/bin
== Created temp dir at /tmp/croc.aHDJGD
== Architecture detected as riscv64
== OS detected as Linux
https://github.com/schollz/croc/releases/download/v10.3.0/croc_v10.3.0_Linux-unknown.tar.gz /tmp/croc.aHDJGD croc_v10.3.0_Linux-unknown.tar.gz
curl: (22) The requested URL returned error: 404
== Return code of download tool returned an unexpected value of 22

It looks like there is no release for riscv64 and the installer script falls back to Linux-unknown.tar.gz which doesn't exist either

What did you expect to happen?

I hoped it would work

Steps to reproduce

I ran this on a RISC-V (RV64GC) machine:

curl https://getcroc.schollz.com | bash

croc version

10.3.0 I guess??

Operating System

Linux

OS Version

Debian GNU/Linux forky/sid

Relevant log output

Additional context

(this is really a feature request for RISC-V support, but GitHub forces me to use a bug template for some reason)</issue_description>

Comments on the Issue (you are @copilot in this section)

Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug]: Croc Installer failed on RISC-V</issue_title>
<issue_description>### What happened?

I tried to install croc from the command line, but the installer failed:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 25607 100 25607   0     0 31509     0  --:--:-- --:--:-- --:--:-- 31496
=================================================
              ____
             / ___|_ __ ___   ___
            | |   | '__/ _ \ / __|
            | |___| | | (_) | (__
             \____|_|  \___/ \___|

       ___           _        _ _
      |_ _|_ __  ___| |_ __ _| | | ___ _ __
       | || '_ \/ __| __/ _` | | |/ _ \ '__|
       | || | | \__ \ || (_| | | |  __/ |
      |___|_| |_|___/\__\__,_|_|_|\___|_| 
==================================================
== Install prefix set to /usr/local/bin
== Created temp dir at /tmp/croc.aHDJGD
== Architecture detected as riscv64
== OS detected as Linux
https://github.com/schollz/croc/releases/download/v10.3.0/croc_v10.3.0_Linux-unknown.tar.gz /tmp/croc.aHDJGD croc_v10.3.0_Linux-unknown.tar.gz
curl: (22) The requested URL returned error: 404
== Return code of download tool returned an unexpected value of 22

It looks like there is no release for riscv64 and the installer script falls back to Linux-unknown.tar.gz which doesn't exist either

What did you expect to happen?

I hoped it would work

Steps to reproduce

I ran this on a RISC-V (RV64GC) machine:

curl https://getcroc.schollz.com | bash

croc version

10.3.0 I guess??

Operating System

Linux

OS Version

Debian GNU/Linux forky/sid

Relevant log output

Additional context

(this is really a feature request for RISC-V support, but GitHub forces me to use a bug template for some reason)</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: schollz <6550035+schollz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix croc installer failure on RISC-V architecture Add RISC-V (riscv64) architecture support Nov 20, 2025
Copilot AI requested a review from schollz November 20, 2025 14:37
@schollz
Copy link
Copy Markdown
Owner

schollz commented Nov 20, 2025

@copilot don't use go releaser, use the GitHub action to build the risc build

Co-authored-by: schollz <6550035+schollz@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 20, 2025

@copilot don't use go releaser, use the GitHub action to build the risc build

Done! I've removed the goreleaser changes and added RISC-V builds to the GitHub Actions workflows instead:

  • Added to .github/workflows/release.yml (builds croc_v10.3.0_Linux-RISCV64.tar.gz)
  • Added to .github/workflows/ci.yml for CI testing
  • Kept the installer script mapping (riscv64RISCV64)

Commit: 4e07a4d

@schollz schollz marked this pull request as ready for review November 20, 2025 14:58
@schollz schollz merged commit dd13384 into main Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Croc Installer failed on RISC-V

2 participants