[GH-ISSUE #7018] [Docs] macOS needs Ghidra buildNatives; doctor remediation should say so #4257

Open
opened 2026-10-31 00:48:10 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @danieljustus on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/7018

Before submitting

  • I searched the existing issues for a related documentation report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Documentation location

docs/installation.md (Ghidra provider requirements, the paragraph ending "official release archives may require you to build that native component separately") and the native_decompiler doctor remediation in src/ghidra/GhidraInstallation.ts.

Problem

On macOS, the official Ghidra release archive contains no native decompiler, but REA's docs only call out Linux ARM64 as needing a separately built native component. The rea doctor / rea providers check then reports:

native_decompiler: Matching native decompiler for darwin/arm64 was not found
remediation: Provide an executable Ghidra/Features/Decompiler/os/mac_arm_64/decompile, or its build/os equivalent. REA does not build or install native tools.

The remediation names the expected path but not how to produce it, so a macOS user following the docs gets stuck after unzipping the official release. Affected: macOS x64/arm64 users of the Ghidra provider, and equally Linux ARM64.

Expected content

State that official Ghidra release archives include native binaries only for Windows and Linux x86-64, and that macOS (mac_arm_64 / mac_x86_64) and Linux ARM64 hosts must build them once with Ghidra's own support/gradle/gradlew buildNatives (or gradle buildNatives), which writes Ghidra/Features/Decompiler/build/os/<platform>/ (a location REA already accepts). The doctor remediation should name that command on those hosts, while keeping "REA does not build or install native tools".

Supporting evidence

  • Ghidra 12.1.4 docs/GettingStarted.md, section "Building Native Components": "An official public Ghidra release includes native binaries for the following platforms: Windows 10 or later, x86 64-bit; Windows 10 or later, ARM 64-bit (using x86 emulation); Linux x86 64-bit" and "Ghidra supports running on the following additional platforms with user-built native binaries: macOS x86 64-bit, macOS ARM 64-bit, Linux ARM 64-bit, …", followed by gradle buildNatives from <GhidraInstallDir>/support/gradle/.
  • Observed on macOS 27.0.1 arm64 with ghidra_12.1.4_PUBLIC_20260921.zip (SHA-256 verified): Ghidra/Features/Decompiler/os/ contains only linux_x86_64 and win_x86_64. After support/gradle/gradlew --no-daemon buildNatives (JDK 25, Apple clang, ~30 s) the provider reports native_decompiler ... build/os/mac_arm_64/decompile reports mach-o arm64, which matches darwin/arm64 and availability: available.

Additional context

Related: #6921 (Homebrew currently ships Ghidra 12.2, which the 12.1.x gate rejects; that makes the official 12.1.x archive plus this build step the supported path on macOS today). I have a small PR with the doc change, the remediation hint, and a regression test.

Originally created by @danieljustus on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/7018 ### Before submitting - [x] I searched the existing issues for a related documentation report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Documentation location `docs/installation.md` (Ghidra provider requirements, the paragraph ending "official release archives may require you to build that native component separately") and the `native_decompiler` doctor remediation in `src/ghidra/GhidraInstallation.ts`. ### Problem On macOS, the official Ghidra release archive contains no native decompiler, but REA's docs only call out Linux ARM64 as needing a separately built native component. The `rea doctor` / `rea providers` check then reports: ``` native_decompiler: Matching native decompiler for darwin/arm64 was not found remediation: Provide an executable Ghidra/Features/Decompiler/os/mac_arm_64/decompile, or its build/os equivalent. REA does not build or install native tools. ``` The remediation names the expected path but not how to produce it, so a macOS user following the docs gets stuck after unzipping the official release. Affected: macOS x64/arm64 users of the Ghidra provider, and equally Linux ARM64. ### Expected content State that official Ghidra release archives include native binaries only for Windows and Linux x86-64, and that macOS (`mac_arm_64` / `mac_x86_64`) and Linux ARM64 hosts must build them once with Ghidra's own `support/gradle/gradlew buildNatives` (or `gradle buildNatives`), which writes `Ghidra/Features/Decompiler/build/os/<platform>/` (a location REA already accepts). The doctor remediation should name that command on those hosts, while keeping "REA does not build or install native tools". ### Supporting evidence - Ghidra 12.1.4 `docs/GettingStarted.md`, section "Building Native Components": "An official public Ghidra release includes native binaries for the following platforms: Windows 10 or later, x86 64-bit; Windows 10 or later, ARM 64-bit (using x86 emulation); Linux x86 64-bit" and "Ghidra supports running on the following additional platforms with user-built native binaries: macOS x86 64-bit, macOS ARM 64-bit, Linux ARM 64-bit, …", followed by `gradle buildNatives` from `<GhidraInstallDir>/support/gradle/`. - Observed on macOS 27.0.1 arm64 with `ghidra_12.1.4_PUBLIC_20260921.zip` (SHA-256 verified): `Ghidra/Features/Decompiler/os/` contains only `linux_x86_64` and `win_x86_64`. After `support/gradle/gradlew --no-daemon buildNatives` (JDK 25, Apple clang, ~30 s) the provider reports `native_decompiler ... build/os/mac_arm_64/decompile reports mach-o arm64, which matches darwin/arm64` and `availability: available`. ### Additional context Related: #6921 (Homebrew currently ships Ghidra 12.2, which the 12.1.x gate rejects; that makes the official 12.1.x archive plus this build step the supported path on macOS today). I have a small PR with the doc change, the remediation hint, and a regression test.
Author
Owner

@RishTheFish21 commented on GitHub (Oct 25, 2026):

Accidentally created a pr. Did not see it was already fixed.

<!-- gh-comment-id:6391181126 --> @RishTheFish21 commented on GitHub (Oct 25, 2026): Accidentally created a pr. Did not see it was already fixed.
Author
Owner

@XinwangTao commented on GitHub (Oct 25, 2026):

这个反馈很准确——remediation 只说出缺少 decompile 二进制,但没告诉 macOS 用户"先用 Ghidra 自带的 buildNatives 构建一次"这个前置动作,跟着官方文档走确实会卡在 unzip 之后。PR #7019 把命令(support/gradle/gradlew buildNatives)写进 remediation,且输出目录 build/os/ 本来就是 REA 接受的路径,正好补上缺口。一个小建议:macOS x64/arm64 和 Linux ARM64 共用同一段 buildNatives 指引,避免读者按平台再各自踩一遍。

<!-- gh-comment-id:6392710826 --> @XinwangTao commented on GitHub (Oct 25, 2026): 这个反馈很准确——remediation 只说出缺少 decompile 二进制,但没告诉 macOS 用户"先用 Ghidra 自带的 buildNatives 构建一次"这个前置动作,跟着官方文档走确实会卡在 unzip 之后。PR #7019 把命令(support/gradle/gradlew buildNatives)写进 remediation,且输出目录 build/os/<platform> 本来就是 REA 接受的路径,正好补上缺口。一个小建议:macOS x64/arm64 和 Linux ARM64 共用同一段 buildNatives 指引,避免读者按平台再各自踩一遍。
Author
Owner

@XinwangTao commented on GitHub (Oct 25, 2026):

Confirmed gap — the macOS case is easy to hit (fresh Ghidra release zip has no native decompiler, so the provider dies at first native call) and the docs only flag Linux ARM64. Suggest: (1) add the explicit macOS buildNatives note right next to the Linux ARM64 sentence in docs/installation.md, including the Gradle command (./gradlew buildNatives) and a link to Ghidra's build docs; (2) make the native_decompiler doctor remediation platform-aware so on darwin it prints 'build natives for macOS' instead of the generic hint; (3) optionally detect missing native artifacts at provider startup and point to the remediation. Small doc+doctor fix with clear user impact.

<!-- gh-comment-id:6399914867 --> @XinwangTao commented on GitHub (Oct 25, 2026): Confirmed gap — the macOS case is easy to hit (fresh Ghidra release zip has no native decompiler, so the provider dies at first native call) and the docs only flag Linux ARM64. Suggest: (1) add the explicit macOS buildNatives note right next to the Linux ARM64 sentence in docs/installation.md, including the Gradle command (./gradlew buildNatives) and a link to Ghidra's build docs; (2) make the native_decompiler doctor remediation platform-aware so on darwin it prints 'build natives for macOS' instead of the generic hint; (3) optionally detect missing native artifacts at provider startup and point to the remediation. Small doc+doctor fix with clear user impact.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#4257
No description provided.