Skip to content

Android: pin the rnp crypto backend to openssl for libretroshare too - #374

Closed
jolavillette wants to merge 1 commit into
RetroShare:masterfrom
jolavillette:fix/android-rnp-crypto-backend
Closed

Android: pin the rnp crypto backend to openssl for libretroshare too#374
jolavillette wants to merge 1 commit into
RetroShare:masterfrom
jolavillette:fix/android-rnp-crypto-backend

Conversation

@jolavillette

Copy link
Copy Markdown
Contributor

build_librnp builds and installs rnp into the Android sysroot with -DCRYPTO_BACKEND=openssl, but libretroshare's own configure can build rnp a second time, inline: CMakeLists.txt uses add_subdirectory() whenever ../supportlibs/librnp/CMakeLists.txt exists, which is the case as soon as libretroshare is checked out inside the RetroShare super-project rather than standalone.

That inline build gets rnp's default backend, botan, and configure 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.

Passing the same backend build_librnp uses fixes it. It is a no-op for standalone libretroshare checkouts, where ../supportlibs/librnp does not exist and the pre-built rnp from the sysroot is picked up by find_library() instead — which is why CI never saw this.

Reported on IRC by defnax, who hit it building the AAR for rs-mobile from a super-project checkout.

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) <noreply@anthropic.com>
@jolavillette

Copy link
Copy Markdown
Contributor Author

Superseded by #375. Pinning the backend removed the Could NOT find Botan error but only exposed the next one: the inline librnp build also has to run the findopensslfeatures probe it just compiled, which is an Android binary the build host cannot execute. The right fix is not to build librnp inline on Android at all, since the toolchain script already installed one in the sysroot.

@jolavillette
jolavillette deleted the fix/android-rnp-crypto-backend branch August 17, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant