denoland/deno · error

No RPM architecture mapping for arch '{other}'; supported: x

Error message

No RPM architecture mapping for arch '{other}'; supported: x86_64, aarch64

What it means

RPM packaging maps the target triple's arch component to the RPM architecture name; RPM keeps the same names, so only x86_64 and aarch64 are accepted. Any other arch component of --target (or the host arch, when --target is omitted) bails before the package is authored.

Source

Thrown at cli/tools/desktop.rs:3933

  match arch {
    "x86_64" => Ok("amd64"),
    "aarch64" => Ok("arm64"),
    other => bail!(
      "No Debian architecture mapping for arch '{other}'; supported: x86_64, aarch64"
    ),
  }
}

/// Map a target triple (or the host arch) to an RPM architecture name. RPM
/// keeps the triple's arch names (`x86_64`, `aarch64`).
fn rpm_arch_for_target(target: Option<&str>) -> Result<&'static str, AnyError> {
  let arch = target
    .and_then(|t| t.split('-').next())
    .unwrap_or(std::env::consts::ARCH);
  match arch {
    "x86_64" => Ok("x86_64"),
    "aarch64" => Ok("aarch64"),
    other => bail!(
      "No RPM architecture mapping for arch '{other}'; supported: x86_64, aarch64"
    ),
  }
}

/// `.desktop` entry installed at `/usr/share/applications/<pkg>.desktop`.
///
/// Unlike the in-app-dir `.desktop` (whose `Exec`/`Icon` are relative), this
/// one points `Exec` at the package name (resolved via PATH from the
/// `/usr/bin/<pkg>` symlink) and `Icon` at the installed hicolor icon name.
fn system_desktop_entry(meta: &LinuxPackageMeta) -> String {
  format!(
    "[Desktop Entry]\n\
     Type=Application\n\
     Name={app_name}\n\
     Exec={package}\n\
     Icon={package}\n\
     StartupWMClass={identifier}\n\

View on GitHub (pinned to f7822238ca)

Solutions

  1. Use `--target x86_64-...` or `--target aarch64-...` when building RPMs.
  2. Set --target explicitly in CI config so RPM arch doesn't silently follow the runner.
  3. Ship a tarball for arches outside the supported pair.

Example fix

# before
deno desktop --target armv7-unknown-linux-musleabihf --rpm

# after
deno desktop --target aarch64-unknown-linux-gnu --rpm
Defensive patterns

Strategy: validation

Validate before calling

case "${TARGET%%-*}" in
  x86_64|aarch64) ;;
  *) echo "rpm packaging supports x86_64 and aarch64 only"; exit 1 ;;
esac

Type guard

function isSupportedRpmArch(target: string): boolean {
  const a = target.split("-")[0];
  return a === "x86_64" || a === "aarch64";
}

Prevention

When it happens

Trigger: Building an .rpm with --target armv7-unknown-linux-gnu (or similar unsupported arch), or running without --target on a non-x86_64/aarch64 host.

Common situations: Packaging for ARM/32-bit distributions; CI runners on uncommon architectures relying on the implicit host-arch default.

Related errors


AI-assisted analysis of denoland/deno@f7822238ca (2026-08-20). Data as JSON: /api/errors/7220d612a4effe6e. Report an issue: GitHub.