From a04d831cfaeacd6e15299da1b016d2c3caec4490 Mon Sep 17 00:00:00 2001 From: bash0816 Date: Thu, 29 Oct 2026 12:39:38 +0900 Subject: [PATCH 1/2] docs: add libc++ prerequisite and setup troubleshooting Co-Authored-By: Claude Haiku 5.5 --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 84204d7..6a83b54 100644 --- a/README.md +++ b/README.md @@ -66,13 +66,39 @@ OpenCode には npm 上で別系統の配布ラインが 2 つあります。1 ## Prerequisites / 前提条件 ```sh +pkg update && pkg upgrade pkg install glibc-repo && pkg install glibc -pkg install patchelf +pkg install patchelf libc++ pkg install llvm ``` readelf は llvm パッケージが提供します / readelf is provided by the llvm package +### If setup fails with `cannot locate symbol "_ZNSt6__ndk1..."` / セットアップが `cannot locate symbol` で失敗する場合 + +On first run, `opencode` may stop with an error like this: + +``` +opencode-termux: setup failed: Command failed: patchelf --set-interpreter ... +CANNOT LINK EXECUTABLE "patchelf": cannot locate symbol "_ZNSt6__ndk113__hash_memoryEPKvm" ... +``` + +This happens when the installed `libc++` package is older than the version your `patchelf` needs. Update `libc++`, then run `opencode` again: + +```sh +pkg install libc++ +``` + +If `pkg` does not offer a newer version, switch to a current mirror with `termux-change-repo`, then run `pkg update && pkg upgrade`. + +初回起動で上記のようなエラーが出る場合は、インストール済みの `libc++` が `patchelf` の必要とするバージョンより古いことが原因です。`libc++` を更新してから、もう一度 `opencode` を実行してください。 + +```sh +pkg install libc++ +``` + +`pkg` が新しいバージョンを見つけられない場合は、`termux-change-repo` で最新のミラーに切り替え、`pkg update && pkg upgrade` を実行してください。 + ## Install / インストール ```sh From 25196742c22b260c56489b5ea3800a61fafd001d Mon Sep 17 00:00:00 2001 From: bash0816 Date: Thu, 29 Oct 2026 12:41:17 +0900 Subject: [PATCH 2/2] docs: state that pkg upgrade updates all packages Co-Authored-By: Claude Haiku 5.5 --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6a83b54..8adee31 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ OpenCode には npm 上で別系統の配布ラインが 2 つあります。1 ## Prerequisites / 前提条件 ```sh +# Updates ALL installed packages (recommended by Termux) / インストール済みの全パッケージを更新します(Termux 推奨) pkg update && pkg upgrade pkg install glibc-repo && pkg install glibc pkg install patchelf libc++ @@ -83,13 +84,13 @@ opencode-termux: setup failed: Command failed: patchelf --set-interpreter ... CANNOT LINK EXECUTABLE "patchelf": cannot locate symbol "_ZNSt6__ndk113__hash_memoryEPKvm" ... ``` -This happens when the installed `libc++` package is older than the version your `patchelf` needs. Update `libc++`, then run `opencode` again: +This error occurs when the installed `libc++` is older than the version your `patchelf` needs. Update `libc++`, then run `opencode` again: ```sh pkg install libc++ ``` -If `pkg` does not offer a newer version, switch to a current mirror with `termux-change-repo`, then run `pkg update && pkg upgrade`. +If `pkg` does not offer a newer version, switch to a current mirror with `termux-change-repo`, then run `pkg update && pkg upgrade` (this updates all installed packages, not only OpenCode's prerequisites). 初回起動で上記のようなエラーが出る場合は、インストール済みの `libc++` が `patchelf` の必要とするバージョンより古いことが原因です。`libc++` を更新してから、もう一度 `opencode` を実行してください。 @@ -97,7 +98,7 @@ If `pkg` does not offer a newer version, switch to a current mirror with `termux pkg install libc++ ``` -`pkg` が新しいバージョンを見つけられない場合は、`termux-change-repo` で最新のミラーに切り替え、`pkg update && pkg upgrade` を実行してください。 +`pkg` が新しいバージョンを見つけられない場合は、`termux-change-repo` で最新のミラーに切り替え、`pkg update && pkg upgrade` を実行してください(OpenCode に必要なパッケージだけでなく、インストール済みの全パッケージが更新されます)。 ## Install / インストール