Support Codex on ubuntu24.04 on RISC-V (riscv64)

Open 💬 9 comments Opened Nov 3, 2025 by joakimeriksson
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex --version file:///home/joakim/.npm-global/lib/node_modules/@openai/codex/bin/codex.js:59 throw new Error(Unsupported platform: ${platform} (${arch})); ^ Error: Unsupported platform: linux (riscv64) at file:///home/joakim/.npm-global/lib/node_modules/@openai/codex/bin/codex.js:59:9 at ModuleJob.run (node:internal/modules/esm/module_job:263:25) at async ModuleLoader.import (node:internal/modules/esm/loader:540:24) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) Node.js v20.19.0

What subscription do you have?

ChatGPT plus

Which model were you using?

none - I do not even get there.

What platform is your computer?

Linux 6.6.92-eic7x-2025.07 riscv64 riscv64

What issue are you seeing?

I cannot use Codex on my ubuntu24.04/riscv64 host. I do get this error:
codex --version
file:///home/joakim/.npm-global/lib/node_modules/@openai/codex/bin/codex.js:59
throw new Error(
Unsupported platform: ${platform} (${arch})`);
^

Error: Unsupported platform: linux (riscv64)
at file:///home/joakim/.npm-global/lib/node_modules/@openai/codex/bin/codex.js:59:9
at ModuleJob.run (node:internal/modules/esm/module_job:263:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:540:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)

Node.js v20.19.0
`

What steps can reproduce the bug?

Run Codex on ubuntu24.04 / riscv64.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

9 Comments

etraut-openai contributor · 9 months ago

We don't provide a binary for riscv64 currently. I've changed this from a bug report to an enhancement request.

joakimeriksson · 9 months ago

Ok! I managed to build one - works fine - so should not be a problem.

yuningliang · 9 months ago

@joakimeriksson upstream it?

yuningliang · 9 months ago
We don't provide a binary for riscv64 currently. I've changed this from a bug report to an enhancement request.

@etraut-openai why not you just have to order a few machine of #RISCV and take @joakimeriksson upstream patches, there will be 10K people using very powerful RISCV laptops with ubuntu 26.04 next year in 2026 as Deepcomputing 100 universities/AI startups/ Community Projects support programmes announded in RISCV Summit NA

https://deepcomputing.io/deepcomputing-at-risc-v-summit-na-2025-empowering-the-future-of-open-ai-computing/,

hope you wont get 10K issues raised and swarmed on github.

https://store.deepcomputing.io/products/dc-roma-ai-pc-risc-v-mainboard-ii-for-framework-laptop-13

Many thanks in advance.

etraut-openai contributor · 9 months ago

Thanks for the suggestion. Please upvote this issue if you want to see this. We use upvotes / reactions to inform priorities for enhancement requests.

yuningliang · 9 months ago

@etraut-openai how do we do upvotes please? @joakimeriksson do you know how? Codex definitely can be one of our AI open source project in our #RISCV hardware support program

joakimeriksson · 9 months ago

So these were the few changes that I needed to do to get it building on riscv64.

https://github.com/joakimeriksson/codex/tree/riscv64-support

(in codex-rs - do cargo build).

etraut-openai contributor · 9 months ago
how do we do upvotes please

Click on the reactions button (the little smiley face beneath the post) and add a "thumbs up" reaction.

sudaoer · 19 days ago

With the help of Codex, I completed a functional reference implementation for Linux/riscv64 support:

https://github.com/sudaoer/codex/tree/riscv64gc-review

The current branch is intentionally limited to the riscv64gc-unknown-linux-musl release path and is split into three commits for easier review:

  1. Platform and packaging support
  • npm / installer platform detection
  • Python and TypeScript SDK platform handling
  • packaging and DotSlash target definitions
  • related tests
  1. Release and Linux sandbox support
  • cross-compilation of the RISC-V release artifacts
  • bubblewrap and libcap
  • Landlock/seccomp architecture handling
  • target-built rg
  • app-server and responses-api-proxy artifacts
  1. V8 / code-mode support
  • RISC-V rusty_v8 release artifacts
  • Bazel/V8 RISC-V build support
  • both normal and pointer-compression+sandbox variants
  • keeps the published build at the RV64GC baseline rather than requiring RVV

One platform-specific issue I found is V8 sandbox reservation on Sv39 systems. V8 normally attempts to reserve a 128 GiB address-space region; under Sv39 this cannot be fully reserved, so V8 falls back to a partially reserved sandbox. Code mode still works, but the address-space isolation is weaker than on systems with a sufficiently large virtual address space. I've documented this as a known platform limitation.

I have access to real RISC-V Linux hardware and can test runtime behavior and any changes needed during review.

If upstream RISC-V support is a direction the project is interested in, I'm happy to adjust the implementation or split it further according to maintainer preference.