From 25ffd35d90d06592dd02e190ca55abdab3374113 Mon Sep 17 00:00:00 2001 From: jolavillette Date: Mon, 17 Aug 2026 07:44:41 +0200 Subject: [PATCH] Android: pin the rnp crypto backend to openssl for libretroshare too build_librnp builds and installs rnp with -DCRYPTO_BACKEND=openssl, but libretroshare's own configure builds rnp a second time, inline, whenever ../supportlibs/librnp exists, which is the case when libretroshare is checked out inside the RetroShare super-project. That inline build gets rnp's default backend, botan, and dies with Could NOT find Botan (missing: BOTAN_LIBRARY BOTAN_INCLUDE_DIR) (Required is at least version "2.14.0") since the Android toolchain never builds botan. Pass the same backend as build_librnp. Harmless for standalone libretroshare checkouts, where the pre-built rnp from the sysroot is picked up instead. Co-Authored-By: Claude Opus 5 (1M context) --- misc/Android/prepare-toolchain-clang.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/Android/prepare-toolchain-clang.sh b/misc/Android/prepare-toolchain-clang.sh index 43f2103de..7259ada23 100755 --- a/misc/Android/prepare-toolchain-clang.sh +++ b/misc/Android/prepare-toolchain-clang.sh @@ -918,7 +918,14 @@ build_libretroshare() rm -rf $B_dir mkdir $B_dir || return $? pushd $B_dir || return $? + ## CRYPTO_BACKEND matters only when libretroshare CMake ends up building + ## librnp inline, which happens when it is checked out inside the + ## RetroShare super-project, as ../supportlibs/librnp then exists. Without + ## it rnp defaults to botan, which the Android toolchain does not provide, + ## and configure dies on "Could NOT find Botan". Keep it aligned with the + ## backend build_librnp uses for the sysroot copy. andro_cmake -B. -H${S_dir} \ + -D CRYPTO_BACKEND=openssl \ -D RS_ANDROID=ON -D RS_WARN_DEPRECATED=OFF -D RS_WARN_LESS=ON \ -D RS_LIBRETROSHARE_STATIC=OFF -D RS_LIBRETROSHARE_SHARED=ON \ -D RS_BRODCAST_DISCOVERY=ON -D RS_EXPORT_JNI_ONLOAD=ON \